printf("EED ReadMHDPlane::Process Start\n");
+ std::string inputfilename;
+
+ if (bbGetInputDirectionPlane()=="XY")
+ {
+ inputfilename=bbGetInputFileName();
+ } // if XY
+
+
+ if ((bbGetInputDirectionPlane()=="YZ") || (bbGetInputDirectionPlane()=="ZX"))
+ {
+
+ //-- Split FileName
+ std::size_t found = bbGetInputFileName().find_last_of("/\\");
+ std::string path = bbGetInputFileName().substr(0,found+1);
+ std::string filename = bbGetInputFileName().substr(found+1);
+#ifdef _WIN32
+ path=path+"YZ_ZX\\";
+#else
+ path=path+"YZ_ZX/";
+#endif
+
+
+ if (bbGetInputDirectionPlane()=="YZ")
+ {
+ inputfilename = path+filename+"_YZ.mhd";
+ } // if YZ
+
+ if (bbGetInputDirectionPlane()=="ZX")
+ {
+ inputfilename = path+filename+"_ZX.mhd";
+ } // XZ
+ } // if YZ || XZ
+
vtkImageData *newImage;
long int newHeaderSize;
- std::string newFileName=bbGetInputFileName()+"-OneSlice";
+ std::string newFileName=inputfilename+"-OneSlice";
int sx,sy,sz;
char mystring[250];
char strTmp[20];
bool ok=true;
- FILE *ffIn = fopen(bbGetInputFileName().c_str(),"r");
+ FILE *ffIn = fopen(inputfilename.c_str(),"r");
if (ffIn!=NULL)
{
printf("EED ReadMHDPlane::Process 1\n");
} // if ok
} else {
ok=false;
- printf("EED ERROR: Problem openin:%s\n", bbGetInputFileName().c_str() );
+ printf("EED ERROR: Problem openin:%s\n", inputfilename.c_str() );
}
if (ok==false)
// Here we initialize the input 'In' to 0
bbSetInputFileName("");
bbSetInputSlice(0);
+ bbSetInputDirectionPlane("XY");
}
//=====