]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkHausdorffDistancePointSetFilter.cxx
#3526 Active option in HausdorffDistancePointSetFilter box
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkHausdorffDistancePointSetFilter.cxx
index 16b8bfd71dcf802f482b6137192518a0b77ab2e9..58fd52f7d57ff7880d5b853d1e5e85154c5aac53 100644 (file)
@@ -32,7 +32,7 @@ void HausdorffDistancePointSetFilter::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
 
-       if ((bbGetInputInA()!=NULL) &&  (bbGetInputInB()!=NULL)  ) 
+       if ( (bbGetInputActive()==true) && (bbGetInputInA()!=NULL) &&  (bbGetInputInB()!=NULL)  )
        {
                vtkHausdorffDistancePointSetFilter *hausdorff = vtkHausdorffDistancePointSetFilter::New();
                hausdorff->SetInputData(0, bbGetInputInA() );
@@ -50,9 +50,13 @@ void HausdorffDistancePointSetFilter::Process()
                bbSetOutputHausdorffDistance( hd );
                bbSetOutputOutA( (vtkPolyData*) (hausdorff->GetOutput(0)) );
                bbSetOutputOutB( (vtkPolyData*) (hausdorff->GetOutput(1)) );
-       } // if 
+    } else {
+        bbSetOutputOutA( bbGetInputInA() );
+        bbSetOutputOutB( bbGetInputInB() );
+    }// if Type InA InB
 }
-//===== 
+
+//=====
 // 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)
 //===== 
 void HausdorffDistancePointSetFilter::bbUserSetDefaultValues()
@@ -60,36 +64,33 @@ void HausdorffDistancePointSetFilter::bbUserSetDefaultValues()
 
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
-   bbSetInputInA(NULL);
-   bbSetInputInB(NULL);
-  
+    bbSetInputActive(true);
+    bbSetInputInA(NULL);
+    bbSetInputInB(NULL);
 }
-//===== 
+
+//=====
 // 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)
 //===== 
 void HausdorffDistancePointSetFilter::bbUserInitializeProcessing()
 {
-
 //  THE INITIALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should allocate the internal/output pointers 
-//    if any 
-
-  
+//    if any
 }
-//===== 
+
+//=====
 // 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)
 //===== 
 void HausdorffDistancePointSetFilter::bbUserFinalizeProcessing()
 {
-
 //  THE FINALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should desallocate the internal/output pointers 
 //    if any
-  
-}
 }
-// EO namespace bbcreaVtk
+
+}// EO namespace bbcreaVtk