X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkStructuredPointsReader.cxx;h=74f6d6bf3b73cd7dd0a570a010551ebb835f4e58;hb=731d9ee262e286a24e3ea2776d8e914950840a2c;hp=9d3d6a06e70805a1e6cc5b5a0e8f61ef12550ab5;hpb=6ccd15a3eebdc52fbf476fa19652d590aaa73a62;p=bbtk.git diff --git a/packages/vtk/src/bbvtkStructuredPointsReader.cxx b/packages/vtk/src/bbvtkStructuredPointsReader.cxx index 9d3d6a0..74f6d6b 100644 --- a/packages/vtk/src/bbvtkStructuredPointsReader.cxx +++ b/packages/vtk/src/bbvtkStructuredPointsReader.cxx @@ -26,11 +26,18 @@ void StructuredPointsReader::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - - spr -> SetFileName( bbGetInputIn().c_str() ); - sp = spr->GetOutput(); - sp -> Update(); - bbSetOutputOut( sp ); + //warning: comparison with string literal results in unspecified behaviour + //if ( bbGetInputIn().c_str()!="") + std::string empty(""); // JPR + if ( bbGetInputIn().c_str()!=empty) + { + spr -> SetFileName( bbGetInputIn().c_str() ); + sp = spr->GetOutput(); + sp -> Update(); + bbSetOutputOut( sp ); + } else { + bbSetOutputOut( NULL ); + } } //===== @@ -42,7 +49,8 @@ void StructuredPointsReader::bbUserSetDefaultValues() // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 bbSetInputIn(""); - + 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)