17 #ifndef __itkSegmentationLevelSetImageFilter_h
18 #define __itkSegmentationLevelSetImageFilter_h
139 template <
class TInputImage,
141 class TOutputPixelType =
float >
144 ::itk::GetImageDimension<TInputImage>::ImageDimension> >
153 itkStaticConstMacro(InputImageDimension,
unsigned int, TInputImage::ImageDimension);
186 void SetMaximumIterations (
unsigned int i)
188 itkWarningMacro(
"SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
189 this->SetNumberOfIterations(i);
191 unsigned int GetMaximumIterations()
193 itkWarningMacro(
"GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
194 return this->GetNumberOfIterations();
202 m_SegmentationFunction->SetFeatureImage(f);
217 this->SetFeatureImage( input );
224 { m_SegmentationFunction->SetSpeedImage( s ); }
230 { m_SegmentationFunction->SetAdvectionImage( v ); }
235 {
return m_SegmentationFunction->GetSpeedImage(); }
240 {
return m_SegmentationFunction->GetAdvectionImage(); }
245 void SetUseNegativeFeaturesOn()
247 itkWarningMacro( <<
"SetUseNegativeFeaturesOn has been deprecated. Please use ReverseExpansionDirectionOn() instead" );
248 this->ReverseExpansionDirectionOn();
250 void SetUseNegativeFeaturesOff()
252 itkWarningMacro( <<
"SetUseNegativeFeaturesOff has been deprecated. Please use ReverseExpansionDirectionOff() instead" );
253 this->ReverseExpansionDirectionOff();
258 void SetUseNegativeFeatures(
bool u )
260 itkWarningMacro( <<
"SetUseNegativeFeatures has been deprecated. Please use SetReverseExpansionDirection instead" );
263 this->SetReverseExpansionDirection(
false);
267 this->SetReverseExpansionDirection(
true);
270 bool GetUseNegativeFeatures()
const
272 itkWarningMacro( <<
"GetUseNegativeFeatures has been deprecated. Please use GetReverseExpansionDirection() instead" );
273 if ( m_ReverseExpansionDirection ==
false)
291 itkSetMacro(ReverseExpansionDirection,
bool);
292 itkGetConstMacro(ReverseExpansionDirection,
bool);
293 itkBooleanMacro(ReverseExpansionDirection);
300 itkSetMacro(AutoGenerateSpeedAdvection,
bool);
301 itkGetConstMacro(AutoGenerateSpeedAdvection,
bool);
302 itkBooleanMacro(AutoGenerateSpeedAdvection);
310 if (v != m_SegmentationFunction->GetPropagationWeight())
312 this->SetPropagationScaling(v);
314 if (v != m_SegmentationFunction->GetAdvectionWeight())
316 this->SetAdvectionScaling(v);
324 if (v != m_SegmentationFunction->GetPropagationWeight())
326 m_SegmentationFunction->SetPropagationWeight(v);
332 return m_SegmentationFunction->GetPropagationWeight();
339 if (v != m_SegmentationFunction->GetAdvectionWeight())
341 m_SegmentationFunction->SetAdvectionWeight(v);
347 return m_SegmentationFunction->GetAdvectionWeight();
356 if (v != m_SegmentationFunction->GetCurvatureWeight())
358 m_SegmentationFunction->SetCurvatureWeight(v);
364 return m_SegmentationFunction->GetCurvatureWeight();
368 void SetUseMinimalCurvature(
bool b )
370 if ( m_SegmentationFunction->GetUseMinimalCurvature() != b)
372 m_SegmentationFunction->SetUseMinimalCurvature( b );
376 bool GetUseMinimalCurvature()
const
378 return m_SegmentationFunction->GetUseMinimalCurvature();
380 void UseMinimalCurvatureOn()
382 this->SetUseMinimalCurvature(
true);
384 void UseMinimalCurvatureOff()
386 this->SetUseMinimalCurvature(
false);
397 m_SegmentationFunction = s;
403 this->SetDifferenceFunction(m_SegmentationFunction);
408 {
return m_SegmentationFunction; }
415 void SetMaximumCurvatureTimeStep(
double n)
417 if ( n != m_SegmentationFunction->GetMaximumCurvatureTimeStep() )
423 double GetMaximumCurvatureTimeStep()
const
425 return m_SegmentationFunction->GetMaximumCurvatureTimeStep();
432 void SetMaximumPropagationTimeStep(
double n)
434 if (n != m_SegmentationFunction->GetMaximumPropagationTimeStep() )
436 m_SegmentationFunction->SetMaximumPropagationTimeStep(n);
440 double GetMaximumPropagationTimeStep()
const
442 return m_SegmentationFunction->GetMaximumPropagationTimeStep();
448 void GenerateSpeedImage();
453 void GenerateAdvectionImage();
455 #ifdef ITK_USE_CONCEPT_CHECKING
466 virtual void PrintSelf(std::ostream& os,
Indent indent)
const;
469 virtual void InitializeIteration()
471 Superclass::InitializeIteration();
473 this->SetProgress( (
float) ((
float)this->GetElapsedIterations()
474 / (
float)this->GetNumberOfIterations()) );
493 void operator=(
const Self&);
500 #ifndef ITK_MANUAL_INSTANTIATION