X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkCutter.cxx;h=0e4f85af50e1e4d59188d59209919b8b8d7c78b2;hb=500bc2ff1c3fe51a9ce94324dee722fb2f7bfd36;hp=5f0aaa18396f78dd85d6a192149c9530c138a5c4;hpb=9dedc58b507030e97e7cf4abc68de4e6d5037dce;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx index 5f0aaa1..0e4f85a 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx @@ -33,26 +33,29 @@ 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 ( (bbGetInputActive()==true) && (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); - + bbSetInputActive( true ); + 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 +82,7 @@ void Cutter::bbUserFinalizeProcessing() // if any } -} -// EO namespace bbcreaVtk + +}// EO namespace bbcreaVtk