Support generic image stack decoding + tiff stack decoding#2706
Support generic image stack decoding + tiff stack decoding#2706soraxas wants to merge 7 commits intoimage-rs:mainfrom
Conversation
Signed-off-by: Tin Lai <tin@tinyiu.com> use super trait Signed-off-by: Tin Lai <tin@tinyiu.com>
Signed-off-by: Tin Lai <tin@tinyiu.com>
Signed-off-by: Tin Lai <tin@tinyiu.com>
Signed-off-by: Tin Lai <tin@tinyiu.com>
Signed-off-by: Tin Lai <tin@tinyiu.com>
|
Can we have some indication as to whether this is a right direction to support generic image stack? Thanks |
|
There's ongoing changes to |
|
In my view, there's a bunch of (weakly motivated) complexity here. Making the frame type generic for instance makes me wonder what other instantiations there should be, on what groups they are related, beyond some getter-style methods there is little that's there. (#2672 noted as it follows through more consequently on separating the sequence metadata from the image color data). Turning the frame into Also visible on |
addresses #1894, closes #2064
Features
Open for discussion
FramestoStackas the name is more generic (i.e. frame tends to imply width, height and data type are the same, but it won't be true in all format, e.g., tiff)AnimationDecoderwith the more genericImageStackDecoder(need to import that trait instead), which turns into an iterator that output some generic image-like objectAnimationFramewhich is a container that containsFrame<...>and adelayfloattiffturnsFrame<DynamicImage>, because tiff can contains frames of different size.Added an example for reading
tiffimage stack:Summary
ImageStackDecoder<...>, produce -> iterableStack<...>struct Stack<Frame<I>> { ... }contains a list of frame w/x,yoffset + a generic Image bufferIIis rbg imageIisDynamicImagestruct Stack<AnimationFrame> { ... }where animation frame contains a floatdelay+ aFrame<I>(e.g. gif)