[Fwd: Re: [Gegl-developer] how to specify input parameters]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Begin Message ---
On Sat, Feb 22, 2003 at 08:46:09PM -0800, Daniel Rogers wrote:
> How do you specify that an input image is optional?
> 
> Also, if the input is not given, how to you tell it's not there when you 
> are handed an ImageIterator?
> 

Good question. We dont have a mechanism for this yet. 

I think we even need to improve the way that data
is passed to the subclasses of point op (say) before
we address this. 

Right now ScanlineProcessor creates an ImageIterator
for each image data type (both inputs and outputs
actually) and puts it in a list of iterators and passes
this to the subclass of op that is doing the scanline 
processing (like fade). 

But what should really happen is that all the data
inputs and outputs should be passed directly to the 
subclass. Just pass the same data_inputs and data_outputs 
list that appear in the prepare, process, and finish 
methods of Filter.

The subclass then has all of its data available for
doing its operation, (including inputs that are 
not images, like scalars, etc). 

Then change the ScanlineProcessor so that
it asks the ImageData object to create and keep an 
ImageIterator for that image data. If that input is
 null then the ImageIterator would be null.

Before calling the scanline routines, the 
ScanlineProcessor then gets the ImageIterator
from each ImageData object and updates it to
the next line.

The subclass then requests the line to 
work on from the ImageIterator it gets
from the ImageData object. 

If the input corresponds to some other
input data (like a scalar) then the subclass
of course doesnt request the image iterator
from that data. And the subclass knows which 
order the inputs are in.

Calvin


--- End Message ---

[Index of Archives]     [Yosemite News]     [Yosemite Photos]     [gtk]     [GIMP Users]     [KDE]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux