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

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

 



On Sun, Feb 23, 2003 at 08:33:36PM -0800, Daniel Rogers wrote:
> > 
> > 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. 
> 
> Let me see if I understand this correctly.  Instead of passing 
> interators, you want to pass data object, which themselves contain the 
> iterators (for inputs that are images).  The op is then supposed to grab 
> the iterators from the data ops which have iterators, and procced as before?
> 

Right. And between scanline calls, the ScanlineProcessor walks
the lists of input and output data, and for any ImageData objects
it finds, it gets the iterator from that ImageData object and
then advances it to the next line. 

Its better to pass the whole lists of input and output
data objects (just like in prepare, process, finish) to the 
subclass of op, since that is where other inputs (eg like 
scalars or whatever) will be stored as well. (It doesnt
work that way yet though...) 

Calvin

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

  Powered by Linux