Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkSubtractImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSubtractImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/01/15 19:36:15 $
00007   Version:   $Revision: 1.19 $
00008 
00009   Copyright (c) 2002 Insight Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkSubtractImageFilter_h
00018 #define __itkSubtractImageFilter_h
00019 
00020 #include "itkBinaryFunctorImageFilter.h"
00021 
00022 namespace itk
00023 {
00024   
00034 namespace Function {  
00035   
00036   template< class TInput1, class TInput2, class TOutput>
00037   class Sub2
00038   {
00039   public:
00040     Sub2() {}
00041     ~Sub2() {}
00042     inline TOutput operator()( const TInput1 & A, const TInput2 & B)
00043       { return (TOutput)(A - B); }
00044   }; 
00045 }
00046 
00047 template <class TInputImage1, class TInputImage2, class TOutputImage>
00048 class ITK_EXPORT SubtractImageFilter :
00049     public
00050     BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
00051     Function::Sub2< 
00052               typename TInputImage1::PixelType, 
00053               typename TInputImage2::PixelType,
00054               typename TOutputImage::PixelType>   >
00055 {
00056 public:
00058   typedef SubtractImageFilter  Self;
00059   typedef BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
00060     Function::Sub2< typename TInputImage1::PixelType, 
00061                     typename TInputImage2::PixelType,
00062                     typename TOutputImage::PixelType> >  Superclass;
00063   typedef SmartPointer<Self>   Pointer;
00064   typedef SmartPointer<const Self>  ConstPointer;
00065 
00066 
00068   itkNewMacro(Self);
00069   
00070 protected:
00071   SubtractImageFilter() {}
00072   virtual ~SubtractImageFilter() {}
00073 
00074 private:
00075   SubtractImageFilter(const Self&); //purposely not implemented
00076   void operator=(const Self&); //purposely not implemented
00077 
00078 
00079 };
00080 
00081 } // end namespace itk
00082 
00083 
00084 #endif

Generated at Wed Mar 12 01:13:11 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000