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

Tiff: Add SubIFD tag for faster indexing #8

Open
nclack opened this issue Feb 7, 2023 · 1 comment
Open

Tiff: Add SubIFD tag for faster indexing #8

nclack opened this issue Feb 7, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@nclack
Copy link
Member

nclack commented Feb 7, 2023

Apparently, tifffile will use the SubIFD tag to accelerate sparse operations on images in tiff files. See this gist.

We can:

  1. Add the SubIFD tag to the first IFD.
  2. It should get initialized to something empty.
  3. During acquisition, we can keep track of the offsets to each written ifd.
  4. When the file is closed, append the subifd array to the end of the file and update the original subifd tag at the beginning of the file.

We'll want to confirm:

  1. The file is readable by typical readers using this scheme.
  2. The file is usable even if that final IFD update failed for some reason.
@nclack
Copy link
Member Author

nclack commented Feb 8, 2023

writing a file with tifffile:

im=rand(512,512)
with tifffile.TiffWriter('out.tif',bigtiff=True) as tif:
        for i in range(10):
            tif.write(im,contiguous=True)

and inspecting the contents shows the image description tag as:

{"shape":[10,512,512]}

software tag is set to tifffile.py

No sign of subifds ...

@aliddell aliddell transferred this issue from another repository Jun 20, 2023
@aliddell aliddell added the enhancement New feature or request label Jun 20, 2023
@aliddell aliddell transferred this issue from acquire-project/acquire-driver-common Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants