[Insight-users] Application walk through

Luis Ibanez luis.ibanez@kitware.com
Thu, 09 Jan 2003 11:11:01 -0500


Hi Neil,

-------------------------------------
Neil Killeen wrote:
>>Image are not actually passed from one filter to another.
>>
>>in
>>
>>A  --->  B ---- > C
>>
>>the output image of filter A stays with A.
>>B "read" this image and use the data to compute
>>the values it puts in its own output image.
>>B's output image is an entity completly independent
>>of A's output image.  Then C reads B's output image
>>and use the data to compute the values of C's
>>outtput image.
> 
> 
> my understanding og such piplines is that if we have done
> 
> f1->SetInput(f0->GetOutput())
> f2->SetInput(f1->GetOutput())
> f3->SetInput(f2->GetOutput())
> 
> then we can call
> 
> f3->Update()
> 
> to initiate the whole thing.  This will ultimately cause
> f0 to update itself (perhaps its an ImageFileReader).
> 


That's right !


 >
> Now, how are these connections made ?   You have indicated
> that when each filter passes an image to the next filter,
> the image is copied by SetInput; there is no shared
> structure.
> 

Images derive from    itk::DataObject
Filters derive from   itk::ProcessObject

Filters have a linked list of pointers to its
inputs and output.

DataObjects keep a pointer to the ProcessObject
who generated it. So, the Output image of filter A
knows about Filter A. In this way filter B can
ask the image to update its source (filter A).

You may want to take a look at the internal
code of

itkProcessObject
itkDataObject

in  Insight/Code/Common


This is pretty much the same
architecture of the VTK pipeline.



Regards,


    Luis