[Insight-users] Re: Question : TripleTK example

Luis Ibanez luis . ibanez at kitware . com
Wed, 07 Aug 2002 15:08:05 -0400


Hi Buu,

This is relatively old code and it is now deprecated,
but just for the record:

line (1) is declaring a filter capable of reading a file
and producing an image as output.

line (2) declares a Factory (Design Patterns) capable of
generating objects that read files in MetaImage format.

line (3) instantiates the object that can read a file.

Please DON'T use this style of code anymore.

The method used in GaussianFilter example is the current
approach.

Note that Deprecated classes are listed in the following
Doxygen group:

http://www.itk.org/Insight/Doxygen/html/group__Deprecated.html


   Luis


==========================================================

Buu Tien Phan wrote:
> 
> I am still working on the TripleTKImageDisplay example. I don't 
> understand the following code segment:
>  
> 
> 1) typedef FileIOToImageFilter<ImageType>  LoaderType;
> 
> 2) ObjectFactoryBase::RegisterFactory(new FileIOMetaImageFactory);
> 
> 3) LoaderType::Pointer loader = LoaderType::New();
> 
> The Gaussian Filter example loads images using different class. Which 
> way is better? 
> 
> On the second line: "ObjectFactoryBase::RegisterFactory(new 
> FileIOMetaImageFactory);" Could you plaese explain what is does?
> 
> Thank you for your time.
> 
>  
> 
> Buu Phan
> 
>  
>