]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkMeshReduction_QuadricDecimation.cxx
#3493 MeshManager
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkMeshReduction_QuadricDecimation.cxx
index 38fd833febd0a7fe2b06dc98071d5f84313df14d..bf723e13115e82c9a113c5716de91db3c6ac1e74 100644 (file)
@@ -32,12 +32,16 @@ void MeshReduction_QuadricDecimation::Process()
                firsttime       =false;
                quadricdecimation = vtkQuadricDecimation::New();
        }
-       quadricdecimation->SetInputData( bbGetInputIn() );
+    if (bbGetInputIn()!=NULL)
+    {
+        quadricdecimation->SetInputData( bbGetInputIn() );
+        quadricdecimation->SetTargetReduction( bbGetInputTargetReduction() );
+        quadricdecimation->Update();
+        bbSetOutputOut(quadricdecimation->GetOutput() );
+    } else {
+        bbSetOutputOut( NULL );
+    } // if In
 
-       quadricdecimation->SetTargetReduction( bbGetInputTargetReduction() );
-
-       quadricdecimation->Update();
-       bbSetOutputOut(quadricdecimation->GetOutput() );  
 }
 //===== 
 // 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)