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

itkAsinImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkAsinImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-01 14:36:08 $
00007   Version:   $Revision: 1.24 $
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 __itkAsinImageFilter_h
00018 #define __itkAsinImageFilter_h
00019 
00020 #include "itkUnaryFunctorImageFilter.h"
00021 #include "vnl/vnl_math.h"
00022 
00023 namespace itk
00024 {
00025   
00044 namespace Functor {  
00045   
00046 template< class TInput, class TOutput>
00047 class Asin
00048 {
00049 public:
00050   Asin() {};
00051   ~Asin() {};
00052   bool operator!=( const Asin & ) const
00053     {
00054     return false;
00055     }
00056   bool operator==( const Asin & other ) const
00057     {
00058     return !(*this != other);
00059     }
00060   inline TOutput operator()( const TInput & A ) const
00061     {
00062     return static_cast<TOutput>(
00063       vcl_asin(
00064         static_cast<double>(A)
00065         )
00066       );
00067     }
00068 }; 
00069 
00070 }
00071 template <class TInputImage, class TOutputImage>
00072 class ITK_EXPORT AsinImageFilter :
00073     public
00074 UnaryFunctorImageFilter<TInputImage,TOutputImage, 
00075                         Functor::Asin< 
00076   typename TInputImage::PixelType, 
00077   typename TOutputImage::PixelType>   >
00078 {
00079 public:
00081   typedef AsinImageFilter           Self;
00082   typedef UnaryFunctorImageFilter<TInputImage,TOutputImage, 
00083                                   Functor::Asin< 
00084     typename TInputImage::PixelType, 
00085     typename TOutputImage::PixelType>   
00086   >                                 Superclass;
00087   typedef SmartPointer<Self>        Pointer;
00088   typedef SmartPointer<const Self>  ConstPointer;
00089 
00091   itkNewMacro(Self);
00092 
00094   itkTypeMacro(AsinImageFilter, 
00095                UnaryFunctorImageFilter);
00096 
00097 #ifdef ITK_USE_CONCEPT_CHECKING
00098 
00099   itkConceptMacro(InputConvertibleToDoubleCheck,
00100     (Concept::Convertible<typename TInputImage::PixelType, double>));
00101   itkConceptMacro(DoubleConvertibleToOutputCheck,
00102     (Concept::Convertible<double, typename TOutputImage::PixelType>));
00103 
00105 #endif
00106 
00107 protected:
00108   AsinImageFilter() {}
00109   virtual ~AsinImageFilter() {}
00110 
00111 private:
00112   AsinImageFilter(const Self&); //purposely not implemented
00113   void operator=(const Self&); //purposely not implemented
00114 
00115 };
00116 
00117 } // end namespace itk
00118 
00119 
00120 #endif
00121 

Generated at Tue Sep 15 02:09:53 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000