From 9c03ba209ccab06018a5ca5583dc15787079ba62 Mon Sep 17 00:00:00 2001 From: Matthias Arzt Date: Fri, 14 Jun 2024 13:21:17 +0200 Subject: [PATCH] LineageRegistrationDemo: clean the code --- .../LineageRegistrationDemo.java | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/test/java/org/mastodon/mamut/tomancak/lineage_registration/LineageRegistrationDemo.java b/src/test/java/org/mastodon/mamut/tomancak/lineage_registration/LineageRegistrationDemo.java index 1f045f8a..b60882cd 100644 --- a/src/test/java/org/mastodon/mamut/tomancak/lineage_registration/LineageRegistrationDemo.java +++ b/src/test/java/org/mastodon/mamut/tomancak/lineage_registration/LineageRegistrationDemo.java @@ -28,47 +28,41 @@ */ package org.mastodon.mamut.tomancak.lineage_registration; -import static org.junit.Assert.assertNotNull; - import java.io.IOException; -import mpicbg.spim.data.SpimDataException; - -import org.apache.commons.io.FilenameUtils; -import org.mastodon.feature.FeatureSpecsService; import org.mastodon.mamut.MainWindow; import org.mastodon.mamut.ProjectModel; -import org.mastodon.mamut.WindowManager; import org.mastodon.mamut.io.ProjectLoader; import org.mastodon.mamut.views.trackscheme.MamutViewTrackScheme; -import org.mastodon.views.trackscheme.display.TrackSchemeFrame; import org.scijava.Context; +import mpicbg.spim.data.SpimDataException; + public class LineageRegistrationDemo { public static final String project1 = "/home/arzt/Datasets/Mette/E1.mastodon"; + public static final String project2 = "/home/arzt/Datasets/Mette/E2.mastodon"; - public static void main( String... args ) + public static void main( final String... args ) { - Context context = new Context(); + final Context context = new Context(); openAppModel( context, project1 ); openAppModel( context, project2 ); context.service( LineageRegistrationControlService.class ).showDialog(); } - private static void openAppModel( Context context, String projectPath ) + private static void openAppModel( final Context context, final String projectPath ) { try { - ProjectModel projectModel = ProjectLoader.open( projectPath, context ); + final ProjectModel projectModel = ProjectLoader.open( projectPath, context ); projectModel.getWindowManager().createView( MamutViewTrackScheme.class ); new MainWindow( projectModel ).setVisible( true ); } - catch ( SpimDataException | IOException e ) + catch ( final SpimDataException | IOException e ) { throw new RuntimeException( e ); } } - }