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)atan((double)input);}
00054
00055 static inline TExternalType Get( const TInternalType & input )
00056 {return (TExternalType)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:
00081 typedef AtanImageAdaptor Self;
00082 typedef ImageAdaptor<TImage,Accessor::AtanPixelAccessor<
00083 typename TImage::PixelType,
00084 TOutputPixelType> >
00085 Superclass;
00086 typedef SmartPointer<Self> Pointer;
00087 typedef SmartPointer<const Self> ConstPointer;
00088
00090 itkTypeMacro( AtanImageAdaptor, ImageAdaptor );
00091
00093 itkNewMacro(Self);
00094
00095 protected:
00096 AtanImageAdaptor() {}
00097 virtual ~AtanImageAdaptor() {}
00098
00099 private:
00100 AtanImageAdaptor(const Self&);
00101 void operator=(const Self&);
00102 };
00103
00104 }
00105
00106 #endif