Describe converting MRC images to OME-NGFF (zarr) #210
Replies: 6 comments
-
The bioformats2raw tool is recommended for direct converting the mrc files to the OME-NGFF zarr pyramid format supported by Neuroglancer. Note neuroglancer support signed 16 and 8 bit pixel types in zarr so that conversion is also no longer needed. The following is the recommended command line for 2D MRC files:
The compression properties were selected based to the reported performance of images of noise from this paper. . This choice follows the recommendation of the conclusion. edit: updated the tile recommendation to be 512x512. If the pixel type is 16-bit that would make each chunk 512KB |
Beta Was this translation helpful? Give feedback.
-
The spec for OME-NGFF is here: |
Beta Was this translation helpful? Give feedback.
-
For 3D Tomogram MRC files the input will need to converted with bioformats2raw. For 3D visualization in neuroglancer the zarr chunks should be 3D (XYZ) to allow for smooth scrolling and cross section visualization. These chunks should be about 1MB is size to be efficiently downloaded and processed in neuroglancer. The bioformats2raw only resamples in XY. The tomograms pixels are mostly in XY, and the recommended chunk size is 256,256,64 (XYZ). The zarr_build_multiscales will reuse the same chunk size as the full resolution image, and shrink the dimensions in XYZ.
The chunk size could be optimized depending on the size of the minimum dimension to ensure the chunk size if ~1MB. edit: update to use build multiscales |
Beta Was this translation helpful? Give feedback.
-
For 3D FIBSIM MRC files the input will need to converted with bioformats2raw. The current pixel type is For the same reasons for 3D tomograms zarr_build_multiscales will be used. The FIBSIM number of pixels and be large in XYZ, and the current recommendation for isotropic chunking of 128,128,128.
The chunk size could be optimized depending on the size of the minimum dimension to ensure the chunk size if ~1MB. Also note that the above only differs from the tomogram command by the recommended chunk size. |
Beta Was this translation helpful? Give feedback.
-
A note on parrallization and multithreading. These processes seem to scale well up to 8 CPUs, and some improvements with 16 on sample data sets. The custom pytools commands such as bioformats2raw defaults to 4 cores, and does not autodetect the system. The number of threads to be used can be explicitly specified with the max_workers command line argument. e.g. |
Beta Was this translation helpful? Give feedback.
-
A note on |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions