18 #ifndef itkSegmentationLevelSetImageFilter_h
19 #define itkSegmentationLevelSetImageFilter_h
143 template<
typename TInputImage,
144 typename TFeatureImage,
145 typename TOutputPixelType =
float >
148 TInputImage::ImageDimension > >
189 itkWarningMacro(
"SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
190 this->SetNumberOfIterations(i);
196 itkWarningMacro(
"GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
197 return this->GetNumberOfIterations();
204 itkDebugMacro(
"setting input FeatureImage to " << f );
208 m_SegmentationFunction->SetFeatureImage(f);
212 itkGetInputMacro(FeatureImage, FeatureImageType);
217 itkSetInputMacro(InitialImage, InputImageType);
218 itkGetInputMacro(InitialImage, InputImageType);
224 this->SetFeatureImage(input);
231 { m_SegmentationFunction->SetSpeedImage(s); }
237 { m_SegmentationFunction->SetAdvectionImage(v); }
242 {
return m_SegmentationFunction->GetSpeedImage(); }
247 {
return m_SegmentationFunction->GetAdvectionImage(); }
255 <<
"SetUseNegativeFeaturesOn has been deprecated. Please use ReverseExpansionDirectionOn() instead");
256 this->ReverseExpansionDirectionOn();
263 <<
"SetUseNegativeFeaturesOff has been deprecated. Please use ReverseExpansionDirectionOff() instead");
264 this->ReverseExpansionDirectionOff();
271 itkWarningMacro(<<
"SetUseNegativeFeatures has been deprecated. Please use SetReverseExpansionDirection instead");
274 this->SetReverseExpansionDirection(
false);
278 this->SetReverseExpansionDirection(
true);
285 itkWarningMacro(<<
"GetUseNegativeFeatures has been deprecated. Please use GetReverseExpansionDirection() instead");
286 if ( m_ReverseExpansionDirection ==
false )
304 itkSetMacro(ReverseExpansionDirection,
bool);
305 itkGetConstMacro(ReverseExpansionDirection,
bool);
306 itkBooleanMacro(ReverseExpansionDirection);
314 itkSetMacro(AutoGenerateSpeedAdvection,
bool);
315 itkGetConstMacro(AutoGenerateSpeedAdvection,
bool);
316 itkBooleanMacro(AutoGenerateSpeedAdvection);
327 this->SetPropagationScaling(v);
331 this->SetAdvectionScaling(v);
342 m_SegmentationFunction->SetPropagationWeight(v);
350 return m_SegmentationFunction->GetPropagationWeight();
359 m_SegmentationFunction->SetAdvectionWeight(v);
367 return m_SegmentationFunction->GetAdvectionWeight();
378 m_SegmentationFunction->SetCurvatureWeight(v);
386 return m_SegmentationFunction->GetCurvatureWeight();
392 if ( m_SegmentationFunction->GetUseMinimalCurvature() != b )
394 m_SegmentationFunction->SetUseMinimalCurvature(b);
402 return m_SegmentationFunction->GetUseMinimalCurvature();
407 this->SetUseMinimalCurvature(
true);
412 this->SetUseMinimalCurvature(
false);
422 m_SegmentationFunction = s;
428 this->SetDifferenceFunction(m_SegmentationFunction);
433 {
return m_SegmentationFunction; }
441 if ( n != m_SegmentationFunction->GetMaximumCurvatureTimeStep() )
443 m_SegmentationFunction->SetMaximumCurvatureTimeStep(n);
451 return m_SegmentationFunction->GetMaximumCurvatureTimeStep();
460 if ( n != m_SegmentationFunction->GetMaximumPropagationTimeStep() )
462 m_SegmentationFunction->SetMaximumPropagationTimeStep(n);
470 return m_SegmentationFunction->GetMaximumPropagationTimeStep();
476 void GenerateSpeedImage();
481 void GenerateAdvectionImage();
483 #ifdef ITK_USE_CONCEPT_CHECKING
494 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
499 Superclass::InitializeIteration();
501 this->UpdateProgress( (
float)( (
float)this->GetElapsedIterations()
502 / (
float)this->GetNumberOfIterations() ) );
508 void GenerateData() ITK_OVERRIDE;
512 bool m_ReverseExpansionDirection;
518 bool m_AutoGenerateSpeedAdvection;
527 #ifndef ITK_MANUAL_INSTANTIATION
528 #include "itkSegmentationLevelSetImageFilter.hxx"
SmartPointer< const Self > ConstPointer
void SetMaximumPropagationTimeStep(double n)
void SetUseNegativeFeaturesOn()
double GetMaximumCurvatureTimeStep() const
SegmentationFunctionType::VectorImageType VectorImageType
virtual void SetFeatureImage(const FeatureImageType *f)
ValueType GetAdvectionScaling() const
void UseMinimalCurvatureOff()
SegmentationLevelSetImageFilter Self
Superclass::ImageType ImageType
Superclass::IndexType IndexType
bool GetUseMinimalCurvature() const
double GetMaximumPropagationTimeStep() const
void SetAdvectionImage(VectorImageType *v)
Superclass::RadiusType RadiusType
SegmentationLevelSetFunction< OutputImageType, FeatureImageType > SegmentationFunctionType
void SetUseNegativeFeatures(bool u)
This class implements a finite difference partial differential equation solver for evolving surfaces ...
SparseFieldLevelSetImageFilter< TInputImage, OutputImageType > Superclass
Superclass::InputImageType InputImageType
SmartPointer< Self > Pointer
void SetUseMinimalCurvature(bool b)
void SetMaximumIterations(unsigned int i)
void SetMaximumCurvatureTimeStep(double n)
void SetPropagationScaling(ValueType v)
void SetFeatureScaling(ValueType v)
virtual ~SegmentationLevelSetImageFilter() override
ValueType GetPropagationScaling() const
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
TFeatureImage FeatureImageType
Superclass::TimeStepType TimeStepType
virtual void SetSegmentationFunction(SegmentationFunctionType *s)
Image< TOutputPixelType, itkGetStaticConstMacro(InputImageDimension) > OutputImageType
virtual const SpeedImageType * GetSpeedImage() const
SegmentationFunctionType::ImageType SpeedImageType
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
virtual SegmentationFunctionType * GetSegmentationFunction()
void SetSpeedImage(SpeedImageType *s)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
virtual void InitializeIteration() override
void SetAdvectionScaling(ValueType v)
Superclass::ValueType ValueType
Control indentation during Print() invocation.
bool GetUseNegativeFeatures() const
ValueType GetCurvatureScaling() const
unsigned int GetMaximumIterations()
virtual void Initialize(const RadiusType &r) override
void SetUseNegativeFeaturesOff()
#define itkConceptMacro(name, concept)
virtual const VectorImageType * GetAdvectionImage() const
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)
ImageBaseType::IndexType IndexType
void UseMinimalCurvatureOn()