X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkProbeFilter.cxx;h=d75378b2b960c165f38753cad40ed3243f9379f5;hb=b19674b7569940466cda380e63350157866dd76b;hp=6dc66a9a49e6e98ea8742e51b14f1cb5099d8915;hpb=d19c5512748aa8e2dd5c3d01d9ec680ded1f17ce;p=bbtk.git diff --git a/packages/vtk/src/bbvtkProbeFilter.cxx b/packages/vtk/src/bbvtkProbeFilter.cxx index 6dc66a9..d75378b 100644 --- a/packages/vtk/src/bbvtkProbeFilter.cxx +++ b/packages/vtk/src/bbvtkProbeFilter.cxx @@ -13,7 +13,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ProbeFilter,bbtk::AtomicBlackBox); //===== void ProbeFilter::Process() { - // THE MAIN PROCESSING METHOD BODY // Here we simply set the input 'In' value to the output 'Out' // And print out the output value @@ -25,20 +24,22 @@ void ProbeFilter::Process() // (the one provided in the attribute 'name' of the tag 'input') // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') + if ( (bbGetInputSource()==NULL) || (bbGetInputInput()==NULL) ) + { + bbSetOutputOut( NULL ); + } else { + //EED 2017-01-01 Migration VTK7 - -//EED 2017-01-01 Migration VTK7 -#if VTK_MAJOR_VERSION <= 5 - _probefilter->SetSource( bbGetInputSource() ); - _probefilter->SetInput( bbGetInputInput() ); -#else - _probefilter->SetSourceData( bbGetInputSource() ); - _probefilter->SetInputData( bbGetInputInput() ); -#endif - - _probefilter->Update(); - bbSetOutputOut( _probefilter->GetOutput() ); - + #if VTK_MAJOR_VERSION <= 5 + _probefilter->SetSource( bbGetInputSource() ); + _probefilter->SetInput( bbGetInputInput() ); + #else + _probefilter->SetSourceData( bbGetInputSource() ); + _probefilter->SetInputData( bbGetInputInput() ); + #endif + _probefilter->Update(); + bbSetOutputOut( _probefilter->GetOutput() ); + } // if source input } //===== // 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)