On Thu, Feb 27, 2003 at 08:34:44PM -0800, Daniel Rogers wrote: > Would there be any circumstances where ImageIterator and ImageData would > have a different rect? (presuming that the ImageIterator in question is > iterating over the same set of data that ImageData represents). For the moment, assume they would have the same rect. In the future, when Images are multi-tiled, then the ImageData rect could describe some area that might correspond to several tiles of an Image. In that case some kind of iterator would hand back tiles, and then there would be a scanline iterator for the lines of each tile. Here these scanline iterators would obviously be focused on rects smaller than the ImageData rect. (Our current ImageIterator is sort of just this scanline iterator) Setting the ImageData rect basically just says "this area will be needed" and they are computed based on the roi that was originally passed at the root. > This is important because I am now sticking an image iterator into an > ImageData, which is passed to process(). When process recieves > ImageData it needs to decide if it should use the image iterator's > scanline width or the ImageData's scanline width (which under the > circumstances are the same, but that doesn't mean they always will be). Correct but I think its okay for the moment to assume they are the same, till multi-tiled images are there. > > If the two rects should be the same, then should I destroy the > ImageIterator associated with and ImageData when the ImageData rect changes? But when will it change? It shouldnt change after the preprocessing passes over the graph are made and the areas needed are computed. Once evaluation begins it stays the same. > Also, with this change to how inputs are passed to process, is there any > need for ImageIterator to store a seperate rect from ImageData? (to put > this question another way, would ImageIterator ever be used when not > associated with an ImageData?) If not, then should I find a way to get > rid of double storage of the ImageData's rect and the ImageIterator's rect? > I think its okay to leave them, since they will eventually be different. Calvin