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

itkMinimumImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMinimumImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/12/03 15:36:43 $
00007   Version:   $Revision: 1.4 $
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 __itkMinimumImageFilter_h
00018 #define __itkMinimumImageFilter_h
00019 
00020 #include "itkBinaryFunctorImageFilter.h"
00021 
00022 namespace itk
00023 {
00024   
00037 namespace Function {  
00038 
00039 template< class TInput1, class TInput2, class TOutput>
00040 class Minimum
00041 {
00042 public:
00043   Minimum() {}
00044   ~Minimum() {}
00045   inline TOutput operator()( const TInput1 & A, const TInput2 & B)
00046   { return static_cast<TOutput>( (A < B)? A : B ); }
00047 }; 
00048 }
00049 
00050 template <class TInputImage1, class TInputImage2, class TOutputImage>
00051 class ITK_EXPORT MinimumImageFilter :
00052     public
00053 BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
00054                          Function::Minimum< 
00055   typename TInputImage1::PixelType, 
00056   typename TInputImage2::PixelType,
00057   typename TOutputImage::PixelType>   >
00058 {
00059 public:
00061   typedef MinimumImageFilter  Self;
00062   typedef BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
00063                                    Function::Minimum< 
00064     typename TInputImage1::PixelType, 
00065     typename TInputImage2::PixelType,
00066     typename TOutputImage::PixelType>   
00067   > Superclass;
00068   typedef SmartPointer<Self>   Pointer;
00069   typedef SmartPointer<const Self>  ConstPointer;
00070 
00072   itkNewMacro(Self);
00073   
00074 protected:
00075   MinimumImageFilter() {}
00076   virtual ~MinimumImageFilter() {}
00077 
00078 private:
00079   MinimumImageFilter(const Self&); //purposely not implemented
00080   void operator=(const Self&); //purposely not implemented
00081 
00082 };
00083 
00084 } // end namespace itk
00085 
00086 
00087 #endif

Generated at Wed May 24 23:40:42 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000