std::cout << "=======" << spacing[0] << " " << spacing[1] << " " << spacing[2] << std::endl;
*/
+
w->SetInput(bbGetInputIn());
w->SetCompression(false); // JPR
w->SetFileDimensionality(bbGetInputIn()->GetDataDimension()); // NTU
- w->SetFileName(bbGetInputFilename().c_str());
+ std::string userGivenName = bbGetInputFilename();
+ if (userGivenName.substr(userGivenName.size()-4) != ".mhd") //JPR
+ userGivenName += ".mhd";
+ w->SetFileName(userGivenName.c_str());
+ //w->SetFileName(bbGetInputFilename().c_str()); // JPR
w->Update(); // Fred
w->Write();
w->Delete();