[Insight-users] How to use the itkSubtractImagFilter.h
Luis Ibanez
luis . ibanez at kitware . com
Fri, 03 Oct 2003 10:08:44 -0400
Hi Anders,
Please use
filter->SetInput1( image1 );
filter->SetInput2( image2 );
filter->Update();
The itk::SubtractImageFilter
http://www . itk . org/Insight/Doxygen/html/classitk_1_1SubtractImageFilter . html
derives from the BinaryFunctorImageFilter
http://www . itk . org/Insight/Doxygen/html/classitk_1_1BinaryFunctorImageFilter . html
which is the abstraction of all the pixel-wise filters
requiring two inputs.
Regards,
Luis
--------------------------
Anders Almås wrote:
> Hi!
>
> I am new to ITK and I am trying to learn how to use it in segmentation. My
> PROBLEM is for now how to use the itkSubtractImageFilter.h Should there
> be two lines to set the input?
>
> subtractImages->SetInput(GrayscaleErode->GetOutput());
> subtractImages->SetInput(reader->GetOutput());
>
> Where GrayscaleErode is of GrayScaleErodeFilter and reader is the input
> image...
>
> What is wrong??
>
> I have instaniated the headerfile and made an typedef
>
> typedef
> itk::SubtractImageFilter<InputImageType,OutputImageType,OutputImageType>
> SubtractImageType;
>
> SubtractImageType::Pointer subtractImages = SubtractImageType::New();
>
> Please give me some clues!!
>
> Thanks
>
> Anders
>
> -------------------------------------------------------------------------------
> Navn: Anders Almås
> E-post: andersal at stud . ntnu . no
> Tlf: 90550374
> -------------------------------------------------------------------------------
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ...............................................................................
>
> Anders Almås Min hjemmeside:
>
> 7230 Trondheim http://stud . ntnu . no/~andersal/
>
> ...............................................................................
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>