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: 2003/09/10 14:28:57 $ 00007 Version: $Revision: 1.22 $ 00008 00009 Copyright (c) Insight Software 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 00036 namespace Function { 00037 00038 template< class TInput1, class TInput2, class TOutput> 00039 class Sub2 00040 { 00041 public: 00042 Sub2() {} 00043 ~Sub2() {} 00044 inline TOutput operator()( const TInput1 & A, const TInput2 & B) 00045 { return (TOutput)(A - B); } 00046 }; 00047 } 00048 00049 template <class TInputImage1, class TInputImage2, class TOutputImage> 00050 class ITK_EXPORT SubtractImageFilter : 00051 public 00052 BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 00053 Function::Sub2< 00054 typename TInputImage1::PixelType, 00055 typename TInputImage2::PixelType, 00056 typename TOutputImage::PixelType> > 00057 { 00058 public: 00060 typedef SubtractImageFilter Self; 00061 typedef BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 00062 Function::Sub2< typename TInputImage1::PixelType, 00063 typename TInputImage2::PixelType, 00064 typename TOutputImage::PixelType> > Superclass; 00065 typedef SmartPointer<Self> Pointer; 00066 typedef SmartPointer<const Self> ConstPointer; 00067 00068 00070 itkNewMacro(Self); 00071 00072 protected: 00073 SubtractImageFilter() {} 00074 virtual ~SubtractImageFilter() {} 00075 00076 private: 00077 SubtractImageFilter(const Self&); //purposely not implemented 00078 void operator=(const Self&); //purposely not implemented 00079 00080 00081 }; 00082 00083 } // end namespace itk 00084 00085 00086 #endif

Generated at Sun Apr 1 02:45:21 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000