]> Creatis software - clitk.git/blobdiff - itk/clitkSliceBySliceRelativePositionFilter.txx
Remove vcl_math calls
[clitk.git] / itk / clitkSliceBySliceRelativePositionFilter.txx
index e68514da031c0f6f1a6725a2df78f97d0c189fe7..fc820be5ee44c48d8e37b2ebb2aa887b60e2921b 100644 (file)
@@ -43,6 +43,7 @@ SliceBySliceRelativePositionFilter():
   SetObjectCCLSelectionDirection(1);
   ObjectCCLSelectionIgnoreSingleCCLFlagOff();
   VerboseSlicesFlagOff();
+  this->SetK1(std::acos(-1.0)/2);
 }
 //--------------------------------------------------------------------
 
@@ -98,7 +99,8 @@ PrintOptions(std::ostream & os)
      << "ObjectCCLSelectionIgnoreSingleCCLFlag = " << this->GetObjectCCLSelectionIgnoreSingleCCLFlag() << std::endl    
      << "IgnoreEmptySliceObjectFlag = " << this->GetIgnoreEmptySliceObjectFlag() << std::endl
      << "(RP) FastFlag              = " << this->GetFastFlag() << std::endl
-     << "(RP) Radius                = " << this->GetRadius() << std::endl;
+     << "(RP) Radius                = " << this->GetRadius() << std::endl
+     << "(RP) K1                    = " << this->GetK1() << std::endl;
 }
 //--------------------------------------------------------------------
 
@@ -238,6 +240,10 @@ GenerateOutputInformation()
     int nb=0;
     mObjectSlices[i] = LabelizeAndCountNumberOfObjects<SliceType>(mObjectSlices[i], 0, true, 1, nb);
 
+    if (GetVerboseSlicesFlag()) {
+      std::cout << "slice " << i << " nb = " << nb << std::endl;
+    }
+
     // If no object and empty slices and if we need the full fuzzy map, create a dummy one.
     if ((nb==0) && (this->GetFuzzyMapOnlyFlag())) {
       typename FloatSliceType::Pointer one = FloatSliceType::New();
@@ -295,6 +301,7 @@ GenerateOutputInformation()
         if (GetVerboseSlicesFlag()) {
           std::cout << "Slice " << i << std::endl;
           relPosFilter->VerboseStepFlagOn();
+          //relPosFilter->WriteStepFlagOn();
         }
         relPosFilter->WriteStepFlagOff();
         // relPosFilter->VerboseMemoryFlagOn();
@@ -319,6 +326,7 @@ GenerateOutputInformation()
         //        relPosFilter->SetComputeFuzzyMapFlag(this->GetComputeFuzzyMapFlag());      
         relPosFilter->SetFastFlag(this->GetFastFlag());
         relPosFilter->SetRadius(this->GetRadius());
+        relPosFilter->SetK1(this->GetK1());
 
         // Go !
         relPosFilter->Update();