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

itkLog10ImageAdaptor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLog10ImageAdaptor.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/03/19 04:36:59 $
00007   Version:   $Revision: 1.12 $
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 __itkLog10ImageAdaptor_h
00018 #define __itkLog10ImageAdaptor_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 Log10PixelAccessor  
00040 {
00041 public:
00044   typedef TExternalType ExternalType;
00045 
00048   typedef TInternalType InternalType;
00049 
00050   static inline void Set(TInternalType & output, const TExternalType & input) 
00051     {output = (TInternalType)vcl_log10((double)input);}
00052 
00053   static inline TExternalType Get( const TInternalType & input ) 
00054     {return (TExternalType)vcl_log10((double)input);}
00055 
00056 };
00057 
00058   
00059 } // end namespace Accessor
00060 
00061 
00062  
00071 template <class TImage, class TOutputPixelType>
00072 class ITK_EXPORT Log10ImageAdaptor : public
00073       ImageAdaptor<TImage,Accessor::Log10PixelAccessor<
00074                                       typename TImage::PixelType,
00075                                       TOutputPixelType>   >
00076 {
00077 public:
00079   typedef Log10ImageAdaptor  Self;
00080   typedef ImageAdaptor<TImage,Accessor::Log10PixelAccessor<
00081                                  typename TImage::PixelType,
00082                                  TOutputPixelType> > Superclass;
00083   typedef SmartPointer<Self>  Pointer;
00084   typedef SmartPointer<const Self>  ConstPointer;
00085 
00087   itkNewMacro(Self);  
00088 
00090   itkTypeMacro( Log10ImageAdaptor, ImageAdaptor );
00091 
00092 protected:
00093   Log10ImageAdaptor() {}
00094   virtual ~Log10ImageAdaptor() {}
00095   
00096 private:
00097   Log10ImageAdaptor(const Self&); //purposely not implemented
00098   void operator=(const Self&); //purposely not implemented
00099 };
00100 
00101 } // end namespace itk
00102 
00103 #endif
00104 

Generated at Tue Jul 29 21:08:03 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000