switch (type)
{
- case 1: {
+ case 1: {
bool canOpen = br_subject.LoadFile(subject);
if (!canOpen)
{
++it)
{
if ( boost::filesystem::is_directory(*it) )
- {
-
+ {
+
if (verbose)
std::cout << "--- --- [" << *it << "] is a directory" << std::endl;
- // sprintf(outputDirName, "%s%c%s", currentOutputDirName.c_str(),
+ // sprintf(outputDirName, "%s%c%s", currentOutputDirName.c_str(),
// GDCM_NAME_SPACE::GDCM_FILESEPARATOR,
// GDCM_NAME_SPACE::Util::GetName(*it).c_str() );
// MUST be 'pdata'!
//
// (interest of previous method :
-// If unaware user changed the pdata name, it goes on working
+// If unaware user changed the pdata name, it goes on working
//
std::string str_isa;
str_isa = (*it) +
GDCM_NAME_SPACE::GDCM_FILESEPARATOR +
"isa";
- std::string str_isa_func_name;
+ std::string str_isa_func_name;
canOpen = br_isa.LoadFile(str_isa);
if (!canOpen)
{
sprintf(outputDirName, "%s%c%s", currentOutputDirName.c_str(),
GDCM_NAME_SPACE::GDCM_FILESEPARATOR,
- GDCM_NAME_SPACE::Util::GetName(*it).c_str() );
+ GDCM_NAME_SPACE::Util::GetName(*it).c_str() );
}
else
{
std::cout << "And Init Exception was thrown in DealWithNiveau3 (" << e.what() << "); "
<< " We skip [" << level2Directory << "]" << std::endl;
continue;
- }
+ }
}
}
}
if (verbose)
std::cout << "d3proc: --- => [" << char_d3proc << "]" << std::endl;
- std::string str_d3proc(char_d3proc);
+ std::string str_d3proc(char_d3proc);
canOpen = br_d3proc.LoadFile(str_d3proc);
if (!canOpen)
{
std::cout << "Hopeless! FillMap failed on 'd3proc'" << std::endl;
throw ( BrukerHopelessException ("Hopeless! FillMap failed on 'd3proc'"));
- //exit(0); /// \TODO throw an exception !
+ //exit(0); /// \TODO throw an exception !
}
//-------------- end try d3proc;
} else {
if (verbose)
std::cout << "[" << str_reco << "] successfully Mapped" << std::endl;
- }
+ }
//std::cout << "------------------------------------------------------------------------------------------------" << std::cout;
// br_reco.PrintSelf();
if (s[0] == '<')
s= s.substr(1,l-2);
- std::string repChar("_");
+ std::string repChar("_");
GDCM_NAME_SPACE::Util::ReplaceSpecChar(s, repChar);
}
if (result == false)
{
- throw ( BrukerInitException ("ObjectVaryingProperties.init() failure in Bruker2Dicom::CreateImageSet()") );
+ throw ( BrukerInitException ("ObjectVaryingProperties.init() failure in Bruker2Dicom::CreateImageSet()") );
}
br_acqp.SetImageLoopStructure();
// Just for checking
/*
+
std::vector<std::vector <double> > imageOrientation;
std::vector <double> imagePosition;
for(int i=0;i<brukerImageList.size();i++)
std::ostringstream str;
GDCM_NAME_SPACE::File *file;
- file = GDCM_NAME_SPACE::File::New();
+ file = GDCM_NAME_SPACE::File::New();
// Set the image size
str.str("");
// Set the pixel type
// //8, 16, 32, 64 (for double ?)
str.str("");
- str << pixelSize*8;
+ str << pixelSize*8;
+
+ // Bits Allocated
file->InsertEntryString(str.str(),0x0028,0x0100,"US"); // Bits Allocated
file->InsertEntryString(str.str(),0x0028,0x0101,"US"); // Bits Stored
if (i!=AoImages[0])
str << "\\";
}
- file->InsertEntryString(str.str(),0x0029,0x0104,"DS"); // Valeurs de b
+ file->InsertEntryString(str.str(),0x0029,0x0104,"DS"); // Valeurs de b
}
// 0020 0x1041 DS 1 Slice Location
GDCM_NAME_SPACE::FileHelper *fileH;
fileH = GDCM_NAME_SPACE::FileHelper::New(file);
- fileH->SetContentType(contentType);
+ fileH->SetContentType(contentType);
// cast is just to avoid warnings (*no* conversion is performed)
//fileH->SetImageData((uint8_t *)img,int(maxX*maxY)*sizeof(uint16_t)); // troubles when maxX, mayY are *actually* float!