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: 2006/03/19 04:36:58 $
00007   Version:   $Revision: 1.13 $
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 __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)vcl_atan((double)input);}
00054 
00055   static inline TExternalType Get( const TInternalType & input ) 
00056     {return (TExternalType)vcl_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:
00080 
00082   typedef AtanImageAdaptor                                  Self;
00083   typedef ImageAdaptor<TImage,Accessor::AtanPixelAccessor<
00084                                        typename TImage::PixelType,
00085                                        TOutputPixelType> >
00086                                                             Superclass;
00087   typedef SmartPointer<Self>                                Pointer;
00088   typedef SmartPointer<const Self>                          ConstPointer;
00089 
00091   itkTypeMacro( AtanImageAdaptor, ImageAdaptor );
00092 
00094   itkNewMacro(Self);  
00095 
00096 protected:
00097   AtanImageAdaptor() {}
00098   virtual ~AtanImageAdaptor() {}
00099   
00100 private:
00101   AtanImageAdaptor(const Self&); //purposely not implemented
00102   void operator=(const Self&); //purposely not implemented
00103 };
00104 
00105 } // end namespace itk
00106 
00107 #endif
00108 

Generated at Tue Jul 29 19:07:18 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000