-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example code for creating a MOBIE project
- Loading branch information
Showing
28 changed files
with
159 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
} |
Binary file removed
BIN
-1.46 MB
src/test/resources/collections/Opening images for image analysis through MoBIE.docx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
src/test/resources/test-project/dataset/images/MRI.ome.zarr/.zattrs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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":[]}]} |
1 change: 1 addition & 0 deletions
1
src/test/resources/test-project/dataset/images/MRI.ome.zarr/.zgroup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"zarr_format":2} |
1 change: 1 addition & 0 deletions
1
src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/.zarray
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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":"/"} |
1 change: 1 addition & 0 deletions
1
src/test/resources/test-project/dataset/images/MRI.ome.zarr/s0/.zattrs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"}]} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"datasets": [ | ||
"dataset" | ||
], | ||
"defaultDataset": "dataset", | ||
"specVersion": "0.3.0", | ||
"references": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"is2D": false, | ||
"defaultLocation": { | ||
"position": [ | ||
0.0, | ||
0.0, | ||
0.0 | ||
], | ||
"timepoint": 0 | ||
}, | ||
"sources": {}, | ||
"views": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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":[]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"zarr_format":2} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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":"/"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"}]} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"datasets": [ | ||
"dataset" | ||
], | ||
"defaultDataset": "dataset", | ||
"specVersion": "0.3.0", | ||
"references": [] | ||
} |