From: David Sarrut Date: Fri, 16 Mar 2012 08:31:11 +0000 (+0100) Subject: Add FastFlag and Radius options (from initial RP) X-Git-Tag: v1.3.0~52^2~47 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5161e30f268baca6fb920ea7eeedffc181bfa433;p=clitk.git Add FastFlag and Radius options (from initial RP) --- 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();