From 5161e30f268baca6fb920ea7eeedffc181bfa433 Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Fri, 16 Mar 2012 09:31:11 +0100 Subject: [PATCH] Add FastFlag and Radius options (from initial RP) --- ...tkAddRelativePositionConstraintToLabelImageFilter.h | 9 +++++++++ ...AddRelativePositionConstraintToLabelImageFilter.txx | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/itk/clitkAddRelativePositionConstraintToLabelImageFilter.h b/itk/clitkAddRelativePositionConstraintToLabelImageFilter.h index 00edd71..e151f6b 100644 --- a/itk/clitkAddRelativePositionConstraintToLabelImageFilter.h +++ b/itk/clitkAddRelativePositionConstraintToLabelImageFilter.h @@ -136,6 +136,13 @@ namespace clitk { itkSetMacro(FuzzyMapOnlyFlag, bool); itkBooleanMacro(FuzzyMapOnlyFlag); + itkGetConstMacro(FastFlag, bool); + itkSetMacro(FastFlag, bool); + itkBooleanMacro(FastFlag); + + itkGetConstMacro(Radius, double); + itkSetMacro(Radius, double); + typename FloatImageType::Pointer GetFuzzyMap() { return m_FuzzyMap; } // I dont want to verify inputs information @@ -162,6 +169,8 @@ namespace clitk { bool m_RemoveObjectFlag; bool m_CombineWithOrFlag; bool m_FuzzyMapOnlyFlag; + bool m_FastFlag; + double m_Radius; virtual void GenerateOutputInformation(); virtual void GenerateInputRequestedRegion(); diff --git a/itk/clitkAddRelativePositionConstraintToLabelImageFilter.txx b/itk/clitkAddRelativePositionConstraintToLabelImageFilter.txx index e25f98b..e27ce18 100644 --- a/itk/clitkAddRelativePositionConstraintToLabelImageFilter.txx +++ b/itk/clitkAddRelativePositionConstraintToLabelImageFilter.txx @@ -63,6 +63,8 @@ AddRelativePositionConstraintToLabelImageFilter(): VerboseStepFlagOff(); WriteStepFlagOff(); FuzzyMapOnlyFlagOff(); + FastFlagOff(); + SetRadius(2.0); } //-------------------------------------------------------------------- @@ -380,12 +382,16 @@ GenerateData() for(int i=0; iSetFast(GetFastFlag()); + relPosFilter->SetRadius(GetRadius()); relPosFilter->SetInput(working_image); relPosFilter->SetAlpha1(m_Angle1[i]); // xy plane relPosFilter->SetAlpha2(m_Angle2[i]); relPosFilter->SetK1(M_PI/2.0); // Opening parameter, default = pi/2 - relPosFilter->SetFast(true); - relPosFilter->SetRadius(1); // seems sufficient in this case + + // relPosFilter->SetFast(true); + // relPosFilter->SetRadius(1); // seems sufficient in this case + // relPosFilter->SetVerboseProgress(true); relPosFilter->Update(); relPos = relPosFilter->GetOutput(); -- 2.47.1