Repository navigation
FEAT: improps and immeta - #739
Conversation
|
blocked by #740 |
The Dicom images specify it, for sure. The dicom plugin currently puts "sampling" in its metadata: imageio/imageio/plugins/_dicom.py Lines 462 to 464 in e104505 |
Nice. that sorts out one plugin. I was hoping for something that is loaded by pillow (and potentially one for ffmpeg and tifffile), because those seem to be our major plugins. At least if we go by the number of issues that we receive for each plugin. |
effeeba to
ae79275
Compare
ae79275 to
255b749
Compare
To bring v3 imread and v2 imread closer together read only the first ndimage by default.
|
@almarklein RTR. I have decided to only add superficial support for wrapped legacy plugins at this stage. This means it won't crash if you call |
Co-authored-by: Almar Klein <[email protected]>
|
@almarklein I take it that you approving the PR means you are happy with the changes otherwise and I can merge this after CI has passed? |
|
Yes! |
Closes: #362 #382 #501 #502 #503
This PR adds two new functions to the v3 API:
iio.impropsandiio.immeta.impropsreturns a ImageProperties object which contains standardized metadata, andimmetareturns a dict object that contains format-specific metadata.It also adds a
imageio.core.v3_plugin_api.PluginV3class that documents the plugin-side API for v3 plugins.Further, I added implementations for
metadataandpropertiesto the v3 pillow plugin to support the newly added functions. For this plugin, reading ofpropertieshappens (as far as I know) without touching pixel data.@almarklein @jni strike one ⚾ 🎉
Still pending:
propertiesandmetadatafor legacy_plugin_wrapper (this will likely touch pixel data in the process)immetawrapper aroundimopenspacinginImageProperties(@almarklein where is it stored? Do you have an example image I can test with?)