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 inline TOutput operator()( const TInput1 & A, const TInput2 & B)
00048 {
00049 return static_cast<TOutput>(
00050 atan2(
00051 static_cast<double>(A),
00052 static_cast<double>(B) )
00053 );
00054 }
00055 };
00056 }
00057
00058 template <class TInputImage1, class TInputImage2, class TOutputImage>
00059 class ITK_EXPORT Atan2ImageFilter :
00060 public
00061 BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage,
00062 Functor::Atan2<
00063 typename TInputImage1::PixelType,
00064 typename TInputImage2::PixelType,
00065 typename TOutputImage::PixelType> >
00066 {
00067 public:
00069 typedef Atan2ImageFilter Self;
00070 typedef BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage,
00071 Functor::Atan2<
00072 typename TInputImage1::PixelType,
00073 typename TInputImage2::PixelType,
00074 typename TOutputImage::PixelType>
00075 > Superclass;
00076 typedef SmartPointer<Self> Pointer;
00077 typedef SmartPointer<const Self> ConstPointer;
00078
00080 itkNewMacro(Self);
00081
00082 protected:
00083 Atan2ImageFilter() {}
00084 virtual ~Atan2ImageFilter() {}
00085
00086 private:
00087 Atan2ImageFilter(const Self&);
00088 void operator=(const Self&);
00089
00090 };
00091
00092 }
00093
00094
00095 #endif