Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkAcosImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkAcosImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-01 14:36:05 $
00007   Version:   $Revision: 1.25 $
00008 
00009   Copyright (c) Insight Software 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   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 ) const
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 
00084   typedef SmartPointer<Self>        Pointer;
00085   typedef SmartPointer<const Self>  ConstPointer;
00086 
00088   itkNewMacro(Self);
00089 
00091   itkTypeMacro(AcosImageFilter, 
00092                UnaryFunctorImageFilter);
00093 
00094 #ifdef ITK_USE_CONCEPT_CHECKING
00095 
00096   itkConceptMacro(InputCovertibleToDoubleCheck,
00097     (Concept::Convertible<typename TInputImage::PixelType, double>));
00098   itkConceptMacro(DoubleConvertibleToOutputCheck,
00099     (Concept::Convertible<double, typename TOutputImage::PixelType>));
00100 
00102 #endif
00103 
00104 protected:
00105   AcosImageFilter() {}
00106   virtual ~AcosImageFilter() {}
00107 
00108 private:
00109   AcosImageFilter(const Self&); //purposely not implemented
00110   void operator=(const Self&); //purposely not implemented
00111 
00112 };
00113 
00114 } // end namespace itk
00115 
00116 
00117 #endif
00118 

Generated at Thu May 28 09:16:36 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000