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

itkAsinImageAdaptor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkAsinImageAdaptor.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:29:00 $
00007   Version:   $Revision: 1.11 $
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 __itkAsinImageAdaptor_h
00018 #define __itkAsinImageAdaptor_h
00019 
00020 #include <itkImageAdaptor.h>
00021 #include "vnl/vnl_math.h"
00022 
00023 namespace itk
00024 {
00025  
00026 namespace Accessor {
00038 template <class TInternalType, class TExternalType >
00039 class ITK_EXPORT AsinPixelAccessor  
00040 {
00041 public:
00042 
00045   typedef TExternalType ExternalType;
00046 
00049   typedef TInternalType InternalType;
00050 
00051   static inline void Set(TInternalType & output, const TExternalType & input) 
00052     {output = (TInternalType)asin((double)input);}
00053 
00054   static inline TExternalType Get( const TInternalType & input ) 
00055     {return (TExternalType)asin((double)input);}
00056 };
00057 
00058   
00059 } // end namespace Accessor
00060 
00069 template <class TImage, class TOutputPixelType>
00070 class ITK_EXPORT AsinImageAdaptor : public
00071       ImageAdaptor<TImage,
00072                    Accessor::AsinPixelAccessor<
00073                                       typename TImage::PixelType,
00074                                       TOutputPixelType>   >
00075 {
00076 public:
00078   typedef AsinImageAdaptor  Self;
00079   typedef ImageAdaptor<TImage,Accessor::AsinPixelAccessor<
00080                                        typename TImage::PixelType,
00081                                        TOutputPixelType> >
00082                                                             Superclass;
00083   typedef SmartPointer<Self>  Pointer;
00084   typedef SmartPointer<const Self>  ConstPointer;
00085   
00087   itkTypeMacro( AsinImageAdaptor, ImageAdaptor );
00088 
00090   itkNewMacro(Self);  
00091 
00092 protected:
00093   AsinImageAdaptor() {}
00094   virtual ~AsinImageAdaptor() {}
00095   
00096 private:
00097   AsinImageAdaptor(const Self&); //purposely not implemented
00098   void operator=(const Self&); //purposely not implemented
00099 };
00100 
00101 } // end namespace itk
00102 
00103 #endif

Generated at Wed May 24 22:47:10 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000