00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkAtanImageAdaptor_h
00018 #define __itkAtanImageAdaptor_h
00019
00020 #include <itkImageAdaptor.h>
00021 #include "vnl/vnl_math.h"
00022
00023 namespace itk
00024 {
00025
00026 namespace Accessor {
00039 template <class TInternalType, class TExternalType >
00040 class ITK_EXPORT AtanPixelAccessor
00041 {
00042 public:
00043
00046 typedef TExternalType ExternalType;
00047
00050 typedef TInternalType InternalType;
00051
00052 static inline void Set(TInternalType & output, const TExternalType & input)
00053 {output = (TInternalType)vcl_atan((double)input);}
00054
00055 static inline TExternalType Get( const TInternalType & input )
00056 {return (TExternalType)vcl_atan((double)input);}
00057 };
00058
00059
00060 }
00061
00072 template <class TImage, class TOutputPixelType>
00073 class ITK_EXPORT AtanImageAdaptor : public
00074 ImageAdaptor<TImage,
00075 Accessor::AtanPixelAccessor<
00076 typename TImage::PixelType,
00077 TOutputPixelType> >
00078 {
00079 public:
00080
00082 typedef AtanImageAdaptor Self;
00083 typedef ImageAdaptor<TImage,Accessor::AtanPixelAccessor<
00084 typename TImage::PixelType,
00085 TOutputPixelType> >
00086 Superclass;
00087 typedef SmartPointer<Self> Pointer;
00088 typedef SmartPointer<const Self> ConstPointer;
00089
00091 itkTypeMacro( AtanImageAdaptor, ImageAdaptor );
00092
00094 itkNewMacro(Self);
00095
00096 protected:
00097 AtanImageAdaptor() {}
00098 virtual ~AtanImageAdaptor() {}
00099
00100 private:
00101 AtanImageAdaptor(const Self&);
00102 void operator=(const Self&);
00103 };
00104
00105 }
00106
00107 #endif
00108