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

itkAtan2ImageFilter.h

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

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