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

itkTanImageAdaptor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTanImageAdaptor.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/01/15 18:57: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 __itkTanImageAdaptor_h
00018 #define __itkTanImageAdaptor_h
00019 
00020 #include <itkImageAdaptor.h>
00021 #include "vnl/vnl_math.h"
00022 
00023 namespace itk
00024 {
00025  
00026 namespace Accessor {
00037 template <class TInternalType, class TExternalType >
00038 class ITK_EXPORT TanPixelAccessor  
00039 {
00040 public:
00043   typedef TExternalType ExternalType;
00044 
00047   typedef TInternalType InternalType;
00048 
00049   static inline void Set(TInternalType & output, const TExternalType & input) 
00050     {output = (TInternalType)tan((double)input);}
00051 
00052   static inline TExternalType Get( const TInternalType & input ) 
00053     {return (TExternalType)tan((double)input);}
00054 };
00055   
00056 } // end namespace Accessor
00057 
00067 template <class TImage, class TOutputPixelType>
00068 class ITK_EXPORT TanImageAdaptor : public
00069       ImageAdaptor<TImage,
00070                    Accessor::TanPixelAccessor<
00071                                       typename TImage::PixelType,
00072                                       TOutputPixelType>   >
00073 {
00074 public:
00076   typedef TanImageAdaptor  Self;
00077   typedef ImageAdaptor<TImage,Accessor::TanPixelAccessor<
00078                                        typename TImage::PixelType,
00079                                        TOutputPixelType> > Superclass;
00080   typedef SmartPointer<Self>  Pointer;
00081   typedef SmartPointer<const Self>  ConstPointer;
00082   
00084   itkNewMacro(Self);  
00085 
00087   itkTypeMacro( TanImageAdaptor, ImageAdaptor );
00088 
00089  protected:
00090   TanImageAdaptor() {}
00091   virtual ~TanImageAdaptor() {}
00092   
00093  private:
00094   TanImageAdaptor(const Self&); //purposely not implemented
00095   void operator=(const Self&); //purposely not implemented
00096 
00097 };
00098 
00099 } // end namespace itk
00100 
00101 #endif

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