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: 2002/01/15 19:35:56 $
00007   Version:   $Revision: 1.13 $
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 __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     inline TOutput operator()( const TInput1 & A, const TInput2 & B)
00048     {
00049       return static_cast<TOutput>( 
00050           atan2(
00051             static_cast<double>(A),
00052             static_cast<double>(B)  )
00053           );
00054     }
00055   }; 
00056 }
00057 
00058 template <class TInputImage1, class TInputImage2, class TOutputImage>
00059 class ITK_EXPORT Atan2ImageFilter :
00060     public
00061     BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
00062     Functor::Atan2< 
00063               typename TInputImage1::PixelType, 
00064               typename TInputImage2::PixelType,
00065               typename TOutputImage::PixelType>   >
00066 {
00067 public:
00069   typedef Atan2ImageFilter  Self;
00070   typedef BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
00071     Functor::Atan2< 
00072               typename TInputImage1::PixelType, 
00073               typename TInputImage2::PixelType,
00074               typename TOutputImage::PixelType>   
00075                 >  Superclass;
00076   typedef SmartPointer<Self>   Pointer;
00077   typedef SmartPointer<const Self>  ConstPointer;
00078 
00080   itkNewMacro(Self);
00081   
00082 protected:
00083   Atan2ImageFilter() {}
00084   virtual ~Atan2ImageFilter() {}
00085 
00086 private:
00087   Atan2ImageFilter(const Self&); //purposely not implemented
00088   void operator=(const Self&); //purposely not implemented
00089 
00090 };
00091 
00092 } // end namespace itk
00093 
00094 
00095 #endif

Generated at Wed Mar 12 01:12:47 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000