-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
FEAT: tifffile v3 #914
FEAT: tifffile v3 #914
Conversation
Note to self: This PR needs updating to use |
Thanks for this! When looking through the code, I found a possible inconsistency: in |
@ishr Yes, that's true. I have to dig a bit further into tifffile to see if and how series-level metadata is handled and then update |
Okay, now everything should be implemented and documented. What is still missing is to get full code coverage and then a final review. |
Awesome! It seems like the documentation of |
Oh yes, good catch. The documentation also needs to update to |
@mkcor I know you have been using tifffile a lot, so this might be interesting for you. I've written a v3 plugin for tifffile to expose all its "new" features in ImageIO. Feel free to give it a try and tell me what you think :) The PR is ready and I will merge towards the end of the week unless anything major pops up. |
I'm getting a regression with metadata description field containing XML (Open Microscopy Environment). I can navigate metadata dict alright with v2 but not with v3 & immeta :( ValueError Traceback (most recent call last)
Cell In[13], line 12
10 image_rgb = iio.imread(filename)
11 # meta = image_rgb.meta
---> 12 meta = iio.immeta(filename)
13 fig = plt.figure()
14 ax = fig.gca()
File ~\miniconda3\envs\scikit-env\lib\site-packages\imageio\v3.py:250, in immeta(uri, index, plugin, extension, exclude_applied, **kwargs)
247 call_kwargs["index"] = index
249 with imopen(uri, "r", **plugin_kwargs) as img_file:
--> 250 metadata = img_file.metadata(**call_kwargs)
252 return metadata
File ~\miniconda3\envs\scikit-env\lib\site-packages\imageio\plugins\tifffile_v3.py:307, in TifffilePlugin.metadata(self, index, page, exclude_applied)
305 metadata.update(flavor_metadata[0])
306 else:
--> 307 metadata.update(flavor_metadata)
308 else:
309 # tifffile may return a TiffFrame instead of a page
310 target = target.keyframe
ValueError: dictionary update sequence element #0 has length 1; 2 is required |
@mlt Interesting find. Could you create a dedicated issue for that? |
Closes: #818, #437 (must be closed manually)
This PR updates the tifffile plugin to use the v3 plugin API. It still needs some documentation, but I want to park it here so that interested parties can give feedback :)