diff --git a/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsFilesCommand.java b/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsFilesCommand.java index 97f892310..936d34568 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsFilesCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsFilesCommand.java @@ -32,6 +32,7 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.command.SpatialCalibration; +import org.embl.mobie.lib.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.command.Command; import org.scijava.plugin.Parameter; @@ -59,7 +60,7 @@ public class OpenImageAndLabelsFilesCommand implements Command { @Parameter( label = "Spatial Calibration" ) public SpatialCalibration spatialCalibration = SpatialCalibration.FromImage; - @Parameter( label = "Grid type", description = "If the images are different and not too many, use Transformed; otherwise use Stitched for better performance.") + @Parameter( label = "Grid type", description = MoBIEHelper.GRID_TYPE_HELP ) public GridType gridType = GridType.Transformed; @Override diff --git a/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsURIsCommand.java b/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsURIsCommand.java index a2c5a63c6..05150d4d6 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsURIsCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenImageAndLabelsURIsCommand.java @@ -32,6 +32,7 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.command.SpatialCalibration; +import org.embl.mobie.lib.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.command.Command; import org.scijava.plugin.Parameter; @@ -57,7 +58,7 @@ public class OpenImageAndLabelsURIsCommand implements Command { @Parameter( label = "Spatial Calibration" ) public SpatialCalibration spatialCalibration = SpatialCalibration.FromImage; - @Parameter( label = "Grid type", description = "If the images are different and not too many, use Transformed; otherwise use Stitched for better performance.") + @Parameter( label = "Grid type", description = MoBIEHelper.GRID_TYPE_HELP ) public GridType gridType = GridType.Transformed; @Override diff --git a/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsFilesCommand.java b/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsFilesCommand.java index 44b87ea0c..5b488b4be 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsFilesCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsFilesCommand.java @@ -32,6 +32,7 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.command.SpatialCalibration; +import org.embl.mobie.lib.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.command.Command; import org.scijava.plugin.Parameter; @@ -73,7 +74,7 @@ public class OpenMultipleImagesAndLabelsFilesCommand implements Command { @Parameter( label = "Spatial Calibration" ) public SpatialCalibration spatialCalibration = SpatialCalibration.FromImage; - @Parameter( label = "Grid type", description = "If the images are different and not too many, use Transformed; otherwise use Stitched for better performance.") + @Parameter( label = "Grid type", description = MoBIEHelper.GRID_TYPE_HELP ) public GridType gridType = GridType.Transformed; @Override diff --git a/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsURIsCommand.java b/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsURIsCommand.java index 588db0330..a51f24d18 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsURIsCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenMultipleImagesAndLabelsURIsCommand.java @@ -32,6 +32,7 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.command.SpatialCalibration; +import org.embl.mobie.lib.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.command.Command; import org.scijava.plugin.Parameter; @@ -72,7 +73,7 @@ public class OpenMultipleImagesAndLabelsURIsCommand implements Command { @Parameter( label = "Spatial Calibration" ) public SpatialCalibration spatialCalibration = SpatialCalibration.FromImage; - @Parameter( label = "Grid type", description = "If the images are different and not too many, use Transformed; otherwise use Stitched for better performance.") + @Parameter( label = "Grid type", description = MoBIEHelper.GRID_TYPE_HELP ) public GridType gridType = GridType.Transformed; @Override diff --git a/src/main/java/org/embl/mobie/command/open/OpenTableCommand.java b/src/main/java/org/embl/mobie/command/open/OpenTableCommand.java index b762cedd0..a9779279f 100644 --- a/src/main/java/org/embl/mobie/command/open/OpenTableCommand.java +++ b/src/main/java/org/embl/mobie/command/open/OpenTableCommand.java @@ -33,6 +33,7 @@ import org.embl.mobie.MoBIESettings; import org.embl.mobie.command.CommandConstants; import org.embl.mobie.command.SpatialCalibration; +import org.embl.mobie.lib.MoBIEHelper; import org.embl.mobie.lib.transform.GridType; import org.scijava.command.Command; import org.scijava.plugin.Parameter; @@ -74,7 +75,7 @@ public class OpenTableCommand implements Command { @Parameter( label = "Spatial Calibration" ) public SpatialCalibration spatialCalibration = SpatialCalibration.FromImage; - @Parameter( label = "Grid type", description = "If the images are different and not too many, use \"Transformed\"; otherwise use \"Stitched\" for better performance.") + @Parameter( label = "Grid type", description = MoBIEHelper.GRID_TYPE_HELP ) public GridType gridType = GridType.Transformed; @Override diff --git a/src/main/java/org/embl/mobie/lib/MoBIEHelper.java b/src/main/java/org/embl/mobie/lib/MoBIEHelper.java index 7d44494f9..0e7aad124 100644 --- a/src/main/java/org/embl/mobie/lib/MoBIEHelper.java +++ b/src/main/java/org/embl/mobie/lib/MoBIEHelper.java @@ -62,6 +62,8 @@ public abstract class MoBIEHelper { + public static final String GRID_TYPE_HELP = "If the images are different and not too many, use Transformed; otherwise use Stitched for better performance."; + static { net.imagej.patcher.LegacyInjector.preinit(); } public static String print(double[] array, int numSignificantDigits) { diff --git a/src/test/java/develop/OpenAutoMicTable.java b/src/test/java/develop/OpenAutoMicTable.java index 6340cfa28..1501586d5 100644 --- a/src/test/java/develop/OpenAutoMicTable.java +++ b/src/test/java/develop/OpenAutoMicTable.java @@ -29,6 +29,7 @@ package develop; import net.imagej.ImageJ; +import org.embl.mobie.command.open.OpenTableCommand; import org.embl.mobie.lib.transform.GridType; import java.io.File; @@ -40,7 +41,7 @@ public static void main( String[] args ) final ImageJ imageJ = new ImageJ(); imageJ.ui().showUI(); - OpenTableAdvancedCommand command = new OpenTableAdvancedCommand(); + OpenTableCommand command = new OpenTableCommand(); //command.table = new File( "/Volumes/almf/group/Aliaksandr/User_data/Furlong_CrispR/test_data_20231018/20231004/20231004-172458/summary_calculated1.txt" ); //command.table = new File( "/Volumes/almf/group/Aliaksandr/User_data/Furlong_CrispR/test_data_20231018/20231004/20231004-172458/summary_calculated1_subset.txt" ); command.table = new File( "/Users/tischer/Desktop/teresa/summary_calculated1_subset.txt" ); @@ -48,7 +49,7 @@ public static void main( String[] args ) //command.images = "Result.Image.Zarr"; // Result.Image.Zarr command.root = command.table.getParentFile(); command.images = "FileName_Result.Image_IMG"; // Result.Image.Zarr - command.gridType = GridType.Transformed; // FIXME: not working with Stitched! + command.gridType = GridType.Transformed; command.run(); } } diff --git a/src/test/java/projects/muscle_patterning_drosophila/OpenTeresaData.java b/src/test/java/projects/muscle_patterning_drosophila/OpenTeresaData.java index 35344ba40..6810024bc 100644 --- a/src/test/java/projects/muscle_patterning_drosophila/OpenTeresaData.java +++ b/src/test/java/projects/muscle_patterning_drosophila/OpenTeresaData.java @@ -29,6 +29,7 @@ package projects.muscle_patterning_drosophila; import net.imagej.ImageJ; +import org.embl.mobie.command.open.OpenTableCommand; import org.embl.mobie.lib.transform.GridType; import java.io.File; @@ -40,7 +41,7 @@ public static void main( String[] args ) final ImageJ imageJ = new ImageJ(); imageJ.ui().showUI(); - OpenTableAdvancedCommand command = new OpenTableAdvancedCommand(); + OpenTableCommand command = new OpenTableCommand(); //command.table = new File( "/Volumes/almf/group/Aliaksandr/User_data/Furlong_CrispR/test_data_20231018/20231004/20231004-172458/summary_calculated1.txt" ); //command.table = new File( "/Volumes/almf/group/Aliaksandr/User_data/Furlong_CrispR/test_data_20231018/20231004/20231004-172458/summary_calculated1_subset.txt" ); command.table = new File( "/Users/tischer/Desktop/teresa/summary_calculated1_subset.txt" );