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

itkAtanImageAdaptor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkAtanImageAdaptor.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/01/15 18:56:22 $
00007   Version:   $Revision: 1.10 $
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 __itkAtanImageAdaptor_h
00018 #define __itkAtanImageAdaptor_h
00019 
00020 #include <itkImageAdaptor.h>
00021 #include "vnl/vnl_math.h"
00022 
00023 namespace itk
00024 {
00025  
00026 namespace Accessor {
00039 template <class TInternalType, class TExternalType >
00040 class ITK_EXPORT AtanPixelAccessor  
00041 {
00042 public:
00043 
00046   typedef TExternalType ExternalType;
00047 
00050   typedef TInternalType InternalType;
00051 
00052   static inline void Set(TInternalType & output, const TExternalType & input) 
00053     {output = (TInternalType)atan((double)input);}
00054 
00055   static inline TExternalType Get( const TInternalType & input ) 
00056     {return (TExternalType)atan((double)input);}
00057 };
00058 
00059   
00060 } // end namespace Accessor
00061  
00072 template <class TImage, class TOutputPixelType>
00073 class ITK_EXPORT AtanImageAdaptor : public
00074       ImageAdaptor<TImage,
00075                    Accessor::AtanPixelAccessor<
00076                                       typename TImage::PixelType,
00077                                       TOutputPixelType>   >
00078 {
00079 public:
00081   typedef AtanImageAdaptor  Self;
00082   typedef ImageAdaptor<TImage,Accessor::AtanPixelAccessor<
00083                                        typename TImage::PixelType,
00084                                        TOutputPixelType> >
00085                                                             Superclass;
00086   typedef SmartPointer<Self>  Pointer;
00087   typedef SmartPointer<const Self>  ConstPointer;
00088   
00090   itkTypeMacro( AtanImageAdaptor, ImageAdaptor );
00091 
00093   itkNewMacro(Self);  
00094 
00095 protected:
00096   AtanImageAdaptor() {}
00097   virtual ~AtanImageAdaptor() {}
00098   
00099 private:
00100   AtanImageAdaptor(const Self&); //purposely not implemented
00101   void operator=(const Self&); //purposely not implemented
00102 };
00103 
00104 } // end namespace itk
00105 
00106 #endif

Generated at Fri May 21 01:14:26 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000