]> Creatis software - clitk.git/commitdiff
Add FastFlag and Radius options (from initial RP)
authorDavid Sarrut <david.sarrut@gmail.com>
Fri, 16 Mar 2012 08:31:11 +0000 (09:31 +0100)
committerDavid Sarrut <david.sarrut@gmail.com>
Fri, 16 Mar 2012 08:31:11 +0000 (09:31 +0100)
itk/clitkAddRelativePositionConstraintToLabelImageFilter.h
itk/clitkAddRelativePositionConstraintToLabelImageFilter.txx

index 00edd718b167f5d980dacd6941eeb7a587b951d2..e151f6b682ab43d6be50f2ca20542ccc6076e5c5 100644 (file)
@@ -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();
index e25f98b829fa3c65ed497f5fb5ffd73de863a066..e27ce18c4ee215c4ba3c31dcf8522d94c6fe9ad2 100644 (file)
@@ -63,6 +63,8 @@ AddRelativePositionConstraintToLabelImageFilter():
   VerboseStepFlagOff();
   WriteStepFlagOff();
   FuzzyMapOnlyFlagOff();
+  FastFlagOff();
+  SetRadius(2.0);
 }
 //--------------------------------------------------------------------
 
@@ -380,12 +382,16 @@ GenerateData()
   for(int i=0; i<GetNumberOfAngles(); i++) {
     // Compute fuzzy map
     relPosFilter = RelPosFilterType::New();
+    relPosFilter->SetFast(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();