Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ome zarr #732

Merged
merged 7 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions _includes/ome_zarr/ome_zarr_open_java_n5-ij-viewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<style>
body {
font-size: 20px !important;
}
h3 {
font-size: 24px !important;
}
h4 {
font-size: 22px !important;
}
</style>

### Open a remote OME-Zarr in Fiji
- Open the n5-ij in Fiji via:
- `[ File > Import > HDF5/N5/Zarr/OME-NGFF ... ]`<br><br>

- In the window that opens, paste the following path in the uri space:
- `https://s3.embl.de/ome-zarr-course/data/commons/xyz_8bit_calibrated__fib_sem_crop.ome.zarr`<br><br>

- Then click `Detect datasets` button as shown below:
<img src="{{ site.baseurl }}/figures/n5-ij/detect_datasets.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

- The tool will display a multiscales schema with two datasets in the dialog box.
Select one of the datasets as shown below and click OK:
<img src="{{ site.baseurl }}/figures/n5-ij/select_dataset1.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

- This will open the dataset in Fiji as a normal Fiji image (see below).
<img src="{{ site.baseurl }}/figures/n5-ij/opened_dataset1.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

<h3>Open a subset of a remote OME-Zarr in Fiji</h3>
- Follow the same steps above do select a dataset but instead of directly opening the dataset,
click the crop button in the window before clicking OK as shown below: <br>
<img src="{{ site.baseurl }}/figures/n5-ij/select_dataset_and_crop2.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

- In the window that open, select the indices of the subset as shown below: <br>
<img src="{{ site.baseurl }}/figures/n5-ij/select_dataset_and_crop1.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

- When you click OK, the specified subset of the image will be opened as shown below: <br>
<img src="{{ site.baseurl }}/figures/n5-ij/cropped_dataset1.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

### Open a remote OME-Zarr in BigDataViewer

Now let's imagine the dataset you want to open is too large to fit the RAM of your machine.

- Open the n5-viewer in Fiji via:
- `[ Plugins > BigDataViewer > HDF5/N5/Zarr/OME-NGFF Viewer ]`<br><br>

- In the window that opens, paste the following path in the uri space:
- `https://s3.embl.de/i2k-2020/platy-raw.ome.zarr` <br><br>

- Then click `Detect datasets` button as shown below: <br>
<img src="{{ site.baseurl }}/figures/n5-viewer/open_multiscales_detect.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

- The tool will display a multiscales schema with 9 datasets in the dialog box.
In this case, one can either open the individual datasets or the entire pyramid.
To do the latter, click on the multiscale object and then click OK as shown below: <br>
<img src="{{ site.baseurl }}/figures/n5-viewer/open_multiscales_object_effective.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

- This will open the multiscales object in BDV as shown below: <br>
<img src="{{ site.baseurl }}/figures/n5-viewer/opened_multiscales.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

- This is a huge (terabyte-scale) image, which is not amenable to processing as a whole
in Fiji. It is possible, however, to extract subsets of it to Fiji and continue with processing. To do so, follow the steps below:<br><br>

- In the BDV window, open the cropping window via: <br>
`[ Tools > Extract to ImageJ ]` (also see below)

<img src="{{ site.baseurl }}/figures/n5-viewer/extract_dataset.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

- In the cropping window that opens, select the indices of the subset as shown below: <br>
<img src="{{ site.baseurl }}/figures/n5-viewer/extract_dataset_ok.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br>
Note that this step may require incremental rotation of the image and adjustment of the bounding box until
the desired region of interest is obtained. It is also important to check the size of the cropped volume
at the top of the cropping window to make sure that it is not larger than the memory. Once you are fine
with the settings, click OK.
<br><br>
- The output is a standard Fiji image as shown below: <br>
<img src="{{ site.baseurl }}/figures/n5-viewer/extracted_image.png" alt="Detect Datasets" style="display: block; margin: 2px 0;" /><br><br>

Note that this image has been loaded into the RAM; as such, it can be processed like any other
Fiji image and saved to any desired file format.
2 changes: 1 addition & 1 deletion _modules/ome_zarr.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ figure_legend:
multiactivities:
- ["ome_zarr/ome_zarr_inspection.md", [["minio-client", "ome_zarr/ome_zarr_inspection_minio-client.md"], ["ome-zarr-py","ome_zarr/ome_zarr_inspection_ome-zarr-py.md"]]]
- ["ome_zarr/ome_zarr_creation.md", [["BatchConvert", "ome_zarr/ome_zarr_creation_BatchConvert.md"]]]
- ["ome_zarr/ome_zarr_open_java.md", [["Fiji/MoBIE", "ome_zarr/ome_zarr_open_java_mobie.md"]]]
- ["ome_zarr/ome_zarr_open_java.md", [["Fiji/MoBIE", "ome_zarr/ome_zarr_open_java_mobie.md"], ["Fiji/n5-ij-viewer", "ome_zarr/ome_zarr_open_java_n5-ij-viewer.md"]]]
- ["ome_zarr/ome_zarr_visualisation.md", [ ["napari","ome_zarr/ome_zarr_visualisation_napari.md"], ["Fiji/MoBIE", "ome_zarr/ome_zarr_visualisation_s3_mobie.md"], ["Neuroglancer","ome_zarr/ome_zarr_visualisation_s3_neuroglancer.md"], ["vizarr","ome_zarr/ome_zarr_visualisation_s3_vizarr.md"]]]
- ["ome_zarr/ome_zarr_segmentation.md", [["ZarrSeg", "ome_zarr/ome_zarr_segmentation_zseg.md"]]]

Expand Down
203 changes: 203 additions & 0 deletions figures/n5-ij/collection.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-ij/cropped_dataset1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-ij/detect_datasets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-ij/image1-26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-ij/opened_dataset1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-ij/select_dataset1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-ij/select_dataset_and_crop1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-ij/select_dataset_and_crop2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-viewer/extract_dataset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-viewer/extract_dataset_ok.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-viewer/extracted_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-viewer/open_multiscales_detect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/n5-viewer/opened_multiscales.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading