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

itkDifferenceImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkDifferenceImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:06 $ 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 __itkDifferenceImageFilter_h 00018 #define __itkDifferenceImageFilter_h 00019 00020 #include "itkImageToImageFilter.h" 00021 #include "itkNumericTraits.h" 00022 #include "itkArray.h" 00023 00024 namespace itk 00025 { 00026 00035 template <class TInputImage, class TOutputImage> 00036 class ITK_EXPORT DifferenceImageFilter : 00037 public ImageToImageFilter<TInputImage, TOutputImage> 00038 { 00039 public: 00041 typedef DifferenceImageFilter Self; 00042 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass; 00043 typedef SmartPointer<Self> Pointer; 00044 typedef SmartPointer<const Self> ConstPointer; 00045 00047 itkNewMacro(Self); 00048 00050 itkTypeMacro(DifferenceImageFilter, ImageToImageFilter); 00051 00053 typedef TInputImage InputImageType; 00054 typedef TOutputImage OutputImageType; 00055 typedef typename OutputImageType::PixelType OutputPixelType; 00056 typedef typename OutputImageType::RegionType OutputImageRegionType; 00057 typedef typename NumericTraits<OutputPixelType>::RealType RealType; 00058 typedef typename NumericTraits<RealType>::AccumulateType AccumulateType; 00059 00061 virtual void SetValidInput(const InputImageType* validImage); 00062 00064 virtual void SetTestInput(const InputImageType* testImage); 00065 00068 itkSetMacro(ToleranceRadius, int); 00069 itkGetMacro(ToleranceRadius, int); 00070 00073 itkSetMacro(DifferenceThreshold, OutputPixelType); 00074 itkGetMacro(DifferenceThreshold, OutputPixelType); 00075 00077 itkGetMacro(MeanDifference, RealType); 00078 itkGetMacro(TotalDifference, AccumulateType); 00079 00080 protected: 00081 DifferenceImageFilter(); 00082 virtual ~DifferenceImageFilter() {} 00083 00084 void PrintSelf(std::ostream& os, Indent indent) const; 00085 00097 void ThreadedGenerateData(const OutputImageRegionType& threadRegion, 00098 int threadId); 00099 00100 void BeforeThreadedGenerateData(); 00101 void AfterThreadedGenerateData(); 00102 00103 OutputPixelType m_DifferenceThreshold; 00104 RealType m_MeanDifference; 00105 AccumulateType m_TotalDifference; 00106 int m_ToleranceRadius; 00107 00108 Array<AccumulateType> m_ThreadDifferenceSum; 00109 00110 private: 00111 DifferenceImageFilter(const Self&); //purposely not implemented 00112 void operator=(const Self&); //purposely not implemented 00113 }; 00114 00115 } // end namespace itk 00116 00117 #ifndef ITK_MANUAL_INSTANTIATION 00118 #include "itkDifferenceImageFilter.txx" 00119 #endif 00120 00121 #endif

Generated at Sun Apr 1 02:27:12 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000