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/12/08 02:38:31 $ 00007 Version: $Revision: 1.13 $ 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 "itkFixedArray.h" 00022 #include "itkImage.h" 00023 00024 00025 namespace itk 00026 { 00027 00069 template<class TInputImage, class TOutputImage> 00070 class ITK_EXPORT ZeroCrossingBasedEdgeDetectionImageFilter 00071 : public ImageToImageFilter<TInputImage, TOutputImage> 00072 { 00073 public: 00075 typedef ZeroCrossingBasedEdgeDetectionImageFilter Self; 00076 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass; 00077 00079 typedef TInputImage InputImageType; 00080 typedef TOutputImage OutputImageType; 00081 00083 typedef SmartPointer<Self> Pointer; 00084 typedef SmartPointer<const Self> ConstPointer; 00085 00087 typedef typename TInputImage::PixelType InputImagePixelType; 00088 typedef typename TOutputImage::PixelType OutputImagePixelType; 00089 00091 itkNewMacro(Self); 00092 00094 typedef typename TOutputImage::RegionType OutputImageRegionType; 00095 00097 itkTypeMacro(ZeroCrossingBasedEdgeDetectionImageFilter, ImageToImageFilter); 00098 00100 itkStaticConstMacro(ImageDimension, unsigned int, 00101 TInputImage::ImageDimension ); 00102 00104 typedef FixedArray<double, itkGetStaticConstMacro(ImageDimension)> ArrayType; 00105 00107 itkSetMacro(Variance, ArrayType); 00108 itkGetMacro(Variance, const ArrayType); 00109 itkSetMacro(MaximumError, ArrayType); 00110 itkGetMacro(MaximumError, const ArrayType); 00111 00113 itkGetMacro(BackgroundValue, OutputImagePixelType); 00114 itkSetMacro(BackgroundValue, OutputImagePixelType); 00115 itkGetMacro(ForegroundValue, OutputImagePixelType); 00116 itkSetMacro(ForegroundValue, OutputImagePixelType); 00117 00119 void SetVariance(const typename ArrayType::ValueType v) 00120 { 00121 m_Variance.Fill(v); 00122 } 00123 00125 void SetMaximumError(const typename ArrayType::ValueType v) 00126 { 00127 m_MaximumError.Fill(v); 00128 } 00129 00130 protected: 00131 ZeroCrossingBasedEdgeDetectionImageFilter() 00132 { 00133 m_Variance.Fill(1.0); 00134 m_MaximumError.Fill(0.01); 00135 m_BackgroundValue = NumericTraits<OutputImagePixelType>::Zero; 00136 m_ForegroundValue = NumericTraits<OutputImagePixelType>::One; 00137 } 00138 ~ZeroCrossingBasedEdgeDetectionImageFilter(){} 00139 ZeroCrossingBasedEdgeDetectionImageFilter(const Self&) {} 00140 void PrintSelf(std::ostream& os, Indent indent) const; 00141 00148 void GenerateData(); 00149 00150 private: 00152 ArrayType m_Variance; 00153 00156 ArrayType m_MaximumError; 00157 00158 OutputImagePixelType m_BackgroundValue; 00159 OutputImagePixelType m_ForegroundValue; 00160 }; 00161 00162 } //end of namespace itk 00163 00164 #ifndef ITK_MANUAL_INSTANTIATION 00165 #include "itkZeroCrossingBasedEdgeDetectionImageFilter.txx" 00166 #endif 00167 00168 #endif 00169

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