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

itkHausdorffDistanceImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkHausdorffDistanceImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:27:26 $
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 __itkHausdorffDistanceImageFilter_h
00018 #define __itkHausdorffDistanceImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkNumericTraits.h"
00022 
00023 namespace itk {
00024 
00059 template<class TInputImage1, class TInputImage2>
00060 class ITK_EXPORT HausdorffDistanceImageFilter : 
00061     public ImageToImageFilter<TInputImage1, TInputImage1>
00062 {
00063 public:
00065   typedef HausdorffDistanceImageFilter                   Self;
00066   typedef ImageToImageFilter<TInputImage1,TInputImage1>  Superclass;
00067   typedef SmartPointer<Self>                             Pointer;
00068   typedef SmartPointer<const Self>                       ConstPointer;
00069 
00071   itkNewMacro(Self);  
00072 
00074   itkTypeMacro(HausdorffDistanceImageFilter, ImageToImageFilter);
00075 
00077   typedef TInputImage1                        InputImage1Type;
00078   typedef TInputImage2                        InputImage2Type;
00079   typedef typename TInputImage1::Pointer      InputImage1Pointer;
00080   typedef typename TInputImage2::Pointer      InputImage2Pointer;
00081   typedef typename TInputImage1::ConstPointer InputImage1ConstPointer;
00082   typedef typename TInputImage2::ConstPointer InputImage2ConstPointer;
00083 
00084   typedef typename TInputImage1::RegionType RegionType;
00085   typedef typename TInputImage1::SizeType   SizeType;
00086   typedef typename TInputImage1::IndexType  IndexType;
00087 
00088   typedef typename TInputImage1::PixelType InputImage1PixelType;
00089   typedef typename TInputImage2::PixelType InputImage2PixelType;
00090   
00092   itkStaticConstMacro(ImageDimension, unsigned int,
00093                       TInputImage1::ImageDimension);
00094 
00096   typedef typename NumericTraits<InputImage1PixelType>::RealType RealType;
00097 
00099   void SetInput1( const InputImage1Type * image )
00100     { this->SetInput( image ); }
00101 
00103   void SetInput2( const InputImage2Type * image );
00104 
00106   const InputImage1Type * GetInput1(void)
00107     { return this->GetInput(); }
00108 
00110   const InputImage2Type * GetInput2(void);
00111 
00113   itkGetConstMacro(HausdorffDistance,RealType);
00114   itkGetConstMacro(AverageHausdorffDistance,RealType);
00116 
00117 #ifdef ITK_USE_CONCEPT_CHECKING
00118 
00119   itkConceptMacro(Input1HasNumericTraitsCheck,
00120     (Concept::HasNumericTraits<InputImage1PixelType>));
00121 
00123 #endif
00124 
00125 protected:
00126   HausdorffDistanceImageFilter();
00127   ~HausdorffDistanceImageFilter(){};
00128   void PrintSelf(std::ostream& os, Indent indent) const;
00129   
00131   void  GenerateData();
00132 
00133   // Override since the filter needs all the data for the algorithm
00134   void GenerateInputRequestedRegion();
00135 
00136   // Override since the filter produces all of its output
00137   void EnlargeOutputRequestedRegion(DataObject *data);
00138 
00139 private:
00140   HausdorffDistanceImageFilter(const Self&); //purposely not implemented
00141   void operator=(const Self&); //purposely not implemented
00142 
00143   RealType                            m_HausdorffDistance;
00144   RealType                            m_AverageHausdorffDistance;
00145 
00146 }; // end of class
00147 
00148 } // end namespace itk
00149   
00150 #ifndef ITK_MANUAL_INSTANTIATION
00151 #include "itkHausdorffDistanceImageFilter.txx"
00152 #endif
00153 
00154 #endif
00155 

Generated at Tue Sep 15 03:09:54 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000