00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkAcosImageFilter_h
00018 #define __itkAcosImageFilter_h
00019
00020 #include "itkUnaryFunctorImageFilter.h"
00021 #include "vnl/vnl_math.h"
00022
00023 namespace itk
00024 {
00025
00046 namespace Functor {
00047
00048 template< class TInput, class TOutput>
00049 class Acos
00050 {
00051 public:
00052 Acos() {};
00053 ~Acos() {};
00054 bool operator!=( const Acos & ) const
00055 {
00056 return false;
00057 }
00058 bool operator==( const Acos & other ) const
00059 {
00060 return !(*this != other);
00061 }
00062 inline TOutput operator()( const TInput & A )
00063 {
00064 return static_cast<TOutput>( vcl_acos(static_cast<double>(A) ) );
00065 }
00066 };
00067 }
00068
00069 template <class TInputImage, class TOutputImage>
00070 class ITK_EXPORT AcosImageFilter :
00071 public
00072 UnaryFunctorImageFilter<TInputImage,TOutputImage,
00073 Functor::Acos<
00074 typename TInputImage::PixelType,
00075 typename TOutputImage::PixelType> >
00076 {
00077 public:
00079 typedef AcosImageFilter Self;
00080 typedef UnaryFunctorImageFilter<TInputImage,TOutputImage,
00081 Functor::Acos< typename TInputImage::PixelType,
00082 typename TOutputImage::PixelType> > Superclass;
00083 typedef SmartPointer<Self> Pointer;
00084 typedef SmartPointer<const Self> ConstPointer;
00085
00087 itkNewMacro(Self);
00088
00089 #ifdef ITK_USE_CONCEPT_CHECKING
00090
00091 itkConceptMacro(InputCovertibleToDoubleCheck,
00092 (Concept::Convertible<typename TInputImage::PixelType, double>));
00093 itkConceptMacro(DoubleConvertibleToOutputCheck,
00094 (Concept::Convertible<double, typename TOutputImage::PixelType>));
00095
00097 #endif
00098
00099 protected:
00100 AcosImageFilter() {}
00101 virtual ~AcosImageFilter() {}
00102
00103 private:
00104 AcosImageFilter(const Self&);
00105 void operator=(const Self&);
00106
00107 };
00108
00109 }
00110
00111
00112 #endif
00113