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

itkZeroCrossingBasedEdgeDetectionImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkZeroCrossingBasedEdgeDetectionImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:00 $ 00007 Version: $Revision: 1.11 $ 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 __itkZeroCrossingBasedEdgeDetectionImageFilter_h 00018 #define __itkZeroCrossingBasedEdgeDetectionImageFilter_h 00019 00020 #include "itkImageToImageFilter.h" 00021 #include "itkImage.h" 00022 00023 00024 namespace itk 00025 { 00026 00068 template<class TInputImage, class TOutputImage> 00069 class ITK_EXPORT ZeroCrossingBasedEdgeDetectionImageFilter 00070 : public ImageToImageFilter<TInputImage, TOutputImage> 00071 { 00072 public: 00074 typedef ZeroCrossingBasedEdgeDetectionImageFilter Self; 00075 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass; 00076 00078 typedef TInputImage InputImageType; 00079 typedef TOutputImage OutputImageType; 00080 00082 typedef SmartPointer<Self> Pointer; 00083 typedef SmartPointer<const Self> ConstPointer; 00084 00086 typedef typename TInputImage::PixelType InputImagePixelType; 00087 typedef typename TOutputImage::PixelType OutputImagePixelType; 00088 00090 itkNewMacro(Self); 00091 00093 typedef typename TOutputImage::RegionType OutputImageRegionType; 00094 00096 itkTypeMacro(ZeroCrossingBasedEdgeDetectionImageFilter, ImageToImageFilter); 00097 00099 itkStaticConstMacro(ImageDimension, unsigned int, 00100 TInputImage::ImageDimension ); 00101 00103 itkSetVectorMacro(Variance, double, ImageDimension); 00104 itkGetVectorMacro(Variance, const double, ImageDimension); 00105 itkSetVectorMacro(MaximumError, double, ImageDimension); 00106 itkGetVectorMacro(MaximumError, const double, ImageDimension); 00107 00109 itkGetMacro(BackgroundValue, OutputImagePixelType); 00110 itkSetMacro(BackgroundValue, OutputImagePixelType); 00111 itkGetMacro(ForegroundValue, OutputImagePixelType); 00112 itkSetMacro(ForegroundValue, OutputImagePixelType); 00113 00115 void SetVariance(const double v) 00116 { 00117 double vArray[ImageDimension]; 00118 for (unsigned int i = 0; i<ImageDimension; ++i) { vArray[i] = v; } 00119 this->SetVariance(vArray); 00120 } 00121 00123 void SetMaximumError(const double v) 00124 { 00125 double vArray[ImageDimension]; 00126 for (unsigned int i = 0; i<ImageDimension; ++i) { vArray[i] = v; } 00127 this->SetMaximumError(vArray); 00128 } 00129 00130 // virtual void GenerateInputRequestedRegion() 00131 // throw(InvalidRequestedRegionError); 00132 00133 protected: 00134 ZeroCrossingBasedEdgeDetectionImageFilter() 00135 { 00136 this->SetVariance(1.0f); 00137 this->SetMaximumError(0.01f); 00138 m_BackgroundValue = NumericTraits<OutputImagePixelType>::Zero; 00139 m_ForegroundValue = NumericTraits<OutputImagePixelType>::One; 00140 } 00141 ~ZeroCrossingBasedEdgeDetectionImageFilter(){} 00142 ZeroCrossingBasedEdgeDetectionImageFilter(const Self&) {} 00143 void PrintSelf(std::ostream& os, Indent indent) const; 00144 00151 void GenerateData(); 00152 00153 private: 00155 double m_Variance[ImageDimension]; 00156 00159 double m_MaximumError[ImageDimension]; 00160 00161 OutputImagePixelType m_BackgroundValue; 00162 OutputImagePixelType m_ForegroundValue; 00163 }; 00164 00165 } //end of namespace itk 00166 00167 #ifndef ITK_MANUAL_INSTANTIATION 00168 #include "itkZeroCrossingBasedEdgeDetectionImageFilter.txx" 00169 #endif 00170 00171 #endif 00172

Generated at Sat Mar 31 02:35:24 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000