]> Creatis software - clitk.git/commitdiff
Add FastFlag and radius option
authorDavid Sarrut <david.sarrut@gmail.com>
Tue, 20 Mar 2012 13:18:22 +0000 (14:18 +0100)
committerDavid Sarrut <david.sarrut@gmail.com>
Tue, 20 Mar 2012 13:18:22 +0000 (14:18 +0100)
itk/clitkSliceBySliceRelativePositionFilter.txx

index 62dfb21813db106701dc1740334566f43792a5c2..eff331daa9e6d99269629f4ba6f112aca2fcec96 100644 (file)
@@ -181,6 +181,8 @@ GenerateOutputInformation()
     m_working_object = clitk::ResizeImageLike<ImageType>(m_working_object, 
                                                          m_working_input, 
                                                          this->GetObjectBackgroundValue());
+    
+    // End
     this->template StopCurrentStep<ImageType>(m_working_input);  
   }
   
@@ -223,7 +225,7 @@ GenerateOutputInformation()
 
   //--------------------------------------------------------------------
   // Perform slice by slice relative position
-  this->StartNewStep("Perform slice by slice relative position");
+  this->StartNewStep("Perform slice by slice relative position ("+toString(mInputSlices.size())+")");
   for(unsigned int i=0; i<mInputSlices.size(); i++) {
     
     // Count the number of CCL (allow to ignore empty slice)
@@ -283,17 +285,14 @@ GenerateOutputInformation()
         // Relative position
         typedef clitk::AddRelativePositionConstraintToLabelImageFilter<SliceType> RelPosFilterType;
         typename RelPosFilterType::Pointer relPosFilter = RelPosFilterType::New();
-
         relPosFilter->VerboseStepFlagOff();
         relPosFilter->WriteStepFlagOff();
         // relPosFilter->VerboseMemoryFlagOn();
-        relPosFilter->SetCurrentStepBaseId(this->GetCurrentStepId()+"-"+toString(i));
-        
+        relPosFilter->SetCurrentStepBaseId(this->GetCurrentStepId()+"-"+toString(i));        
         relPosFilter->SetBackgroundValue(this->GetBackgroundValue());
         relPosFilter->SetInput(mInputSlices[i]); 
         relPosFilter->SetInputObject(mObjectSlices[i]); 
-        relPosFilter->SetRemoveObjectFlag(this->GetRemoveObjectFlag());
-        
+        relPosFilter->SetRemoveObjectFlag(this->GetRemoveObjectFlag());        
         // This flag (InverseOrientation) *must* be set before
         // AddOrientation because AddOrientation can change it.
         relPosFilter->SetInverseOrientationFlag(this->GetInverseOrientationFlag());
@@ -305,11 +304,12 @@ GenerateOutputInformation()
         relPosFilter->SetFuzzyThreshold(this->GetFuzzyThreshold());
         relPosFilter->AutoCropFlagOff(); // important ! because we join the slices after this loop
         relPosFilter->SetCombineWithOrFlag(this->GetCombineWithOrFlag()); 
-
         // should we stop after fuzzy map ?
         relPosFilter->SetFuzzyMapOnlyFlag(this->GetFuzzyMapOnlyFlag());
-        //        relPosFilter->SetComputeFuzzyMapFlag(this->GetComputeFuzzyMapFlag());
-      
+        //        relPosFilter->SetComputeFuzzyMapFlag(this->GetComputeFuzzyMapFlag());      
+        relPosFilter->SetFastFlag(this->GetFastFlag());
+        relPosFilter->SetRadius(this->GetRadius());
+
         // Go !
         relPosFilter->Update();