Skip to content

Commit

Permalink
Improve opening OME-Zarr files as a grid view
Browse files Browse the repository at this point in the history
  • Loading branch information
tischi committed Jun 7, 2024
1 parent eedee2a commit 6bed6f9
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/embl/mobie/lib/MoBIEHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/develop/OpenAutoMicTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -40,15 +41,15 @@ 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" );
//command.table = new File( "/Volumes/cba/exchange/furlong_test/summary_calculated1_subset_zarr.txt" );
//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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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" );
Expand Down

0 comments on commit 6bed6f9

Please sign in to comment.