]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx
#3472 MeshDeformation
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkCutter.cxx
index 5f0aaa18396f78dd85d6a192149c9530c138a5c4..82651c6971d86dafb2feb110795b039d3f519fbc 100644 (file)
@@ -33,26 +33,27 @@ void Cutter::Process()
   //  See example in:
   //  https://kitware.github.io/vtk-examples/site/Cxx/VisualizationAlgorithms/Cutter/
   
-       vtkCutter       *cutter;
-
-       cutter = vtkCutter::New();
-       cutter->SetInputData( bbGetInputIn() );
-    cutter->SetCutFunction( bbGetInputImplicitFunction() );
-    cutter->Update();
-    bbSetOutputOut( cutter->GetOutput() );
-
-               
+    if (bbGetInputIn()!=NULL)
+    {
+        vtkCutter *cutter;
+        cutter = vtkCutter::New();
+        cutter->SetInputData( bbGetInputIn() );
+        cutter->SetCutFunction( bbGetInputImplicitFunction() );
+        cutter->Update();
+        bbSetOutputOut( cutter->GetOutput() );
+    } else {
+        bbSetOutputOut( 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 Cutter::bbUserSetDefaultValues()
 {
-
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
 //   bbSetInputIn(NULL);
-  
+    bbSetOutputOut( 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)
@@ -79,7 +80,7 @@ void Cutter::bbUserFinalizeProcessing()
 //    if any
   
 }
-}
-// EO namespace bbcreaVtk
+
+}// EO namespace bbcreaVtk