00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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&);
00080 void operator=(const Self&);
00081
00082 };
00083
00084 }
00085
00086
00087 #endif