freVectorToNormImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   F.R.E.E. - flexible registration evaluation engine
00004   Version:   v.1.0.0
00005   Date:      $Date: 2006/09/01 12:00:00 $
00006   Module:    $RCSfile: freVectorToNormImageFilter.h,v $
00007   Language:  C++
00008 
00009 
00010 
00011   Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics,
00012   Institute for Medical Biometry and Informatics, University of Heidelberg,
00013   Germany). All rights reserved.
00014   See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm
00015   for details.
00016 
00017      This software is distributed WITHOUT ANY WARRANTY; without even 
00018      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00019      PURPOSE.  See the above copyright notices for more information.
00020 
00021 =========================================================================*/
00022 #ifndef __freVectorToNormImageFilter_h
00023 #define __freVectorToNormImageFilter_h
00024 
00025 #include "itkUnaryFunctorImageFilter.h"
00026 
00027 namespace FREE
00028 {
00029   
00035 namespace Functor
00036 {  
00037   
00038 template< class TInput, class TOutput>
00039 class VectorToNormFunctor
00040 {
00041 public:
00042   VectorToNormFunctor() {};
00043   ~VectorToNormFunctor() {};
00044   inline TOutput operator()( const TInput & a)
00045   {
00046     TOutput output = a.GetNorm();
00047     return output;
00048   }
00049 }; 
00050 }
00051 
00052 template <class TInputImage, class TOutputImage>
00053 class ITK_EXPORT VectorToNormImageFilter : public
00054                 itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, 
00055                          Functor::VectorToNormFunctor< 
00056   typename TInputImage::PixelType, 
00057   typename TOutputImage::PixelType>   >
00058 {
00059 public:
00061   typedef VectorToNormImageFilter  Self;
00062         typedef itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, 
00063                                                                                                                                                           Functor::VectorToNormFunctor< 
00064     typename TInputImage::PixelType, 
00065     typename TOutputImage::PixelType>   
00066   >  Superclass;
00067 
00068         typedef itk::SmartPointer<Self>   Pointer;
00069   typedef itk::SmartPointer<const Self>  ConstPointer;
00070 
00072   itkNewMacro(Self);
00073   
00074 protected:
00075   VectorToNormImageFilter() {}
00076   virtual ~VectorToNormImageFilter() {}
00077 
00078 private:
00079   VectorToNormImageFilter(const Self&); //purposely not implemented
00080   void operator=(const Self&); //purposely not implemented
00081 
00082 };
00083 
00084 } // end namespace FREE
00085 
00086 
00087 #endif

Generated at Sat Oct 13 18:02:05 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000