diff --git a/pom.xml b/pom.xml
index 94c4822e9..470d92e97 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,7 +88,7 @@
0.7.0
0.9.0
- 9.1.2
+ 9.1.3
1.0.2
16.0.2
diff --git a/src/main/java/org/embl/mobie/command/context/BigWarpRegistrationCommand.java b/src/main/java/org/embl/mobie/command/context/BigWarpRegistrationCommand.java
index 8ffba857c..2bfbe9342 100644
--- a/src/main/java/org/embl/mobie/command/context/BigWarpRegistrationCommand.java
+++ b/src/main/java/org/embl/mobie/command/context/BigWarpRegistrationCommand.java
@@ -34,6 +34,7 @@
import bdv.viewer.SourceAndConverter;
import bdv.viewer.TransformListener;
import bigwarp.BigWarp;
+import bigwarp.transforms.BigWarpTransform;
import jj2000.j2k.codestream.HeaderInfo;
import org.embl.mobie.command.CommandConstants;
import org.embl.mobie.lib.transform.TransformHelper;
@@ -115,7 +116,7 @@ public void launchBigWarp()
final AffineTransform3D normalisedViewerTransform = TransformHelper.createNormalisedViewerTransform( bdvHandle.getViewerPanel() );
applyViewerTransform( normalisedViewerTransform, bigWarp.getViewerFrameQ().getViewerPanel() );
applyViewerTransform( normalisedViewerTransform, bigWarp.getViewerFrameP().getViewerPanel() );
- bigWarp.setTransformType( TransformTypeSelectDialog.AFFINE );
+ bigWarp.setTransformType( BigWarpTransform.AFFINE );
bigWarp.addTransformListener( this );
}
@@ -136,9 +137,9 @@ public void cancel()
public void transformChanged( InvertibleRealTransform transform )
{
final String transformType = bigWarp.getTransformType();
- if ( transformType.equals( TransformTypeSelectDialog.TPS ) )
+ if ( transformType.equals( BigWarpTransform.TPS ) )
{
- System.err.println( TransformTypeSelectDialog.TPS + "is currently not supported by MoBIE please choose any of the other transform types by selecting one of the BigWarp windows and pressing F2.");
+ System.err.println( BigWarpTransform.TPS + "is currently not supported by MoBIE please choose any of the other transform types by selecting one of the BigWarp windows and pressing F2.");
}
}
diff --git a/src/test/java/examples/CreateMoBIEProject.java b/src/test/java/examples/CreateMoBIEProject.java
new file mode 100644
index 000000000..453a7ea8d
--- /dev/null
+++ b/src/test/java/examples/CreateMoBIEProject.java
@@ -0,0 +1,47 @@
+package examples;
+
+import ij.IJ;
+import ij.ImagePlus;
+import net.imagej.ImageJ;
+import net.imglib2.realtransform.AffineTransform3D;
+import org.embl.mobie.command.open.project.OpenMoBIEProjectCommand;
+import org.embl.mobie.io.ImageDataFormat;
+import org.embl.mobie.lib.create.ProjectCreator;
+
+import java.io.File;
+import java.io.IOException;
+
+public class CreateMoBIEProject
+{
+ public static void main( String[] args ) throws IOException
+ {
+ // Init the project
+ // Please CHANGE the below path to point to location on your computer
+ String projectPath = "/Users/tischer/Documents/mobie-viewer-fiji/src/test/resources/test-project";
+
+ ProjectCreator creator = new ProjectCreator( new File( projectPath ) );
+ creator.getDatasetsCreator().addDataset(
+ "dataset",
+ false // say whether the data is only 2D (false = 3D)
+ );
+
+ // Add one image
+ ImagePlus imagePlus = IJ.openImage( "http://imagej.net/images/mri-stack.zip" );
+ creator.getImagesCreator().addImage(
+ imagePlus,
+ "MRI",
+ "dataset",
+ ProjectCreator.ImageType.Image,
+ new AffineTransform3D(),
+ "views",
+ false, // view is exclusive
+ true // overwrite
+ );
+
+ // Open the project to check whether it worked
+ new ImageJ().ui().showUI();
+ OpenMoBIEProjectCommand openMoBIE = new OpenMoBIEProjectCommand();
+ openMoBIE.uri = creator.getProjectLocation().getAbsolutePath();
+ openMoBIE.run();
+ }
+}
diff --git a/src/test/resources/collections/Opening images for image analysis through MoBIE.docx b/src/test/resources/collections/Opening images for image analysis through MoBIE.docx
deleted file mode 100644
index a0cf06ba8..000000000
Binary files a/src/test/resources/collections/Opening images for image analysis through MoBIE.docx and /dev/null differ
diff --git a/src/test/resources/test-project/dataset/dataset.json b/src/test/resources/test-project/dataset/dataset.json
new file mode 100644
index 000000000..d8d060c44
--- /dev/null
+++ b/src/test/resources/test-project/dataset/dataset.json
@@ -0,0 +1,70 @@
+{
+ "is2D": false,
+ "defaultLocation": {
+ "position": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "timepoint": 0
+ },
+ "sources": {
+ "MRI": {
+ "image": {
+ "imageData": {
+ "ome.zarr": {
+ "relativePath": "images/MRI.ome.zarr"
+ }
+ }
+ }
+ }
+ },
+ "views": {
+ "MRI": {
+ "uiSelectionGroup": "views",
+ "sourceDisplays": [
+ {
+ "imageDisplay": {
+ "sources": [
+ "MRI"
+ ],
+ "color": "r255-g255-b255-a255",
+ "contrastLimits": [
+ 0.0,
+ 255.0
+ ],
+ "showImagesIn3d": false,
+ "invert": false,
+ "name": "MRI",
+ "opacity": 1.0,
+ "visible": true
+ }
+ }
+ ],
+ "isExclusive": false
+ },
+ "default": {
+ "uiSelectionGroup": "bookmark",
+ "sourceDisplays": [
+ {
+ "imageDisplay": {
+ "sources": [
+ "MRI"
+ ],
+ "color": "r255-g255-b255-a255",
+ "contrastLimits": [
+ 0.0,
+ 255.0
+ ],
+ "showImagesIn3d": false,
+ "invert": false,
+ "name": "MRI",
+ "opacity": 1.0,
+ "visible": true
+ }
+ }
+ ],
+ "isExclusive": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/.zattrs b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/.zattrs
new file mode 100644
index 000000000..a11aea9e8
--- /dev/null
+++ b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/.zattrs
@@ -0,0 +1 @@
+{"multiscales":[{"name":"","type":"Average","version":"0.4","axes":[{"type":"space","name":"z","unit":"pixel"},{"type":"space","name":"y","unit":"pixel"},{"type":"space","name":"x","unit":"pixel"}],"datasets":[{"path":"s0","coordinateTransformations":[{"scale":[1.0,1.0,1.0],"type":"scale"},{"translation":[0.0,0.0,0.0],"type":"translation"}]}],"coordinateTransformations":[]}]}
\ No newline at end of file
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/.zgroup b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/.zgroup
new file mode 100644
index 000000000..c71fe9d0b
--- /dev/null
+++ b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/.zgroup
@@ -0,0 +1 @@
+{"zarr_format":2}
\ No newline at end of file
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/.zarray b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/.zarray
new file mode 100644
index 000000000..2aeba983f
--- /dev/null
+++ b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/.zarray
@@ -0,0 +1 @@
+{"zarr_format":2,"shape":[27,226,186],"chunks":[96,96,96],"dtype":"|u1","compressor":{"id":"gzip","level":-1},"fill_value":0,"filters":[],"order":"C","dimension_separator":"/"}
\ No newline at end of file
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/.zattrs b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/.zattrs
new file mode 100644
index 000000000..463fae2a9
--- /dev/null
+++ b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/.zattrs
@@ -0,0 +1 @@
+{"path":"s0","axes":[{"type":"space","name":"x","unit":"pixel"},{"type":"space","name":"y","unit":"pixel"},{"type":"space","name":"z","unit":"pixel"}],"coordinateTransformations":[{"scale":[1.0,1.0,1.0],"type":"scale"},{"translation":[0.0,0.0,0.0],"type":"translation"}]}
\ No newline at end of file
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/0/0 b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/0/0
new file mode 100644
index 000000000..b10aae8d6
Binary files /dev/null and b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/0/0 differ
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/0/1 b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/0/1
new file mode 100644
index 000000000..c2c9120fb
Binary files /dev/null and b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/0/1 differ
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/1/0 b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/1/0
new file mode 100644
index 000000000..04bec0985
Binary files /dev/null and b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/1/0 differ
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/1/1 b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/1/1
new file mode 100644
index 000000000..d28b33d28
Binary files /dev/null and b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/1/1 differ
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/2/0 b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/2/0
new file mode 100644
index 000000000..5dc010f00
Binary files /dev/null and b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/2/0 differ
diff --git a/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/2/1 b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/2/1
new file mode 100644
index 000000000..147e329b8
Binary files /dev/null and b/src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/0/2/1 differ
diff --git a/src/test/resources/test-project/project.json b/src/test/resources/test-project/project.json
new file mode 100644
index 000000000..1a055e995
--- /dev/null
+++ b/src/test/resources/test-project/project.json
@@ -0,0 +1,8 @@
+{
+ "datasets": [
+ "dataset"
+ ],
+ "defaultDataset": "dataset",
+ "specVersion": "0.3.0",
+ "references": []
+}
\ No newline at end of file
diff --git a/test-project/dataset/dataset.json b/test-project/dataset/dataset.json
new file mode 100644
index 000000000..1f7f6ce34
--- /dev/null
+++ b/test-project/dataset/dataset.json
@@ -0,0 +1,13 @@
+{
+ "is2D": false,
+ "defaultLocation": {
+ "position": [
+ 0.0,
+ 0.0,
+ 0.0
+ ],
+ "timepoint": 0
+ },
+ "sources": {},
+ "views": {}
+}
\ No newline at end of file
diff --git a/test-project/dataset/images/MRI.ome.zarr/.zattrs b/test-project/dataset/images/MRI.ome.zarr/.zattrs
new file mode 100644
index 000000000..a11aea9e8
--- /dev/null
+++ b/test-project/dataset/images/MRI.ome.zarr/.zattrs
@@ -0,0 +1 @@
+{"multiscales":[{"name":"","type":"Average","version":"0.4","axes":[{"type":"space","name":"z","unit":"pixel"},{"type":"space","name":"y","unit":"pixel"},{"type":"space","name":"x","unit":"pixel"}],"datasets":[{"path":"s0","coordinateTransformations":[{"scale":[1.0,1.0,1.0],"type":"scale"},{"translation":[0.0,0.0,0.0],"type":"translation"}]}],"coordinateTransformations":[]}]}
\ No newline at end of file
diff --git a/test-project/dataset/images/MRI.ome.zarr/.zgroup b/test-project/dataset/images/MRI.ome.zarr/.zgroup
new file mode 100644
index 000000000..c71fe9d0b
--- /dev/null
+++ b/test-project/dataset/images/MRI.ome.zarr/.zgroup
@@ -0,0 +1 @@
+{"zarr_format":2}
\ No newline at end of file
diff --git a/test-project/dataset/images/MRI.ome.zarr/s0/.zarray b/test-project/dataset/images/MRI.ome.zarr/s0/.zarray
new file mode 100644
index 000000000..2aeba983f
--- /dev/null
+++ b/test-project/dataset/images/MRI.ome.zarr/s0/.zarray
@@ -0,0 +1 @@
+{"zarr_format":2,"shape":[27,226,186],"chunks":[96,96,96],"dtype":"|u1","compressor":{"id":"gzip","level":-1},"fill_value":0,"filters":[],"order":"C","dimension_separator":"/"}
\ No newline at end of file
diff --git a/test-project/dataset/images/MRI.ome.zarr/s0/.zattrs b/test-project/dataset/images/MRI.ome.zarr/s0/.zattrs
new file mode 100644
index 000000000..463fae2a9
--- /dev/null
+++ b/test-project/dataset/images/MRI.ome.zarr/s0/.zattrs
@@ -0,0 +1 @@
+{"path":"s0","axes":[{"type":"space","name":"x","unit":"pixel"},{"type":"space","name":"y","unit":"pixel"},{"type":"space","name":"z","unit":"pixel"}],"coordinateTransformations":[{"scale":[1.0,1.0,1.0],"type":"scale"},{"translation":[0.0,0.0,0.0],"type":"translation"}]}
\ No newline at end of file
diff --git a/test-project/dataset/images/MRI.ome.zarr/s0/0/0/0 b/test-project/dataset/images/MRI.ome.zarr/s0/0/0/0
new file mode 100644
index 000000000..b10aae8d6
Binary files /dev/null and b/test-project/dataset/images/MRI.ome.zarr/s0/0/0/0 differ
diff --git a/test-project/dataset/images/MRI.ome.zarr/s0/0/0/1 b/test-project/dataset/images/MRI.ome.zarr/s0/0/0/1
new file mode 100644
index 000000000..c2c9120fb
Binary files /dev/null and b/test-project/dataset/images/MRI.ome.zarr/s0/0/0/1 differ
diff --git a/test-project/dataset/images/MRI.ome.zarr/s0/0/1/0 b/test-project/dataset/images/MRI.ome.zarr/s0/0/1/0
new file mode 100644
index 000000000..04bec0985
Binary files /dev/null and b/test-project/dataset/images/MRI.ome.zarr/s0/0/1/0 differ
diff --git a/test-project/dataset/images/MRI.ome.zarr/s0/0/1/1 b/test-project/dataset/images/MRI.ome.zarr/s0/0/1/1
new file mode 100644
index 000000000..d28b33d28
Binary files /dev/null and b/test-project/dataset/images/MRI.ome.zarr/s0/0/1/1 differ
diff --git a/test-project/dataset/images/MRI.ome.zarr/s0/0/2/0 b/test-project/dataset/images/MRI.ome.zarr/s0/0/2/0
new file mode 100644
index 000000000..5dc010f00
Binary files /dev/null and b/test-project/dataset/images/MRI.ome.zarr/s0/0/2/0 differ
diff --git a/test-project/dataset/images/MRI.ome.zarr/s0/0/2/1 b/test-project/dataset/images/MRI.ome.zarr/s0/0/2/1
new file mode 100644
index 000000000..147e329b8
Binary files /dev/null and b/test-project/dataset/images/MRI.ome.zarr/s0/0/2/1 differ
diff --git a/test-project/project.json b/test-project/project.json
new file mode 100644
index 000000000..1a055e995
--- /dev/null
+++ b/test-project/project.json
@@ -0,0 +1,8 @@
+{
+ "datasets": [
+ "dataset"
+ ],
+ "defaultDataset": "dataset",
+ "specVersion": "0.3.0",
+ "references": []
+}
\ No newline at end of file