]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkProbeFilter.cxx
#3301 BBTK Bug New Normal - SurfaceTexture
[bbtk.git] / packages / vtk / src / bbvtkProbeFilter.cxx
index 6dc66a9a49e6e98ea8742e51b14f1cb5099d8915..d75378b2b960c165f38753cad40ed3243f9379f5 100644 (file)
@@ -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)