GDCM_NAME_SPACE::DirList dirList(strDirNamein, false, true); // DON'T get recursively the list of files
std::string strDirNameout(OutputDirName);
-/*
+/*
if (listonly)
{
std::cout << "------------List of found files ------------" << std::endl;
bool canOpen;
std::string outputFileName;
+
// BrukerDataSet br_subject;
std::string subject;
subject = GDCM_NAME_SPACE::Util::GetPath(*(fileNames.begin()))+
// get info for 'Study Description'
- /*
- BrukerFieldData b_protocol_location=br_acqp.GetFieldData("ACQ_protocol_location");
- acqp_protocol_location = b_protocol_location.GetStringValue()[0];
- cleanString(acqp_protocol_location);
-*/
+
BrukerFieldData b_name=br_subject.GetFieldData("SUBJECT_name_string");
std::string subject_name = b_name.GetStringValue()[0];
strPatientName = subject_name;
BrukerFieldData b_study_name=br_subject.GetFieldData("SUBJECT_study_name");
std::string subject_study_name = b_study_name.GetStringValue()[0];
- subject_study_name = subject_study_name.substr(1, subject_study_name.size()-2);
+ subject_study_name = subject_study_name.substr(1, subject_study_name.size()-2);
cleanString(subject_date);
strStudyDescr = subject_name + "." + subject_study_name + "." + subject_entry + "." + subject_position + "." + subject_date;
-
+
char outputDirName[(unsigned int) PATH_MAX+2];
strStudyUID = GDCM_NAME_SPACE::Util::CreateUniqueUID();
it != fileNames.end();
++it)
{
- if ( !boost::filesystem::is_regular(*it) ) // check twice !
if ( boost::filesystem::is_directory(*it) )
{
if (verbose)
//if ( ! boost::filesystem::is_directory(*it) )
{
if (verbose)
- std::cout << "--- [" << *it << "] is a file" << std::endl;
+ std::cout << "--- [" << *it << "] is a file." << std::endl;
}
}
it != fileNames.end();
++it)
{
- if ( !boost::filesystem::is_regular(*it) ) // check twice !
if ( boost::filesystem::is_directory(*it) )
{
// will be always "pdata" ...
it != fileNames.end();
++it)
{
- if ( !boost::filesystem::is_regular(*it) )
- //if ( ! boost::filesystem::is_directory(*it) )
+ if ( ! boost::filesystem::is_directory(*it) )
{
- std::cout << "--- --- [" << *it << "] is a file" << std::endl;
+ std::cout << "--- --- [" << *it << "] is a file.." << std::endl;
}
}
it != fileNames.end();
++it)
{
- if ( !boost::filesystem::is_regular(*it) ) // check twice !
if ( boost::filesystem::is_directory(*it) )
{
sprintf(char_d3proc,"%s%c%s", level3Directory.c_str(), GDCM_NAME_SPACE::GDCM_FILESEPARATOR,"d3proc" );
if (verbose)
- std::cout << "--- => [" << char_d3proc << "]" << std::endl;
+ std::cout << "try d3proc: --- => [" << char_d3proc << "]" << std::endl;
std::string str_d3proc(char_d3proc);
canOpen = br_d3proc.LoadFile(str_d3proc);
// GDCM_NAME_SPACE::GDCM_FILESEPARATOR +
// "d3proc";
if (verbose)
- std::cout << "--- => [" << char_reco << "]" << std::endl;
+ std::cout << "try reco --- => [" << char_reco << "]" << std::endl;
std::string str_reco(char_reco);
canOpen = br_reco.LoadFile(str_reco);
std::cout << "FOV (ds method) " << fovX << " " << fovY << std::endl;
/// \TODO probabely a more sophisticated accessor will be necessary :
- /// (cf : non contiguous slices, overlapping, slice thickness, space between clices, etc)
+ /// (cf : non contiguous slices, overlapping, slice thickness, space between slices, etc)
BrukerFieldData bsliceDistance = br_method.GetFieldData("PVM_SPackArrSliceDistance");
double sliceDistance = bsliceDistance.GetDoubleValue()[0];
//if ( ! boost::filesystem::is_directory(*it) )
{
if (verbose)
- std::cout << "--- [" << *it << "] is a file" << std::endl;
+ std::cout << "--- [" << *it << "] is a file..." << std::endl;
icode = 0;
return imageSet;
}
-
// ===========================================================================================
void Bruker2Dicom::MakeDicomImage(unsigned char *tabPixels,