[Insight-users] Design a composite filter with two inputs and one output

Frank Miller frankmiller at jhmi.edu
Wed Jul 28 09:59:21 EDT 2010


Hi Habib,

If the operations on the three images are simple enough you might be
able to use the TernaryFunctorImageFilter instead of writing a composite
filter from scratch. You can read the code in TernaryAddImageFilter as
an example.

If you really do need to write a composite filter, the "How To Write A
Filter" chapter in the ITK software guide is the best place to start but
it sounds like you already found that. After that you can read the
excellent documentation in the filter base classes, i.e. ProcessObject,
ImageSource, ImageToImageFilter, and maybe even InPlaceImageFilter. Pay
particular attention to the GenerateOutputInformation(),
EnlargeOutputRequestedRegion(), GenerateInputRequestedRegion(), and
GenerateOutputRequestedRegion() virtual functions. I would recommend
reading the code too, why not... its open source. Finally, for your
specific case, you might be able to use the code in the
TernaryFunctorImageFilter as a starting point.

Good luck.

Frank


On Mon, 2010-07-26 at 08:44 -0700, habibbaluwala2010 wrote:
> Hi Everyone, 
>                   I trying to perform operations on three images and then
> add the results and produce one single image. I want to design a composite
> filter for the same purpose . Can someone help me on how can I do that using
> the guidelines in the ITK software guide. Any help is appreciated. 
> 
> Kind regards , 
> Habib Baluwala  
> 




More information about the Insight-users mailing list