OpenImageIO/oiio — pull request #434 by lgritz (2012-09-08 18:16:57+00:00)
Title: Review: Extend ROI to contain a range of channels; IBA::fill overhaul

Extend ROI to have chbegin/chend to denote a range of channels (defaulting to all channels). I purposefully made it able to express a contiguous range of channels (or just one, or all), not an arbitrary on/off vector, just like the x/y/z range expressed by an ROI is a rectangle, not an arbitrary cutout.

The idea is that some ImageBufAlgo functions -- where appropriate -- can respect the channel range of the ROI they are passed. For others that makes no sense, so they will ignore the chbegin/chend. The documentation for each IBA function that takes an ROI should make it clear whether it respects channel subsets or not.

I also overhauled IBA::fill in several ways:
* It previously took explicit xbegin/xend/etc, now it just takes an ROI
* It does respect the channel range, so you can use it to fill a single or contiguous subset of channels, in order to filling all channels in the image.
* It uses iterators rather than getpixel/setpixel, so it should be must faster than before.

And I re-implemented IBA::zero() in terms of fill.