Skip to content

Commit

Permalink
Add ome_zarr_open_java.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tischi committed Sep 23, 2024
1 parent f271d6a commit 7c9afcd
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _includes/ome_tiff/lif2ometiff.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h4 id=lif2ometiff><a href=#lif2ometiff>Convert LIF to OME-TIFF</a></h4>
<h4 id="lif2ometiff"><a href="lif2ometiff">Convert LIF to OME-TIFF</a></h4>

- Download the Leica image file [image.lif](https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_xyc__two_images.lif)
- Open the file
Expand Down
6 changes: 6 additions & 0 deletions _includes/ome_zarr/ome_zarr_open_java.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<h4 id="ome-zarr-open-java"><a href="ome-zarr-open-java">Open OME-Zarr in Java ecosystem</a></h4>

Open OME-Zarr data in the Java ecosystem.

- Intensity multi-scale image: `https://s3.embl.de/i2k-2020/platy-raw.ome.zarr`
- Label mask multi-scale image: `https://s3.embl.de/i2k-2020/platy-raw.ome.zarr/labels`
17 changes: 17 additions & 0 deletions _includes/ome_zarr/ome_zarr_open_java_mobie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- [Run Fiji with MoBIE](https://github.com/mobie/mobie-viewer-fiji#install)
- Open OME-Zarr from S3 in BigDataViewer:
- `[ Plugins › BigDataViewer › OME ZARR › Open OME ZARR From S3... ]`
- `S3 URL`: Choose one of the above example URLs
- [X] Log chunk loading
- Examine the IJ Log window to see:
- image scale levels
- transformations from data space to global space
- One OME-Zarr URL may contain multiple images, you can toggle them on and off:
- BDV: Press `P` and use the `active` checkbox
- Examine multi-scale chunk loading:
- `[ Fiji > Window > Console ]`
- Move around to load different chunks, e.g.:
- BDV: `Mouse scroll` to move along the current viewing axis
- BDV: `Shift x` to view along the x-axis.
- Zoom in to load higher resolution data:
- BDV: `Arrow up`
2 changes: 1 addition & 1 deletion _includes/table_file_formats/ParquetTableSaw.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import tech.tablesaw.api.IntColumn;
import tech.tablesaw.api.Table;

public class ExploreTableSawParquet
public class ParquetTableSaw
{
public static void main( String[] args )
{
Expand Down
19 changes: 18 additions & 1 deletion _modules/big_image_file_formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concept_map: >
C --- LL("Lazy loading")
figure: /figures/big_image_file_formats.png
figure_legend: "Big image data formats typically support flexible chunking of data and resolution pyramids. Chunking enables fast loading of image subregions. Resolution pyramids enable fast preview of the data when being zoomed out."
figure_legend: "Big image data formats typically support flexible chunking of data and resolution pyramids. Chunking enables efficient loading of image subregions. Resolution pyramids prevent loading useless details when being zoomed out."

multiactivities:
- ["big_image_file_formats/lazy_load_tiff_stack.md", [["ImageJ GUI", "big_image_file_formats/lazy_load_tiff_stack_imagej_gui.md"]]]
Expand Down Expand Up @@ -61,5 +61,22 @@ assessment: >
learn_next:

external_links:

---

### Analogy of big image data with Google Maps

When thinking about big image data it is helpful to think about Google Maps. There, you often don't want to see the whole image (planet earth) but rather zoom in on a region (e.g., country). And, if you are zoomed out (e.g., on a continent) you don't care about seeing individual houses in a city; in fact, your computer monitor would not have enough pixels do display all these details while still showing a whole continent, and it would probably not have enough memory to even download all this data.

Thus, to offer you a smooth experience, Google Maps **lazy loads** only the part of the world (**chunk**) that you currently look at, at an **resolution level** that is approriate for the number of pixels of your viewing device (phone or computer monitor).

### Chunking

The efficiency with which parts (chunks) of image data can be loaded from your hard disk into your computer memory depends on how the image data is layed out (chunked) on the hard disk. This is a longer, very technical, discussion and what is most optimal probably also depends on the exact storage medium that you are using. Essentially, you want to have the size of your chunks small enough such that your hardware can load one chunk very fast, but you also want the chunks big enough in order to minimise the number of chunks that you need to load. The reason for the latter is that for each chunk your software has to tell your computer "please go and load this chunk", which in itself takes time even if the chunk is very small. Thus, big image data formats typically offer you to choose the chunking such that you can optimise it for your hardware and access patterns.

### Resolution pyramids

TODO



2 changes: 1 addition & 1 deletion _modules/ome_tiff.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concept_map: >
T("TIFF") --- I("Image data and metadata")
T --- P("Planar image data model")
T --- V("Variants exist")
V --- OT("OME-TIFF is an important variant)
V --- OT("OME-TIFF is an important variant")
figure: /figures/tiff.png
figure_legend: TODO
Expand Down
1 change: 1 addition & 0 deletions _modules/ome_zarr.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +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_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
Binary file modified figures/big_image_file_formats.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 not shown.

0 comments on commit 7c9afcd

Please sign in to comment.