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: 2006/03/19 04:36:55 $
00007   Version:   $Revision: 1.19 $
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)
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 
00090 #ifdef ITK_USE_CONCEPT_CHECKING
00091 
00092   itkConceptMacro(Input1ConvertibleToDoubleCheck,
00093     (Concept::Convertible<typename TInputImage1::PixelType, double>));
00094   itkConceptMacro(Input2ConvertibleToDoubleCheck,
00095     (Concept::Convertible<typename TInputImage2::PixelType, double>));
00096   itkConceptMacro(DoubleConvertibleToOutputCheck,
00097     (Concept::Convertible<double, typename TOutputImage::PixelType>));
00098 
00100 #endif
00101 
00102 protected:
00103   Atan2ImageFilter() {}
00104   virtual ~Atan2ImageFilter() {}
00105 
00106 private:
00107   Atan2ImageFilter(const Self&); //purposely not implemented
00108   void operator=(const Self&); //purposely not implemented
00109 
00110 };
00111 
00112 } // end namespace itk
00113 
00114 
00115 #endif
00116 

Generated at Sun Mar 11 23:28:34 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000