Thanks Stefan, that was a useful start. I added a MultiImg class which is quite similar to your ImgCollection. There are enough differences between a multi-image file and a collection of single image files to justify creating a separate class I think. The code is here:
http://github.com/rgommers/scikits.image/blob/imgcollection/scikits/image/io/io.pyIt works with my multi-frame TIFF files (only PIL trunk, not 1.1.6), and once I figure out how to create a correct TIFF header/file (does anyone have code for this?) I can add a self-contained example and tests.
Things that would be useful to add:
- caching a configurable number of frames (now 1 or all)
- a dtype keyword
- switch to the new IO plugin system once it's ready
- add a MultiImgCollection
- what else?
Questions:
- do you want to keep the Image class in that form? It seems either a plain ndarray or ndarray + tags dict is enough.
- can I remove the EXIF stuff or move it to a subclass of Image? I don't think it belongs in the base Image class.
- should imread be moved into io.py?
I'd appreciate any feedback on the basic design and new feature suggestions.
Cheers,
Ralf