Page 1 of 1

Export planes in parallel threads

PostPosted: Wed Jun 28, 2017 6:59 am
by romainGuiet
Dear OME community,

I'm writing a java plugin for ImageJ to process large dataset (from Lightsheet), and it uses parallel threads for the processing of the individual planes. The output images should be saved, ideally in parallel (for the sake of time).
So Far, I tested to:
1- export individual tif files (for each series/c/z/t)
2- use Bio-Formats to export different file formats : ics, ome.tif, one.btf, ch5.

If the 1st method is the safest and fastest (so far) I can't prevent losing voxel depth information.
Regarding 2nd method, it seems that only the ch5 format is safe to write into a single file in parallel BUT I could'nt find a way (yet) to add physicalpixelsize to the metadata (or when the image is reload)

Would you have any suggestions regarding which other file format I should use/try ?
or how can I add physicalpixelsize to ch5 metadata and read it back?

Romain

Re: Export planes in parallel threads

PostPosted: Thu Jun 29, 2017 12:04 pm
by dgault
Hi Romain,

One possible suggestion that would combine your 2 options would be to store multiple OME TIFF datasets alongside a single companion XML containing the metadata. Having the metadata written to a companion file can be achieved by setting the ometiff.companion option. For more details you can see the writer options in https://www.openmicroscopy.org/site/sup ... tions.html

An example of such a dataset would be http://downloads.openmicroscopy.org/ima ... companion/, and for an example of writing to multiple files you can see https://www.openmicroscopy.org/site/sup ... xport.html

Just as a side note for thread safety in the writers. Although Bio-Formats as a whole is not thread safe, for any TIFF based format large portions of the writer, essentially any operations writing to the file, will be synchronised. This is certainly not the optimal solution but does provide a level of safety for the actual file writing operations.

Lastly for storing the physical size in ch5 metadata, unfortunately it doesn't look like the CH5Writer currently supports this field. A good indication of what metadata fields are supported can be found in the supported formats documentation https://www.openmicroscopy.org/site/sup ... mmary.html (the writer metadata is not listed but it should generally align with what is supported in the associated reader)

David Gault

Re: Export planes in parallel threads

PostPosted: Mon Aug 07, 2017 6:29 am
by romainGuiet
Hi David,
Thank you for your reply, I realized that I never got back to you... I'm really sorry for the long delay of my answer.
For the moment, I'll stick to the basic ImageJ tif writing which seems to be the fastest option.

Thank you again for your fast answer,
Cheers,
Romain