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

itkExpNegativeImageAdaptor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkExpNegativeImageAdaptor.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-09-19 19:56:20 $
00007   Version:   $Revision: 1.5 $
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 __itkExpNegativeImageAdaptor_h
00018 #define __itkExpNegativeImageAdaptor_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 ExpNegativePixelAccessor  
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 = static_cast<TInternalType>( vcl_exp(-static_cast<double>( input ) ) );}
00051 
00052   static inline TExternalType Get( const TInternalType & input ) 
00053     {return static_cast<TExternalType>( vcl_exp(-static_cast<double>( input) ) );}
00054 
00055 };
00056   
00057 } // end namespace Accessor
00058 
00067 template <class TImage, class TOutputPixelType>
00068 class ITK_EXPORT ExpNegativeImageAdaptor : public
00069       ImageAdaptor<TImage,Accessor::ExpNegativePixelAccessor<
00070                                       typename TImage::PixelType,
00071                                       TOutputPixelType>   >
00072 {
00073 public:
00075   typedef ExpNegativeImageAdaptor                         Self;
00076   typedef ImageAdaptor<
00077     TImage,Accessor::ExpNegativePixelAccessor<
00078       typename TImage::PixelType, TOutputPixelType> >     Superclass;
00079   typedef SmartPointer<Self>                              Pointer;
00080   typedef SmartPointer<const Self>                        ConstPointer;
00081 
00083   itkNewMacro(Self);  
00084 
00086   itkTypeMacro( ExpNegativeImageAdaptor, ImageAdaptor );
00087 
00088 protected:
00089   ExpNegativeImageAdaptor() {}
00090   virtual ~ExpNegativeImageAdaptor() {}
00091   
00092 private:
00093   ExpNegativeImageAdaptor(const Self&); //purposely not implemented
00094   void operator=(const Self&); //purposely not implemented
00095 };
00096 
00097 } // end namespace itk
00098 
00099 #endif
00100 

Generated at Mon Jul 12 2010 18:17:01 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000