ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkNarrowBandThresholdSegmentationLevelSetImageFilter_h 00019 #define __itkNarrowBandThresholdSegmentationLevelSetImageFilter_h 00020 00021 #include "itkNarrowBandLevelSetImageFilter.h" 00022 #include "itkThresholdSegmentationLevelSetFunction.h" 00023 00024 namespace itk 00025 { 00083 template< class TInputImage, 00084 class TFeatureImage, 00085 class TOutputPixelType = float > 00086 class ITK_EXPORT NarrowBandThresholdSegmentationLevelSetImageFilter: 00087 public NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, 00088 TOutputPixelType, Image< TOutputPixelType, 00089 ::itk::GetImageDimension< TInputImage >:: 00090 ImageDimension > > 00091 { 00092 public: 00094 typedef NarrowBandThresholdSegmentationLevelSetImageFilter Self; 00095 typedef NarrowBandLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType, 00096 Image< TOutputPixelType, 00097 ::itk::GetImageDimension< TInputImage >::ImageDimension > > 00098 Superclass; 00099 typedef SmartPointer< Self > Pointer; 00100 typedef SmartPointer< const Self > ConstPointer; 00101 00103 typedef typename Superclass::ValueType ValueType; 00104 typedef typename Superclass::OutputImageType OutputImageType; 00105 typedef typename Superclass::FeatureImageType FeatureImageType; 00106 00108 typedef ThresholdSegmentationLevelSetFunction< OutputImageType, 00109 FeatureImageType > ThresholdFunctionType; 00110 typedef typename ThresholdFunctionType::Pointer ThresholdFunctionPointer; 00111 00113 itkTypeMacro(NarrowBandThresholdSegmentationLevelSetImageFilter, NarrowBandLevelSetImageFilter); 00114 00116 itkNewMacro(Self); 00117 00120 void SetUpperThreshold(ValueType v) 00121 { 00122 this->m_ThresholdFunction->SetUpperThreshold(v); 00123 this->Modified(); 00124 } 00126 00127 void SetLowerThreshold(ValueType v) 00128 { 00129 this->m_ThresholdFunction->SetLowerThreshold(v); 00130 this->Modified(); 00131 } 00132 00133 ValueType GetUpperThreshold() const 00134 { 00135 return m_ThresholdFunction->GetUpperThreshold(); 00136 } 00137 00138 ValueType GetLowerThreshold() const 00139 { 00140 return m_ThresholdFunction->GetLowerThreshold(); 00141 } 00142 00145 void SetEdgeWeight(ValueType v) 00146 { 00147 this->m_ThresholdFunction->SetEdgeWeight(v); 00148 this->Modified(); 00149 } 00151 00152 ValueType GetEdgeWeight() const 00153 { 00154 return m_ThresholdFunction->GetEdgeWeight(); 00155 } 00156 00160 void SetSmoothingIterations(int v) 00161 { 00162 this->m_ThresholdFunction->SetSmoothingIterations(v); 00163 this->Modified(); 00164 } 00166 00167 int GetSmoothingIterations() const 00168 { 00169 return m_ThresholdFunction->GetSmoothingIterations(); 00170 } 00171 00175 void SetSmoothingTimeStep(ValueType v) 00176 { 00177 this->m_ThresholdFunction->SetSmoothingTimeStep(v); 00178 this->Modified(); 00179 } 00181 00182 ValueType GetSmoothingTimeStep() const 00183 { 00184 return m_ThresholdFunction->GetSmoothingTimeStep(); 00185 } 00186 00190 void SetSmoothingConductance(ValueType v) 00191 { 00192 this->m_ThresholdFunction->SetSmoothingConductance(v); 00193 this->Modified(); 00194 } 00196 00197 ValueType GetSmoothingConductance() const 00198 { 00199 return m_ThresholdFunction->GetSmoothingConductance(); 00200 } 00201 00202 #ifdef ITK_USE_CONCEPT_CHECKING 00203 00204 itkConceptMacro( OutputHasNumericTraitsCheck, 00205 ( Concept::HasNumericTraits< TOutputPixelType > ) ); 00206 00208 #endif 00209 protected: 00210 ~NarrowBandThresholdSegmentationLevelSetImageFilter() {} 00211 NarrowBandThresholdSegmentationLevelSetImageFilter(); 00212 00213 virtual void PrintSelf(std::ostream & os, Indent indent) const; 00214 00215 NarrowBandThresholdSegmentationLevelSetImageFilter(const Self &); // purposely 00216 // not impl. 00217 void operator=(const Self &); //purposely 00218 // not 00219 // implemented 00220 00221 private: 00222 ThresholdFunctionPointer m_ThresholdFunction; 00223 }; 00224 } // end namespace itk 00225 00226 #ifndef ITK_MANUAL_INSTANTIATION 00227 #include "itkNarrowBandThresholdSegmentationLevelSetImageFilter.hxx" 00228 #endif 00229 00230 #endif 00231