viv icon indicating copy to clipboard operation
viv copied to clipboard

Add support for loading stacked TIFFs and MIBI TIFFs.

Open rj3d opened this issue 3 years ago • 3 comments

User story Some of my images take the form of generic stacked TIFFs where each channel is a plane in the stack. It would be nice to be able to visualize these images with Viv and (possibly) Avivator.

Additionally, some of my images take the form of MIBI TIFFs. MIBI TIFFs are very similar to generic stacked TIFFs with the notable exception being a standard JSON metadata string in each plane's image description. MIBI TIFFs are not tiled, but can contain C, T, and Z stacks.

Preferred solution I can imagine adding this in fashion similar to the multi-tiff loader where the user provides metadata about the images being passed in. In this case, when a user would load a stacked tiff, they would also need to pass in an array of OmeTiffSelections where the nth element in the array corresponds to the nth image in the stack.

For MIBI TIFFs, Viv could parse the image descriptions and generate metadata to load the image with the generic stacked tiff loader.

rj3d avatar Aug 31 '22 20:08 rj3d

I am not totally clear what you are asking for here - if you are asking for a MIBI TIFF loader, I don't think we would want to maintain that. We want to avoid reproducing bioformats in the browser and one can convert MIBI TIFF to OME TIFF pretty easily. Also, if I am not mistaken, the multi-tiff loader should allow one to build this with not so much code. I guess if this is the ask, I'm having trouble seeing why it needs to be in Viv's core - you could make a new repo for it! Or maybe it and other community-supported loaders!

If you are asking for a feature that would enable someone to build this, and we are missing this feature, I am not sure I understand what we are missing from your description.

Let us know!

ilan-gold avatar Sep 06 '22 17:09 ilan-gold

That makes sense to not want to support every TIFF format. I'd be happy to build a MIBI TIFF loader as a custom loader, but I was also asking for a feature that would enable me to easily add a MIBI TIFF loader.

MIBI TIFFs are structured as one single TIFF file containing a stack of multiple images where each image could be a C, Z, or T slice. The multi-tiff loader only supports loading multiple TIFF files each containing one image, and it doesn't currently support single TIFF files that contain multiple images. I think a generic stacked-tiff loader where a user could pass in any stacked TIFF and an object with metadata for each image in the stack (i.e. channel name, C, Z, and T) would simplify building custom loaders for formats that make use of stacked TIFFs. If you don't want to have a loader specifically for this use case, the multi-tiff loader could be extended to support stacked TIFFs in addition to flat TIFFs.

Hopefully this is clear! Let me know what you think

rj3d avatar Sep 07 '22 04:09 rj3d

Ah ok i see now - yes i think extending the current implementation works then! I think there are other use cases for this as well so this would be great!

ilan-gold avatar Sep 07 '22 17:09 ilan-gold

Added in #641

rj3d avatar Oct 28 '22 19:10 rj3d