<process><PRE>
- vtkMetaImageWriter* w = vtkMetaImageWriter::New();
//EED 2017-01-01 Migration VTK7
// ...
#endif
-/*
- if (bbGetInputIn() == 0)
- std::cout << "======================= Katastrophe : bbGetInputIn() == 0 " << std::endl;
- else
- std::cout << "======================= OK : bbGetInputIn() not NULL " << std::endl;
- bbGetInputIn()->PrintSelf(std::cout, vtkIndent(1));
- bbGetInputIn()->GetSpacing(spacing);
- std::cout << "=======" << spacing[0] << " " << spacing[1] << " " << spacing[2] << std::endl;
-*/
-
-
- if (bbGetInputIn()!=NULL)
- {
-
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- w->SetInput(bbGetInputIn());
-#else
- w->SetInputData(bbGetInputIn());
-#endif
- w->SetCompression(bbGetInputCompression());
- w->SetFileDimensionality(bbGetInputIn()->GetDataDimension()); // NTU
- 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
-//EEDJuly22-2014 w->Update(); // Fred
- w->Write();
- } // bbGetInputIn()!=NULL
-
- w->Delete();
+ std::string userGivenName = bbGetInputFilename();
+ if (bbGetInputIn()!=NULL)
+ {
+ if (userGivenName.substr(userGivenName.size()-5) == ".mhdb")
+ {
+ printf("EED vtkMetaImageWriter process block..\n");
+ } else {
+ if (userGivenName.substr(userGivenName.size()-4) != ".mhd") //JPR
+ {
+ userGivenName += ".mhd";
+ }
+ vtkMetaImageWriter* w = vtkMetaImageWriter::New();
+ //EED 2017-01-01 Migration VTK7
+ #if VTK_MAJOR_VERSION <= 5
+ w->SetInput(bbGetInputIn());
+ #else
+ w->SetInputData(bbGetInputIn());
+ #endif
+ w->SetCompression(bbGetInputCompression());
+ w->SetFileDimensionality(bbGetInputIn()->GetDataDimension()); // NTU
+ w->SetFileName(userGivenName.c_str());
+ //w->SetFileName(bbGetInputFilename().c_str()); // JPR
+ w->Write();
+ w->Delete();
+ } // .mhdb
+ } // bbGetInputIn()!=NULL
</PRE></process>
<defaultValues>