We're Hiring!

Export planes in parallel threads

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

Export planes in parallel threads

Postby romainGuiet » Wed Jun 28, 2017 6:59 am

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
romainGuiet
 
Posts: 5
Joined: Wed May 10, 2017 12:30 pm

Re: Export planes in parallel threads

Postby dgault » Thu Jun 29, 2017 12:04 pm

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
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm

Re: Export planes in parallel threads

Postby romainGuiet » Mon Aug 07, 2017 6:29 am

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
romainGuiet
 
Posts: 5
Joined: Wed May 10, 2017 12:30 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest

cron