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

itkTensorFractionalAnisotropyImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTensorFractionalAnisotropyImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/04/03 15:07:52 $
00007   Version:   $Revision: 1.6 $
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 __itkTensorFractionalAnisotropyImageFilter_h
00018 #define __itkTensorFractionalAnisotropyImageFilter_h
00019 
00020 #include "itkUnaryFunctorImageFilter.h"
00021 
00022 namespace itk
00023 {
00024 
00025 // This functor class invokes the computation of fractional anisotropy from
00026 // every pixel.
00027 namespace Functor {  
00028  
00029 template< typename TInput >
00030 class TensorFractionalAnisotropyFunction
00031 {
00032 public:
00033   typedef typename TInput::RealValueType  RealValueType;
00034   TensorFractionalAnisotropyFunction() {}
00035   ~TensorFractionalAnisotropyFunction() {}
00036   bool operator!=( const TensorFractionalAnisotropyFunction & ) const
00037   {
00038     return false;
00039   }
00040   bool operator==( const TensorFractionalAnisotropyFunction & other ) const
00041   {
00042     return !(*this != other);
00043   }
00044   inline RealValueType operator()( const TInput & x )
00045     {
00046     return x.GetFractionalAnisotropy();
00047     }
00048 }; 
00049 
00050 }  // end namespace functor
00051 
00052 
00067 template <typename  TInputImage, typename  TOutputImage=TInputImage>
00068 class ITK_EXPORT TensorFractionalAnisotropyImageFilter :
00069     public
00070 UnaryFunctorImageFilter<TInputImage,TOutputImage, 
00071                         Functor::TensorFractionalAnisotropyFunction< 
00072                                         typename TInputImage::PixelType> > 
00073 {
00074 public:
00076   typedef TensorFractionalAnisotropyImageFilter  Self;
00077   typedef UnaryFunctorImageFilter<TInputImage,TOutputImage, 
00078                                   Functor::TensorFractionalAnisotropyFunction< 
00079                                     typename TInputImage::PixelType> >  Superclass;
00080 
00081   typedef SmartPointer<Self>   Pointer;
00082   typedef SmartPointer<const Self>  ConstPointer;
00083 
00084   typedef typename Superclass::OutputImageType    OutputImageType;
00085   typedef typename TOutputImage::PixelType        OutputPixelType;
00086   typedef typename TInputImage::PixelType         InputPixelType;
00087   typedef typename InputPixelType::ValueType      InputValueType;
00088 
00089 
00091   itkNewMacro(Self);
00092 
00094   void PrintSelf(std::ostream& os, Indent indent) const
00095     { this->Superclass::PrintSelf( os, indent ); }
00096 
00097 #ifdef ITK_USE_CONCEPT_CHECKING
00098 
00099   itkConceptMacro(InputHasNumericTraitsCheck,
00100                   (Concept::HasNumericTraits<InputValueType>));
00101 
00103 #endif
00104 
00105 protected:
00106   TensorFractionalAnisotropyImageFilter() {};
00107   virtual ~TensorFractionalAnisotropyImageFilter() {};
00108 
00109 private:
00110   TensorFractionalAnisotropyImageFilter(const Self&); //purposely not implemented
00111   void operator=(const Self&); //purposely not implemented
00112 
00113 };
00114 
00115 
00116   
00117 } // end namespace itk
00118   
00119 #endif
00120 

Generated at Sun Sep 23 14:23:47 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000