]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkImageThresholdConnectivity.cxx
#3499 boxes ImageGaussianSmooth2 MarchingCubes2
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkImageThresholdConnectivity.cxx
index a7ddb49608e71098de98f90c15ea79e3b94cbb09..2e6d5199df14c34abd7588a9a22510319be6c645 100644 (file)
@@ -74,7 +74,13 @@ void ImageThresholdConnectivity::Process()
         } // for i
         filter->SetSeedPoints( points );
         filter->SetInputData( bbGetInputIn() );
-        filter->ThresholdBetween(10, 100);
+        if (bbGetInputThreshold().size()==2)
+        {
+            filter->ThresholdBetween( bbGetInputThreshold()[0] , bbGetInputThreshold()[1] );
+        } else {
+            filter->ThresholdBetween( 0, 100 );
+        }// if Thershold size
+        
     //    filter->SetNeighborhoodRadius (4, 4, 4 );
         filter->SetInValue(255);
         filter->SetOutValue(0);
@@ -85,7 +91,9 @@ void ImageThresholdConnectivity::Process()
         filter->SetSliceRangeZ(minZ-border,maxZ+border);
         filter->Update();
         bbSetOutputOut( filter->GetOutput() );
-    } // if lst
+    } else {
+        bbSetOutputOut( NULL );
+    }// if lst
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)