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

itkBoundedReciprocalImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkBoundedReciprocalImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/03/17 04:32:29 $
00007   Version:   $Revision: 1.1 $
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 __itkBoundedReciprocalImageFilter_h
00018 #define __itkBoundedReciprocalImageFilter_h
00019 
00020 #include "itkUnaryFunctorImageFilter.h"
00021 
00022 namespace itk
00023 {
00024   
00033 namespace Functor {  
00034   
00035 template< class TInput, class TOutput>
00036 class BoundedReciprocal
00037 {
00038 public:
00039   BoundedReciprocal() {};
00040   ~BoundedReciprocal() {};
00041   inline TOutput operator()( const TInput & A )
00042   {
00043     return static_cast<TOutput>( 1.0 / ( 1.0 +  static_cast<double>(A) ) );
00044   }
00045 };
00046 }
00047 
00048 template <class TInputImage, class TOutputImage>
00049 class ITK_EXPORT BoundedReciprocalImageFilter :
00050     public
00051 UnaryFunctorImageFilter<TInputImage,TOutputImage, 
00052                         Functor::BoundedReciprocal< 
00053   typename TInputImage::PixelType, 
00054   typename TOutputImage::PixelType> >
00055 {
00056 public:
00058   typedef BoundedReciprocalImageFilter  Self;
00059   typedef UnaryFunctorImageFilter<TInputImage,TOutputImage, 
00060                                   Functor::BoundedReciprocal< 
00061     typename TInputImage::PixelType, 
00062     typename TOutputImage::PixelType>   
00063   >  Superclass;
00064   typedef SmartPointer<Self>   Pointer;
00065   typedef SmartPointer<const Self>  ConstPointer;
00066 
00068   itkNewMacro(Self);
00069   
00070 protected:
00071   BoundedReciprocalImageFilter() {}
00072   virtual ~BoundedReciprocalImageFilter() {}
00073 
00074 private:
00075   BoundedReciprocalImageFilter(const Self&); //purposely not implemented
00076   void operator=(const Self&); //purposely not implemented
00077 
00078 };
00079 
00080 
00081 } // end namespace itk
00082 
00083 
00084 #endif

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