// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
- vtkMetaImageReader *reader = vtkMetaImageReader::New();
- reader->SetFileName(bbGetInputIn().c_str());
- reader->Update();
- bbSetOutputOut(reader->GetOutput());
+ FILE *ff=fopen(bbGetInputIn().c_str(),"r");
+ if (ff)
+ {
+ fclose(ff);
+ vtkMetaImageReader *reader = vtkMetaImageReader::New();
+ reader->SetFileName(bbGetInputIn().c_str());
+ reader->Update();
+ bbSetOutputOut(reader->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)