00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkVectorThresholdSegmentationLevelSetImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2004/06/01 18:33:45 $ 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 __itkVectorThresholdSegmentationLevelSetImageFilter_h_ 00018 #define __itkVectorThresholdSegmentationLevelSetImageFilter_h_ 00019 00020 #include "itkSegmentationLevelSetImageFilter.h" 00021 #include "itkVectorThresholdSegmentationLevelSetFunction.h" 00022 00023 namespace itk { 00024 00085 template <class TInputImage, 00086 class TFeatureImage, 00087 class TOutputPixelType = float > 00088 class ITK_EXPORT VectorThresholdSegmentationLevelSetImageFilter 00089 : public SegmentationLevelSetImageFilter<TInputImage, TFeatureImage, TOutputPixelType > 00090 { 00091 public: 00093 typedef VectorThresholdSegmentationLevelSetImageFilter Self; 00094 typedef SegmentationLevelSetImageFilter<TInputImage, TFeatureImage, TOutputPixelType> Superclass; 00095 typedef SmartPointer<Self> Pointer; 00096 typedef SmartPointer<const Self> ConstPointer; 00097 00099 typedef typename Superclass::ValueType ValueType; 00100 typedef typename Superclass::OutputImageType OutputImageType; 00101 typedef typename Superclass::FeatureImageType FeatureImageType; 00102 00104 typedef VectorThresholdSegmentationLevelSetFunction<OutputImageType,FeatureImageType> ThresholdFunctionType; 00105 typedef typename ThresholdFunctionType::Pointer ThresholdFunctionPointer; 00106 typedef typename ThresholdFunctionType::MeanVectorType MeanVectorType; 00107 typedef typename ThresholdFunctionType::CovarianceMatrixType CovarianceMatrixType; 00108 typedef typename ThresholdFunctionType::ScalarValueType ScalarValueType; 00109 00111 itkTypeMacro(VectorThresholdSegmentationLevelSetImageFilter, SegmentationLevelSetImageFilter); 00112 00114 itkNewMacro(Self); 00115 00117 void SetMean(const MeanVectorType &mean) 00118 { 00119 m_ThresholdFunction->SetMean(mean); 00120 this->Modified(); 00121 } 00122 const MeanVectorType & GetMean() const 00123 { 00124 return m_ThresholdFunction->GetMean(); 00125 } 00126 00127 00128 void SetCovariance(const CovarianceMatrixType &cov) 00129 { 00130 m_ThresholdFunction->SetCovariance(cov); 00131 this->Modified(); 00132 } 00133 const CovarianceMatrixType & GetCovariance() const 00134 { 00135 return m_ThresholdFunction->GetCovariance(); 00136 } 00137 00139 void SetThreshold(ScalarValueType thr) 00140 { 00141 m_ThresholdFunction->SetThreshold(thr); 00142 this->Modified(); 00143 } 00144 ScalarValueType GetThreshold () 00145 { 00146 return m_ThresholdFunction->GetThreshold(); 00147 } 00148 00149 00150 protected: 00151 ~VectorThresholdSegmentationLevelSetImageFilter() {} 00152 VectorThresholdSegmentationLevelSetImageFilter(); 00153 00154 virtual void PrintSelf(std::ostream &os, Indent indent) const; 00155 00156 VectorThresholdSegmentationLevelSetImageFilter(const Self &); // purposely not impl. 00157 void operator=(const Self&); //purposely not implemented 00158 private: 00159 ThresholdFunctionPointer m_ThresholdFunction; 00160 }; 00161 00162 } // end namespace itk 00163 00164 00165 00166 #ifndef ITK_MANUAL_INSTANTIATION 00167 #include "itkVectorThresholdSegmentationLevelSetImageFilter.txx" 00168 #endif 00169 00170 #endif