00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkCannySegmentationLevelSetImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2008-10-23 16:15:22 $ 00007 Version: $Revision: 1.16 $ 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 __itkCannySegmentationLevelSetImageFilter_h 00018 #define __itkCannySegmentationLevelSetImageFilter_h 00019 00020 #include "itkSegmentationLevelSetImageFilter.h" 00021 #include "itkCannySegmentationLevelSetFunction.h" 00022 00023 namespace itk { 00024 00126 template <class TInputImage, 00127 class TFeatureImage, 00128 class TOutputPixelType = float> 00129 class ITK_EXPORT CannySegmentationLevelSetImageFilter 00130 : public SegmentationLevelSetImageFilter<TInputImage, TFeatureImage, TOutputPixelType > 00131 { 00132 public: 00134 typedef CannySegmentationLevelSetImageFilter Self; 00135 typedef SegmentationLevelSetImageFilter<TInputImage, TFeatureImage, TOutputPixelType > 00136 Superclass; 00137 typedef SmartPointer<Self> Pointer; 00138 typedef SmartPointer<const Self> ConstPointer; 00139 00141 typedef typename Superclass::ValueType ValueType; 00142 typedef typename Superclass::OutputImageType OutputImageType; 00143 typedef typename Superclass::FeatureImageType FeatureImageType; 00144 typedef typename Superclass::VectorImageType VectorImageType; 00145 typedef typename Superclass::SpeedImageType SpeedImageType; 00146 00148 typedef ::itk::CannySegmentationLevelSetFunction<OutputImageType, 00149 FeatureImageType> CannyFunctionType; 00150 00151 typedef typename CannyFunctionType::ScalarValueType ScalarValueType; 00152 00154 itkTypeMacro(CannySegmentationLevelSetImageFilter, SegmentationLevelSetImageFilter); 00155 00157 itkNewMacro(Self); 00158 00161 void SetThreshold(ScalarValueType v) 00162 { this->m_CannyFunction->SetThreshold(v); } 00163 ScalarValueType GetThreshold() const 00164 { return this->m_CannyFunction->GetThreshold(); } 00166 00169 void SetVariance(double v) 00170 { this->m_CannyFunction->SetVariance(v); } 00171 double GetVariance() const 00172 { return this->m_CannyFunction->GetVariance(); } 00174 00177 OutputImageType *GetCannyImage(void) 00178 { return this->m_CannyFunction->GetCannyImage(); } 00179 00180 #ifdef ITK_USE_CONCEPT_CHECKING 00181 00182 itkConceptMacro(OutputHasNumericTraitsCheck, 00183 (Concept::HasNumericTraits<TOutputPixelType>)); 00184 00186 #endif 00187 00188 protected: 00189 ~CannySegmentationLevelSetImageFilter() {} 00190 CannySegmentationLevelSetImageFilter(); 00191 00192 private: 00193 CannySegmentationLevelSetImageFilter(const Self&); //purposely not implemented 00194 void operator=(const Self&); //purposely not implemented 00195 00196 typename CannyFunctionType::Pointer m_CannyFunction; 00197 }; 00198 00199 } // end namespace itk 00200 00201 #ifndef ITK_MANUAL_INSTANTIATION 00202 #include "itkCannySegmentationLevelSetImageFilter.txx" 00203 #endif 00204 00205 #endif 00206