Glencoe has released a statement regarding the conversion of complex formats to pyramidal ome.tiff
== The full post is here ==
https://www.glencoesoftware.com/blog/2019/12/09/converting-whole-slide-images-to-OME-TIFF.html
== Workflow Summary ==
The Glencoe protocol describes a two-step process.
1. Convert vendor data to 'raw' data using `bioformats2raw`
2. Convert 'raw' data to ome.tiff using `raw2ometiff`
The need for the two separate protocols seems to stem from licensing and dependencies on separate vendor-specific libraries.
== Advantages ==
All reading and writing is streamed to the disk in parallel, making this the fastest conversion tool available. On a test with one RGB dataset in .mrxs format, it went from ~4h using KHEOPS to about 10 minutes using these two tools.
== Installation ==
NOTE: Because this protocol makes use of very modern file storage and compression systems, there is a dependency on a tool called `c-blosc`, and there is some compilation to do.
=== Installing `c-blosc` ===
NOTE: If you followed the StarDist with gpu-tools installation, you have all the prerequisites except for CMake. Otherwise please follow the installation of the [[ bioimaging_and_optics_platform_biop/computers-servers/software/gpu-deep-learning/#stardist-prerequisites | StarDist Prerequisites ]]
1. Clone https://github.com/Blosc/c-blosc
2. Create a folder in your `C:\` drive called `Dev Tools`
2. Open a command line and do the following
```
cd c-blosc
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="C:\Dev Tools"
cmake --build . --target install
```
=== Installing `bioformats2raw` ===
Unzip this somewhere
https://github.com/glencoesoftware/bioformats2raw/releases
=== Installing `raw2ometiff` ===
Unzip this somewhere
https://github.com/glencoesoftware/raw2ometiff/releases
=== Adding to the PATH ===
Add the unzipped `bin` folder to your path so you can call these two functions from anywhere
== Using This workflow ==
Example: Dataset called `D:\ToConvert\Kidney.mrxs` which is RGB
```
bioformats2raw.bat --resolutions=4 D:\ToConvert\Kidney.mrxs D:\ToConvert\Kidney
```
Other arguments are available with bioformats2raw.bat --help
Converting to OME.TIFF
```
raw2ome.tiff --compression="JPEG-2000" --rgb D:\ToConvert\kidney D:\ToConvert\Kidney.ome.tiff
```
IMPORTANT: RGB images must be explictely concerted using the `--rgb` flag. Otherwise it will be a 3 channel image.