00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkAcosImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2002/01/15 19:35:55 $ 00007 Version: $Revision: 1.15 $ 00008 00009 Copyright (c) 2002 Insight Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 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 inline TOutput operator()( const TInput & A ) 00055 { 00056 return static_cast<TOutput>( acos( static_cast<double>(A) ) ); 00057 } 00058 }; 00059 } 00060 00061 template <class TInputImage, class TOutputImage> 00062 class ITK_EXPORT AcosImageFilter : 00063 public 00064 UnaryFunctorImageFilter<TInputImage,TOutputImage, 00065 Functor::Acos< 00066 typename TInputImage::PixelType, 00067 typename TOutputImage::PixelType> > 00068 { 00069 public: 00071 typedef AcosImageFilter Self; 00072 typedef UnaryFunctorImageFilter<TInputImage,TOutputImage, 00073 Functor::Acos< typename TInputImage::PixelType, 00074 typename TOutputImage::PixelType> > Superclass; 00075 typedef SmartPointer<Self> Pointer; 00076 typedef SmartPointer<const Self> ConstPointer; 00077 00079 itkNewMacro(Self); 00080 00081 protected: 00082 AcosImageFilter() {} 00083 virtual ~AcosImageFilter() {} 00084 00085 private: 00086 AcosImageFilter(const Self&); //purposely not implemented 00087 void operator=(const Self&); //purposely not implemented 00088 00089 }; 00090 00091 } // end namespace itk 00092 00093 00094 #endif