Skip to content

Commit

Permalink
Tweak test drive for NN stats.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinevez committed May 3, 2024
1 parent f56ba9c commit b648ba1
Showing 1 changed file with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.mastodon.mamut.nearest;

import java.awt.event.WindowAdapter;
import java.io.IOException;
import java.util.Locale;

import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

Expand All @@ -22,14 +22,25 @@ public static void main( final String[] args ) throws ClassNotFoundException, In
Locale.setDefault( Locale.ROOT );
UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );

try (Context context = new Context())
// try
final Context context = new Context();
// {
// final ProjectModel projectModel = ProjectLoader.open( "samples/drosophila_crop.mastodon", context );
final ProjectModel projectModel = ProjectLoader.open( "/Users/tinevez/Google Drive/Mastodon/Datasets/Local/Uzuki2D/Choana.mastodon", context );
final MainWindow mw = new MainWindow( projectModel );
// mw.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
mw.setVisible( true );
mw.addWindowListener( new WindowAdapter()
{
final ProjectModel projectModel = ProjectLoader.open( "samples/drosophila_crop.mastodon", context );
final MainWindow mw = new MainWindow( projectModel );
mw.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
mw.setVisible( true );

projectModel.getPlugins().getPluginActions().getActionMap().get( NearestObjectStatPlugin.SHOW_NEAREST_NEIGHBORS_STATS_DIALOG_ACTION ).actionPerformed( null );
}
@Override
public void windowClosed( final java.awt.event.WindowEvent e )
{
context.close();
System.exit( 0 );
};
} );

projectModel.getPlugins().getPluginActions().getActionMap().get( NearestObjectStatPlugin.SHOW_NEAREST_NEIGHBORS_STATS_DIALOG_ACTION ).actionPerformed( null );
// }
}
}

0 comments on commit b648ba1

Please sign in to comment.