18 #ifndef itkSegmentationLevelSetImageFilter_h
19 #define itkSegmentationLevelSetImageFilter_h
143 template<
typename TInputImage,
144 typename TFeatureImage,
145 typename TOutputPixelType =
float >
148 TInputImage::ImageDimension > >
190 itkWarningMacro(
"SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
191 this->SetNumberOfIterations(i);
197 itkWarningMacro(
"GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
198 return this->GetNumberOfIterations();
205 itkDebugMacro(
"setting input FeatureImage to " << f );
209 m_SegmentationFunction->SetFeatureImage(f);
213 itkGetInputMacro(FeatureImage, FeatureImageType);
218 itkSetInputMacro(InitialImage, InputImageType);
219 itkGetInputMacro(InitialImage, InputImageType);
225 this->SetFeatureImage(input);
232 { m_SegmentationFunction->SetSpeedImage(s); }
238 { m_SegmentationFunction->SetAdvectionImage(v); }
243 {
return m_SegmentationFunction->GetSpeedImage(); }
248 {
return m_SegmentationFunction->GetAdvectionImage(); }
256 <<
"SetUseNegativeFeaturesOn has been deprecated. Please use ReverseExpansionDirectionOn() instead");
257 this->ReverseExpansionDirectionOn();
264 <<
"SetUseNegativeFeaturesOff has been deprecated. Please use ReverseExpansionDirectionOff() instead");
265 this->ReverseExpansionDirectionOff();
272 itkWarningMacro(<<
"SetUseNegativeFeatures has been deprecated. Please use SetReverseExpansionDirection instead");
275 this->SetReverseExpansionDirection(
false);
279 this->SetReverseExpansionDirection(
true);
286 itkWarningMacro(<<
"GetUseNegativeFeatures has been deprecated. Please use GetReverseExpansionDirection() instead");
287 if ( m_ReverseExpansionDirection ==
false )
305 itkSetMacro(ReverseExpansionDirection,
bool);
306 itkGetConstMacro(ReverseExpansionDirection,
bool);
307 itkBooleanMacro(ReverseExpansionDirection);
315 itkSetMacro(AutoGenerateSpeedAdvection,
bool);
316 itkGetConstMacro(AutoGenerateSpeedAdvection,
bool);
317 itkBooleanMacro(AutoGenerateSpeedAdvection);
328 this->SetPropagationScaling(v);
332 this->SetAdvectionScaling(v);
343 m_SegmentationFunction->SetPropagationWeight(v);
351 return m_SegmentationFunction->GetPropagationWeight();
360 m_SegmentationFunction->SetAdvectionWeight(v);
368 return m_SegmentationFunction->GetAdvectionWeight();
379 m_SegmentationFunction->SetCurvatureWeight(v);
387 return m_SegmentationFunction->GetCurvatureWeight();
393 if ( m_SegmentationFunction->GetUseMinimalCurvature() != b )
395 m_SegmentationFunction->SetUseMinimalCurvature(b);
403 return m_SegmentationFunction->GetUseMinimalCurvature();
408 this->SetUseMinimalCurvature(
true);
413 this->SetUseMinimalCurvature(
false);
423 m_SegmentationFunction = s;
429 this->SetDifferenceFunction(m_SegmentationFunction);
434 {
return m_SegmentationFunction; }
442 if ( n != m_SegmentationFunction->GetMaximumCurvatureTimeStep() )
444 m_SegmentationFunction->SetMaximumCurvatureTimeStep(n);
452 return m_SegmentationFunction->GetMaximumCurvatureTimeStep();
461 if ( n != m_SegmentationFunction->GetMaximumPropagationTimeStep() )
463 m_SegmentationFunction->SetMaximumPropagationTimeStep(n);
471 return m_SegmentationFunction->GetMaximumPropagationTimeStep();
477 void GenerateSpeedImage();
482 void GenerateAdvectionImage();
484 #ifdef ITK_USE_CONCEPT_CHECKING
495 void PrintSelf(std::ostream & os,
Indent indent)
const override;
500 Superclass::InitializeIteration();
502 this->UpdateProgress( (
float)( (
float)this->GetElapsedIterations()
503 / (
float)this->GetNumberOfIterations() ) );
509 void GenerateData()
override;
526 #ifndef ITK_MANUAL_INSTANTIATION
527 #include "itkSegmentationLevelSetImageFilter.hxx"
void SetMaximumPropagationTimeStep(double n)
void SetUseNegativeFeaturesOn()
Light weight base class for most itk classes.
double GetMaximumCurvatureTimeStep() const
SegmentationFunctionType * m_SegmentationFunction
virtual void SetFeatureImage(const FeatureImageType *f)
ValueType GetAdvectionScaling() const
void UseMinimalCurvatureOff()
TFeatureImage FeatureImageType
bool GetUseMinimalCurvature() const
double GetMaximumPropagationTimeStep() const
void SetAdvectionImage(VectorImageType *v)
void SetUseNegativeFeatures(bool u)
This class implements a finite difference partial differential equation solver for evolving surfaces ...
typename SegmentationFunctionType::ImageType SpeedImageType
void InitializeIteration() override
void Initialize(const RadiusType &r) override
bool m_AutoGenerateSpeedAdvection
typename SegmentationFunctionType::VectorImageType VectorImageType
void SetUseMinimalCurvature(bool b)
void SetMaximumIterations(unsigned int i)
typename Superclass::InputImageType InputImageType
void SetMaximumCurvatureTimeStep(double n)
bool m_ReverseExpansionDirection
void SetPropagationScaling(ValueType v)
typename Superclass::ImageType ImageType
ImageBaseType::IndexType IndexType
typename Superclass::TimeStepType TimeStepType
void SetFeatureScaling(ValueType v)
ValueType GetPropagationScaling() const
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
virtual void SetSegmentationFunction(SegmentationFunctionType *s)
virtual const SpeedImageType * GetSpeedImage() const
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
virtual SegmentationFunctionType * GetSegmentationFunction()
void SetSpeedImage(SpeedImageType *s)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
void SetAdvectionScaling(ValueType v)
Control indentation during Print() invocation.
bool GetUseNegativeFeatures() const
ValueType GetCurvatureScaling() const
unsigned int GetMaximumIterations()
typename Superclass::IndexType IndexType
void SetUseNegativeFeaturesOff()
#define itkConceptMacro(name, concept)
virtual const VectorImageType * GetAdvectionImage() const
typename Superclass::RadiusType RadiusType
void SetInput2(const FeatureImageType *input)
A base class which defines the API for implementing a special class of image segmentation filters usi...
Templated n-dimensional image class.
void SetCurvatureScaling(ValueType v)
void UseMinimalCurvatureOn()
typename Superclass::ValueType ValueType