Skip to content

Commit

Permalink
LineageRegistrationDemo: clean the code
Browse files Browse the repository at this point in the history
  • Loading branch information
maarzt committed Jun 14, 2024
1 parent 76e0684 commit 9c03ba2
Showing 1 changed file with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}

}

0 comments on commit 9c03ba2

Please sign in to comment.