Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using TIFF Stacks as a Self-Contained Single File Relight Output Format #63

Open
ruven opened this issue Oct 25, 2023 · 2 comments
Open

Comments

@ruven
Copy link
Contributor

ruven commented Oct 25, 2023

It would be useful to be able to sometimes export the relight output folder (info.json + planes) into in a single self-contained image format. I added support in IIPImage in the last release for TIFF image stacks, which can provide a practical way to store the different image planes as well as the info.json metadata in a single file.

Essentially, the various planes can be stored as pages within a multi-page TIFF with the info.json embedded in a metadata field (I've used the TIFF XMP field, but this could also be in the TIFF image description field). The different resolution levels are stored within the TIFF using SubIFDs instead of top-level IFDs. This follows the way the OME-TIFF standard works in the whole-slide microscopy field.

The IIPImage server allows you access any plane through the SDS parameter, for example FIF=rti.tif&SDS=3&JTL=0,0 for plane 3. The info.json can be obtained from the XMP field using OBJ=xmp: FIF=rti.tif&OBJ=xmp.

I've made a pull request (#62) that adds a python script for creating an image stack from a relight output folder and updates the relight.js javascript to simplify the existing iip layout code and add support for image stacks. This makes using IIPImage with relight much easier as the you no longer need separate url and path variables or need to make your info.json file available on a separate URL.

Let me know what you think about this approach!

@ponchio
Copy link
Contributor

ponchio commented Nov 7, 2023

Hi Ruven,
this looks like a good solution, I am going to propose it in the IIIF 2.5D Workgroup which is being formed right now. (see IIIF Slack), as an additional format.
I will port this change to OpenLIME (https://github.com/cnr-isti-vclab/openlime), where I have moved the development of the RTI viewer (and other 2.5D datasets).

Thanks,

Federico

@ruven
Copy link
Contributor Author

ruven commented Nov 7, 2023

Hi Frederico,

Yes, I've joined the 2.5D working group. For IIIF through IIPImage, I've added the ability to define a page delimiter so that you can specify which page or slice you want from your image stack. This, however, is not part of the official IIIF spec. The relight json information would then need to be included as an extension either within the image API info.json or through the presentation API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants