GDCM_NAME_SPACE::Util::GetName(*it).c_str(),
str_isa_func_name.c_str());
}
- try {
+ try {
DealWithNiveau3(*it, outputDirName);
}
catch (BrukerHopelessException &e)
std::cout << "And Init Exception was thrown in DealWithNiveau3 (" << e.what() << "); "
<< " We skip [" << level2Directory << "]" << std::endl;
continue;
- }
+ }
}
}
}
if (!res)
{
std::cout << "[" << currentOutputDirName << "] Directory creation failure " << std::endl;
- throw ( BrukerHopelessException ("Hopeless! Level3 output directory creation failure"));
+ throw ( BrukerHopelessException ("Hopeless! Level3 output directory creation failure"));
//exit (0);
}
char copyFile[PATH_MAX + PATH_MAX + 5]; // Should be enough!
bool canOpen;
-
+
//-------------- try d3proc;
char char_d3proc[(unsigned int) PATH_MAX+2];
sprintf(char_d3proc,"%s%c%s", level3Directory.c_str(), GDCM_NAME_SPACE::GDCM_FILESEPARATOR,"d3proc" );
-
+
if (verbose)
std::cout << "d3proc: --- => [" << char_d3proc << "]" << std::endl;
std::string str_d3proc(char_d3proc);
throw ( BrukerHopelessException ("Hopeless! FillMap failed on 'd3proc'"));
//exit(0); /// \TODO throw an exception !
}
-
+
//-------------- end try d3proc;
-
-
+
+
// -------------------try reco
char char_reco[(unsigned int) PATH_MAX+2];
if (verbose)
std::cout << "IM_SIY " << NY << std::endl;
/// \todo : check if there are actually 3 dimensions or only 2
-
+
BrukerFieldData bZ= br_d3proc.GetFieldData("IM_SIZ");
int nbFrames = bZ.GetIntValue()[0];
if (verbose)
std::cout << "IM_SIZ " << nbFrames << std::endl;
// WARNING DATTYPE is, either in {ip_short, ip_int, ip_char, ...}, or in {1, 2, 3, ...}
-
+
BrukerFieldData bDPT = br_d3proc.GetFieldData("DATTYPE");
-
+
std::string mhdDataPixelType;
int pixelSize;
getImhDataType(bDPT, mhdDataPixelType, pixelSize);
double spatResolY = spatResol.GetDoubleValue()[1];
if (verbose)
std::cout << "SpatResol (ds method) " << spatResolX << " " << spatResolY << std::endl;
+ BrukerFieldData bsliceDistance = br_method.GetFieldData("PVM_SPackArrSliceDistance");
+
+ double sliceDistance = bsliceDistance.GetDoubleValue()[0];
*/
-
// Better we use 'get' accessors from BrukerImage class, as Denis wrote them
BrukerFieldData fov = br_reco.GetFieldData("RECO_Fov");
if (verbose)
std::cout << "FOV (ds method) " << fovX << " " << fovY << std::endl;
- BrukerFieldData spatResol = br_reco.GetFieldData("PVM_SpatResol");
+ BrukerFieldData spatResol = br_reco.GetFieldData("RECO_SpatResol");
double spatResolX = spatResol.GetDoubleValue()[0];
double spatResolY = spatResol.GetDoubleValue()[1];
if (verbose)
/// \TODO probabely a more sophisticated accessor will be necessary :
/// (cf : non contiguous slices, overlapping, slice thickness, space between slices, etc)
- BrukerFieldData bsliceDistance = br_method.GetFieldData("PVM_SPackArrSliceDistance");
+
+ BrukerFieldData bsliceDistance = br_method.GetFieldData("RECO_SPackArrSliceDistance");
double sliceDistance = bsliceDistance.GetDoubleValue()[0];
+// ----------------------------------------------------------------------------------------
+
if (mhd)
{
sprintf(currentOutputMhdDirName, "%s%c%s", currentOutputDirName.c_str(),