Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkAtan2ImageFilter_h
00018 #define __itkAtan2ImageFilter_h
00019
00020 #include "itkBinaryFunctorImageFilter.h"
00021 #include "vnl/vnl_math.h"
00022
00023 namespace itk
00024 {
00025
00039 namespace Functor {
00040
00041 template< class TInput1, class TInput2, class TOutput>
00042 class Atan2
00043 {
00044 public:
00045 Atan2() {};
00046 ~Atan2() {};
00047 bool operator!=( const Atan2 & ) const
00048 {
00049 return false;
00050 }
00051 bool operator==( const Atan2 & other ) const
00052 {
00053 return !(*this != other);
00054 }
00055 inline TOutput operator()( const TInput1 & A, const TInput2 & B) const
00056 {
00057 return static_cast<TOutput>(
00058 vcl_atan2(
00059 static_cast<double>(A),
00060 static_cast<double>(B) )
00061 );
00062 }
00063 };
00064 }
00065
00066 template <class TInputImage1, class TInputImage2, class TOutputImage>
00067 class ITK_EXPORT Atan2ImageFilter :
00068 public
00069 BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage,
00070 Functor::Atan2<
00071 typename TInputImage1::PixelType,
00072 typename TInputImage2::PixelType,
00073 typename TOutputImage::PixelType> >
00074 {
00075 public:
00077 typedef Atan2ImageFilter Self;
00078 typedef BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage,
00079 Functor::Atan2<
00080 typename TInputImage1::PixelType,
00081 typename TInputImage2::PixelType,
00082 typename TOutputImage::PixelType>
00083 > Superclass;
00084 typedef SmartPointer<Self> Pointer;
00085 typedef SmartPointer<const Self> ConstPointer;
00086
00088 itkNewMacro(Self);
00089
00091 itkTypeMacro(Atan2ImageFilter,
00092 BinaryFunctorImageFilter);
00093
00094 #ifdef ITK_USE_CONCEPT_CHECKING
00095
00096 itkConceptMacro(Input1ConvertibleToDoubleCheck,
00097 (Concept::Convertible<typename TInputImage1::PixelType, double>));
00098 itkConceptMacro(Input2ConvertibleToDoubleCheck,
00099 (Concept::Convertible<typename TInputImage2::PixelType, double>));
00100 itkConceptMacro(DoubleConvertibleToOutputCheck,
00101 (Concept::Convertible<double, typename TOutputImage::PixelType>));
00102
00104 #endif
00105
00106 protected:
00107 Atan2ImageFilter() {}
00108 virtual ~Atan2ImageFilter() {}
00109
00110 private:
00111 Atan2ImageFilter(const Self&);
00112 void operator=(const Self&);
00113
00114 };
00115
00116 }
00117
00118
00119 #endif
00120