diff --git a/pom.xml b/pom.xml index 3fca8a11b..0d19f2283 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.embl.mobie mobie-viewer-fiji - 5.0.4 + 5.0.6-SNAPSHOT diff --git a/src/main/java/org/embl/mobie/command/SpatialCalibration.java b/src/main/java/org/embl/mobie/command/SpatialCalibration.java index 5cbf25c67..729d59bca 100644 --- a/src/main/java/org/embl/mobie/command/SpatialCalibration.java +++ b/src/main/java/org/embl/mobie/command/SpatialCalibration.java @@ -30,7 +30,7 @@ public void setVoxelDimensions( MoBIESettings settings, String tablePath ) if ( rows.columnNames().contains( PixelSizeColumns.PIXEL_SIZE ) ) { FinalVoxelDimensions voxelDimensions = new FinalVoxelDimensions( - rows.textColumn( PixelSizeColumns.PIXEL_UNIT ).get( 0 ), + rows.stringColumn( PixelSizeColumns.PIXEL_UNIT ).get( 0 ), rows.doubleColumn( PixelSizeColumns.PIXEL_SIZE ).get( 0 ), rows.doubleColumn( PixelSizeColumns.PIXEL_SIZE ).get( 0 ), rows.doubleColumn( PixelSizeColumns.PIXEL_SIZE ).get( 0 ) @@ -40,7 +40,7 @@ public void setVoxelDimensions( MoBIESettings settings, String tablePath ) else { FinalVoxelDimensions voxelDimensions = new FinalVoxelDimensions( - rows.textColumn( PixelSizeColumns.PIXEL_UNIT ).get( 0 ), + rows.stringColumn( PixelSizeColumns.PIXEL_UNIT ).get( 0 ), rows.doubleColumn( PixelSizeColumns.PIXEL_SIZE_X ).get( 0 ), rows.doubleColumn( PixelSizeColumns.PIXEL_SIZE_Y ).get( 0 ), rows.doubleColumn( PixelSizeColumns.PIXEL_SIZE_Z ).get( 0 ) diff --git a/src/main/java/org/embl/mobie/command/context/ManualTransformationCommand.java b/src/main/java/org/embl/mobie/command/context/ManualTransformationCommand.java index 81c57d85e..8c0fded11 100644 --- a/src/main/java/org/embl/mobie/command/context/ManualTransformationCommand.java +++ b/src/main/java/org/embl/mobie/command/context/ManualTransformationCommand.java @@ -34,6 +34,7 @@ import org.embl.mobie.command.MoBIEManualTransformationEditor; import org.embl.mobie.lib.image.Image; import org.embl.mobie.lib.image.RegionAnnotationImage; +import org.scijava.ItemVisibility; import org.scijava.plugin.Parameter; import org.scijava.plugin.Plugin; import org.scijava.widget.Button; @@ -46,6 +47,9 @@ @Plugin(type = BdvPlaygroundActionCommand.class, menuPath = CommandConstants.CONTEXT_MENU_ITEMS_ROOT + "Transform>Registration - Manual") public class ManualTransformationCommand extends AbstractTransformationCommand { + + public static final String INACTIVE = "Status: Manual transform inactive."; + static { net.imagej.patcher.LegacyInjector.preinit(); } @Parameter ( label = "Start manual transform", callback = "startManualTransform" ) @@ -57,6 +61,9 @@ public class ManualTransformationCommand extends AbstractTransformationCommand @Parameter ( label = "Cancel manual transform", callback = "cancelManualTransform" ) public Button cancelManualTransform; + @Parameter( visibility = ItemVisibility.MESSAGE ) + private final String status = INACTIVE; + private MoBIEManualTransformationEditor transformationEditor; @Override @@ -71,6 +78,9 @@ public void startManualTransform() transformationEditor = new MoBIEManualTransformationEditor( bdvHandle.getViewerPanel(), bdvHandle.getKeybindings() ); transformationEditor.setTransformableSources( movingSacs ); transformationEditor.setActive( true ); + + getInfo().getMutableInput( "status", String.class ) + .setValue( this, "Status: You are transforming " + selectedSourceName + "..."); } private void acceptManualTransform() @@ -83,6 +93,9 @@ private void acceptManualTransform() // but this is intended as the transformed image is now a new image that is stored as a new view. // And this new transformed image will also be shown by the above applyTransform function. transformationEditor.setActive( false ); + + getInfo().getMutableInput( "status", String.class ) + .setValue( this, INACTIVE ); } private void cancelManualTransform() @@ -90,5 +103,8 @@ private void cancelManualTransform() if ( transformationEditor == null ) return; transformationEditor.setActive( false ); + + getInfo().getMutableInput( "status", String.class ) + .setValue( this, INACTIVE ); } } diff --git a/src/main/java/org/embl/mobie/lib/files/FileSourcesDataSetter.java b/src/main/java/org/embl/mobie/lib/files/FileSourcesDataSetter.java index 8dc035de3..b064ab524 100644 --- a/src/main/java/org/embl/mobie/lib/files/FileSourcesDataSetter.java +++ b/src/main/java/org/embl/mobie/lib/files/FileSourcesDataSetter.java @@ -90,7 +90,7 @@ public void addDataAndDisplaysAndViews( Dataset dataset ) List< String > imageNames = sources.getSources(); ImageDataFormat imageDataFormat = ImageDataFormat.fromPath( sources.getPath( imageNames.get( 0 ) ) ); - IJ.log(sources.name + " file type: " + imageDataFormat ); + IJ.log( "\""+ sources.name + "\" file type: " + imageDataFormat ); for ( String imageName : imageNames ) { @@ -339,7 +339,15 @@ else if ( sources.getGridType().equals( GridType.Transformed ) ) // construct and add the view // final ImageZoomViewerTransform viewerTransform = new ImageZoomViewerTransform( fileSourcesList.get( 0 ).getSources().get( 0 ), 0 ); - final View view = new View( "all images", "data", displays, transformations, viewerTransform, false, null ); + final View view = new View( + "all images", + "data", + displays, + transformations, + viewerTransform, + false, + null ); + view.overlayNames( true ); dataset.views().put( view.getName(), view ); } } diff --git a/src/test/java/projects/microbial_predation/MicrobialPredation.java b/src/test/java/projects/microbial_predation/MicrobialPredation.java index 61d871081..35ee2545b 100644 --- a/src/test/java/projects/microbial_predation/MicrobialPredation.java +++ b/src/test/java/projects/microbial_predation/MicrobialPredation.java @@ -14,10 +14,16 @@ public static void main( String[] args ) OpenImageAndLabelsCommand command = new OpenImageAndLabelsCommand(); - String root = "/Users/tischer/Documents/microbial-predation-data/"; - command.image = new File( root + "test_timelapse_subset/.*.tif" ); - command.labels = new File( root + "test_timelapse_results/.*_labels.tif" ); - command.table = new File( root + "test_timelapse_results/.*_measurements.csv" ); +// String root = "/Users/tischer/Documents/microbial-predation-data/"; +// command.image = new File( root + "test_timelapse_subset/.*.tif" ); +// command.labels = new File( root + "test_timelapse_results/.*_labels.tif" ); +// command.table = new File( root + "test_timelapse_results/.*_measurements.csv" ); +// command.spatialCalibration = SpatialCalibration.FromTable; + + String root = "/Volumes/Microbial_Predation_Analysis_Dev/Interval_output"; + command.image = new File( root, "Source/.*.tif" ); + command.labels = new File( root , ".*_profile_labels.tif" ); + command.table = new File( root, ".*_measurements.csv" ); command.spatialCalibration = SpatialCalibration.FromTable; command.run();