X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkCutter.cxx;h=82651c6971d86dafb2feb110795b039d3f519fbc;hb=464deff51f697881cd76b3cfb934859cd7c31df7;hp=44af51b71c590ab1805a3077f970b527a1e980dc;hpb=937822256978ed571b7d004ef1a5abe9492a8ada;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx index 44af51b..82651c6 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkCutter.cxx @@ -4,7 +4,6 @@ #include "bbcreaVtkCutter.h" #include "bbcreaVtkPackage.h" #include "vtkCutter.h" -#include "vtkStripper.h" namespace bbcreaVtk { @@ -31,44 +30,30 @@ void Cutter::Process() // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " <SetInputData( bbGetInputIn() ); - cutter->SetCutFunction( bbGetInputImplicitFunction() ); - cutter->Update(); - bbSetOutputOut( cutter->GetOutput() ); - -/* - strips = vtkStripper::New(); - strips->SetInputData( cutter->GetOutput() ); - strips->Update(); - poly = vtkPolyData::New(); - poly->SetPoints( strips->GetOutput()->GetPoints() ); - poly->SetPolys( strips->GetOutput()->GetLines() ); - bbSetOutputOut( poly ); -*/ - + 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) @@ -95,7 +80,7 @@ void Cutter::bbUserFinalizeProcessing() // if any } -} -// EO namespace bbcreaVtk + +}// EO namespace bbcreaVtk