[gil][io_new] Image Reading and Writing Iterator

Hi there, one of the requirements for the acceptance of io_new as the new io extension for gil is the ability to read and write images in more then one step. For that the current state of an operation has to be cached. I have created some meta functions that give access to io_new's reader and writer classes. Right now, it still is very preliminary. I would like to ask the community how I could create an read_iterator and write_iterator classes which users could use to iterate over very large images. I know there are some specific iterator libs in boost but I'm just clueless in how to use let alone be able to come up with an implementation that will be released by boost. Any help would be very welcome! Thanks, Christian

On Sun, Oct 23, 2011 at 6:30 PM, Christian Henning <chhenning@gmail.com> wrote:
Hi there, one of the requirements for the acceptance of io_new as the new io extension for gil is the ability to read and write images in more then one step. For that the current state of an operation has to be cached. I have created some meta functions that give access to io_new's reader and writer classes. Right now, it still is very preliminary. I would like to ask the community how I could create an read_iterator and write_iterator classes which users could use to iterate over very large images.
I know there are some specific iterator libs in boost but I'm just clueless in how to use let alone be able to come up with an implementation that will be released by boost.
Any help would be very welcome!
I have some experience using Boost iterator adapters, and I'm very interested in getting io_new into the Boost tree ASAP, so I'll lend a hand. Can you briefly state the problem more explicitly? Zach

On 24 October 2011 14:09, Zach Laine <whatwasthataddress@gmail.com> wrote:
On Sun, Oct 23, 2011 at 6:30 PM, Christian Henning <chhenning@gmail.com> wrote:
Hi there, one of the requirements for the acceptance of io_new as the new io extension for gil is the ability to read and write images in more then one step. For that the current state of an operation has to be cached. I have created some meta functions that give access to io_new's reader and writer classes. Right now, it still is very preliminary. I would like to ask the community how I could create an read_iterator and write_iterator classes which users could use to iterate over very large images.
I know there are some specific iterator libs in boost but I'm just clueless in how to use let alone be able to come up with an implementation that will be released by boost.
Any help would be very welcome!
I have some experience using Boost iterator adapters, and I'm very interested in getting io_new into the Boost tree ASAP, so I'll lend a hand. Can you briefly state the problem more explicitly?
I'm also interested in this feature and similarly, I'd need to learn more about the idea details/ Christian, I guess you don't need help in constructing iterator adapter, do you? So, can you outline the idea or point where's the problem? Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org

Hi all, thanks for the replies. Let's stick with reading an image for now. Writing is somewhat similar. Now, reading a large image is typically done in a forward matter. In fact most image formats only support forward. No random access or even backwards is supported naturally. There are exceptions like bmp or other basic formats. Depending on the use case one way to read an image is by reading one or more scanlines. They other way is reading in blocks. Such settings could be setup at construction time but users might want to change them over time. I think I would need some help with constructing an forward iterator adapter. Imagine you have a reader<Device, Format> class and it would be used by the iterator to extract data from the image. Is there any sample code that I could use? Hope this helps, Christian
participants (3)
-
Christian Henning
-
Mateusz Łoskot
-
Zach Laine