[Insight-users] How to wrap "mini pipeline" in a composite filter?

Luis Ibanez luis.ibanez at kitware.com
Thu, 22 Jan 2004 12:12:38 -0500


Hi Hideaki,

About your questions:

1) You are right, using mini-pipelines is a common
    approach in ITK filters.  You may find interesting
    to look at the following filters that do this:

        itkLaplacianRecursiveGaussianImageFilter
        itkGradientRecursiveGaussianImageFilter
        itkSmoothingRecursiveGaussianImageFilter
        itkGrayscaleConnectedClosingImageFilter


    please pay particular attention to the use of

         - ReleaseDataFlag
         - Progress update
         - GraftOutput


2)  PrintSelf() is not public because it is intended
     to be invoked from "Print()" which is public.

     Users will invoke

           myItkClass->Print(  std::cout );

     and internally all the PrintSelf() methods of
     myItkClass and its parents will be invoked in
     order and pass proper indentation.




Regards,


     Luis


------------------------
HIRAKI Hideaki wrote:

> Hello,
> 
> Many thanks to Miller, James V (Research) and Luis Ibanez 
> (http://www.itk.org/pipermail/insight-users/2003-December/005796.html), 
> I can get a 4D image from a series of 3D image. The attached 
> is my trial to make a filter for this task. As it seemed hard 
> to implement a real filter that does what Luis suggested, I 
> took the easier way to wrap the pipeline Jim suggested. The 
> code is working now. But I have two questions.
> 
> 
> Q1) Are there examples to show how to wrap mini-pipelines in 
>     a composite filter?
> 
> I guess the filter delegating image processing to its inner filters 
> may be a general pattern in ITK and someone has better practices.
> 
> 
> Q2) Why itk::LightObject::PrintSelf() isn't public?
> 
> PrintSelf() is protected and it's impossible to build PrintSelf() 
> from the component objects with proper indentation.
> 
> 
> Thanks in advance,
> 
> Hideaki Hiraki