Skip to content

Commit

Permalink
Merge pull request #335 from mastodon-sc/dev
Browse files Browse the repository at this point in the history
Release the beta-31 of Mastodon
  • Loading branch information
tinevez authored Oct 11, 2024
2 parents ad962ac + 42a50b2 commit 7da5e11
Show file tree
Hide file tree
Showing 99 changed files with 9,011 additions and 356 deletions.
2 changes: 2 additions & 0 deletions .github/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/sh
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-build.sh
sh ci-build.sh
55 changes: 49 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>37.0.0</version>
<version>38.0.1</version>
</parent>

<groupId>org.mastodon</groupId>
Expand Down Expand Up @@ -63,7 +63,7 @@
<groupId>cisd</groupId>
<artifactId>jhdf5</artifactId>
</dependency>

<!-- ImgLib2 dependencies -->
<dependency>
<groupId>org.scijava</groupId>
Expand All @@ -77,7 +77,33 @@
<groupId>net.imglib2</groupId>
<artifactId>imglib2-roi</artifactId>
</dependency>


<!-- N5 dependencies. -->
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-universe</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-google-cloud</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-aws-s3</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-viewer_fiji</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-ij</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-zarr</artifactId>
</dependency>

<!-- Misc dependencies. -->
<dependency>
<groupId>com.opencsv</groupId>
Expand All @@ -86,14 +112,25 @@
<dependency>
<groupId>io.humble</groupId>
<artifactId>humble-video-all</artifactId>
</dependency>
</dependency>
<!-- export of panels to svg -->
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreesvg</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>uk.org.webcompere</groupId>
<artifactId>system-stubs-junit4</artifactId>
<version>2.1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>sc.fiji</groupId>
<artifactId>TrackMate</artifactId>
Expand All @@ -104,7 +141,6 @@
<artifactId>MaMuT</artifactId>
<scope>test</scope>
</dependency>


</dependencies>

Expand All @@ -116,7 +152,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<argLine>-Xms256m -Xmx1024m</argLine>
<argLine>-Xms256m -Xmx1536m</argLine>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -202,6 +238,13 @@
<url>https://github.com/xulman</url>
<properties><id>xulman</id></properties>
</contributor>
<contributor>
<name>Stefan Hahmann</name>
<url>https://github.com/stefanhahmann</url>
<properties>
<id>stefanhahmann</id>
</properties>
</contributor>
</contributors>

<repositories>
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/mastodon/adapter/SelectionModelAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,10 @@ public void pauseListeners()
{
selection.pauseListeners();
}

@Override
public boolean areListenersPaused()
{
return selection.areListenersPaused();
}
}
3 changes: 3 additions & 0 deletions src/main/java/org/mastodon/app/MastodonIcons.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ public class MastodonIcons
public static final List< Image > BDV_VIEW_ICON = Arrays
.asList( new Image[] { BDV_ICON_SMALL.getImage(), BDV_ICON_MEDIUM.getImage(), BDV_ICON_LARGE.getImage() } );

public static final List< Image > BVV_VIEW_ICON = Arrays
.asList( new Image[] { BVV_ICON_SMALL.getImage(), BVV_ICON_MEDIUM.getImage(), BVV_ICON_LARGE.getImage() } );

public static final List< Image > TRACKSCHEME_VIEW_ICON =
Arrays.asList( new Image[] { TRACKSCHEME_ICON_SMALL.getImage(), TRACKSCHEME_ICON_MEDIUM.getImage(),
TRACKSCHEME_ICON_LARGE.getImage() } );
Expand Down
42 changes: 36 additions & 6 deletions src/main/java/org/mastodon/mamut/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import static org.mastodon.app.MastodonIcons.TAGS_ICON_MEDIUM;
import static org.mastodon.app.MastodonIcons.TRACKSCHEME_ICON_MEDIUM;
import static org.mastodon.app.ui.ViewMenuBuilder.item;
import static org.mastodon.app.ui.ViewMenuBuilder.menu;
import static org.mastodon.app.ui.ViewMenuBuilder.separator;
import static org.mastodon.mamut.MamutMenuBuilder.fileMenu;

Expand All @@ -61,6 +62,7 @@
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;

import org.mastodon.app.MastodonIcons;
Expand All @@ -73,8 +75,11 @@
import org.mastodon.mamut.views.table.MamutViewTableFactory;
import org.mastodon.mamut.views.trackscheme.MamutBranchViewTrackSchemeFactory;
import org.mastodon.mamut.views.trackscheme.MamutViewTrackSchemeFactory;
import org.mastodon.ui.commandfinder.CommandFinder;
import org.mastodon.ui.keymap.KeyConfigContexts;
import org.mastodon.util.RunnableActionPair;
import org.scijava.ui.behaviour.util.Actions;
import org.scijava.ui.behaviour.util.InputActionBindings;

import bdv.ui.keymap.Keymap;
import net.miginfocom.swing.MigLayout;
Expand All @@ -97,7 +102,8 @@ public MainWindow( final ProjectModel appModel )
setLocationByPlatform( true );
setLocationRelativeTo( null );

// Re-register save actions, this time using this frame as parent component.
// Re-register save actions, this time using this frame as parent
// component.
ProjectActions.installAppActions( appModel.getProjectActions(), appModel, this );

// Views:
Expand All @@ -113,7 +119,7 @@ public MainWindow( final ProjectModel appModel )
prepareButton( tableButton, "table", TABLE_ICON_MEDIUM );
buttonsPanel.add( tableButton, "grow" );

final JButton bdvButton = new JButton( new RunnableActionPair( MamutViewBdvFactory.NEW_BDV_VIEW,
final JButton bdvButton = new JButton( new RunnableActionPair( MamutViewBdvFactory.NEW_BDV_VIEW,
() -> projectActionMap.get( MamutViewBdvFactory.NEW_BDV_VIEW ).actionPerformed( null ),
() -> projectActionMap.get( MamutBranchViewBdvFactory.NEW_BRANCH_BDV_VIEW ).actionPerformed( null ) ) );
prepareButton( bdvButton, "bdv", BDV_ICON_MEDIUM );
Expand All @@ -123,9 +129,9 @@ public MainWindow( final ProjectModel appModel )
prepareButton( selectionTableButton, "selection table", TABLE_ICON_MEDIUM );
buttonsPanel.add( selectionTableButton, "grow" );

final JButton trackschemeButton = new JButton( new RunnableActionPair( MamutViewTrackSchemeFactory.NEW_TRACKSCHEME_VIEW,
() -> projectActionMap.get( MamutViewTrackSchemeFactory.NEW_TRACKSCHEME_VIEW ).actionPerformed( null ),
() -> projectActionMap.get( MamutBranchViewTrackSchemeFactory.NEW_BRANCH_TRACKSCHEME_VIEW ).actionPerformed( null ) ) );
final JButton trackschemeButton = new JButton( new RunnableActionPair( MamutViewTrackSchemeFactory.NEW_TRACKSCHEME_VIEW,
() -> projectActionMap.get( MamutViewTrackSchemeFactory.NEW_TRACKSCHEME_VIEW ).actionPerformed( null ),
() -> projectActionMap.get( MamutBranchViewTrackSchemeFactory.NEW_BRANCH_TRACKSCHEME_VIEW ).actionPerformed( null ) ) );
prepareButton( trackschemeButton, "trackscheme", TRACKSCHEME_ICON_MEDIUM );
buttonsPanel.add( trackschemeButton, "grow, wrap" );

Expand Down Expand Up @@ -209,6 +215,25 @@ public void windowClosing( final WindowEvent e )

// Register to when the project model is closed.
appModel.projectClosedListeners().add( () -> dispose() );

// Command finder.
final InputActionBindings keybindings = new InputActionBindings();
SwingUtilities.replaceUIActionMap( content, keybindings.getConcatenatedActionMap() );
SwingUtilities.replaceUIInputMap( content, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
keybindings.getConcatenatedInputMap() );
final Actions mwActions = new Actions( keymap.getConfig(), KeyConfigContexts.MASTODON );
mwActions.install( keybindings, "main" );
CommandFinder.build()
.context( appModel.getContext() )
.inputTriggerConfig( appModel.getKeymap().getConfig() )
.descriptionProvider( appModel.getWindowManager().getViewFactories().getCommandDescriptions() )
.keyConfigContext( KeyConfigContexts.MASTODON )
.register( appModel.getModelActions() )
.register( appModel.getProjectActions() )
.register( appModel.getPlugins().getPluginActions() )
.modificationListeners( appModel.getKeymap().updateListeners() )
.parent( this )
.installOn( mwActions );
}

/**
Expand Down Expand Up @@ -320,11 +345,16 @@ public static void addMenus( final ViewMenu menu, final ActionMap actionMap )
item( ProjectActions.SAVE_PROJECT ),
item( ProjectActions.SAVE_PROJECT_AS ),
separator(),
menu( "Import" ),
menu( "Export" ),
separator(),
item( ProjectActions.FIX_DATASET_PATH ),
separator(),
// item( ProjectActions.IMPORT_TGMM ),
// item( ProjectActions.IMPORT_SIMI ),
// item( ProjectActions.IMPORT_MAMUT ),
// item( ProjectActions.EXPORT_MAMUT ),
// separator(),
// separator(),
item( WindowManager.PREFERENCES_DIALOG ),
separator(),
item( WindowManager.OPEN_ONLINE_DOCUMENTATION ) ) );
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/mastodon/mamut/MamutMenuBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public class MamutMenuBuilder extends ViewMenuBuilder
menuTexts.put( ProjectActions.LOAD_PROJECT, "Load Project" );
menuTexts.put( ProjectActions.SAVE_PROJECT, "Save Project" );
menuTexts.put( ProjectActions.SAVE_PROJECT_AS, "Save Project As..." );
menuTexts.put( ProjectActions.FIX_DATASET_PATH, "Fix Image Path" );
menuTexts.put( ProjectActions.IMPORT_TGMM, "Import TGMM tracks" );
menuTexts.put( ProjectActions.IMPORT_SIMI, "Import Simi BioCell tracks" );
menuTexts.put( ProjectActions.IMPORT_MAMUT, "Import MaMuT project" );
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/mastodon/mamut/MamutViews.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public < T extends MamutViewI > MamutViewFactory< T > getFactory( final Class< T
return ( MamutViewFactory< T > ) factories.get( klass );
}

CommandDescriptionProvider getCommandDescriptions()
public CommandDescriptionProvider getCommandDescriptions()
{
return new CommandDescriptionProvider( KeyConfigScopes.MAMUT, KeyConfigContexts.MASTODON )
{
Expand Down
Loading

0 comments on commit 7da5e11

Please sign in to comment.