ome / design

OME Design proposals
http://ome.github.io/design/
1 stars 15 forks source link

Pyramid tiff file for 5 (or more) dimensions? #104

Open petoor opened 4 years ago

petoor commented 4 years ago

Hi.

I'd like to store an image in the following format. (H,W,C,Z,T,P) Where P is the pyramid of the image. However I am unable to do so.

If i look at TeraConverter (https://github.com/abria/TeraStitcher/wiki/TeraConverter) they suggest using a HDF5 file for exactly that. However it seems a bit clumsy to use HDF5 for large images.

Is anything like this possible today already? If not, is it something that is being considered?

Best regards.

joshmoore commented 4 years ago

Hi @petoor.

Would would you like to do in the image once it's stored? i.e. what applications are you looking to access it with? Also, what format is in the image currently in?

With current OME formats, only storing as an OME-TIFF is possible. See https://forum.image.sc/t/converting-whole-slide-images-to-ome-tiff-a-new-workflow/32110 for recently released tools from @glencoesoftware for doing just that.

We're currently investigating the Zarr/N5 formats ourselves. Since BDV has recently added support for N5, that may be one option you want to explore. More information about that is available under https://forum.image.sc/t/next-generation-file-formats-for-bioimaging/31361

All the best, ~Josh

petoor commented 4 years ago

Hi Josh.

Thank you for the reply.

The image does not exist currently, how ever it is rather to generate such an image by using imagej and choose Image -> Hyperstacks -> new hyperstack, here we can choose our 5 dimensions. This hyperstack can also be stored as a tiff file, no problem.

The problem arises when we want the pyramids added to this file. The reason we want to do this is that irregardless of which data we get, a flat huge 2d histopathological image, or an MRI scan, we can save it in a format (tiff) that can accommodate all dimentions irregardless of data origin. This makes it very easy to store in a database.

At the moment it seems that we have to sacrifice both the z and the t dimension in order to store the pyramid dimension in the ome.tiff file.

I'll have a look at the next generation file formats for bioimaging

joshmoore commented 4 years ago

At the moment it seems that we have to sacrifice both the z and the t dimension in order to store the pyramid dimension in the ome.tiff file.

Do you mean, that the pyramid itself is composed of 2D planes? If so, that's correct. The OME-TIFF, however, can be composed of (H,W,C,Z,T) and contain a number of pyramids (or sub resolutions) to cover the entire volume. See https://docs.openmicroscopy.org/bio-formats/6.4.0/developers/wsi.html#pyramids-in-ome-tiff for more information.

petoor commented 4 years ago

Yes we need a pyramid for every z and t dimension in the image.

The pyramids have to be stored somewhere (as a 6'th dimension perhaps?) however, i'm a not able to do this for an image where t, z > 1.

I'll try the bfconvert -noflat option and see if it gives me what i'm after.

joshmoore commented 4 years ago

At least in OME-TIFF, a dimension doesn't need to be used to store pyramids. Instead they are stored in a native TIFF structured (via subIFDs).

Perhaps see http://blog.openmicroscopy.org/file-formats/community/2018/11/29/ometiffpyramid/ for more information.