Loading Applications/Cxx/gdcmdump.cxx +5 −5 Original line number Diff line number Diff line Loading @@ -816,7 +816,7 @@ static int PrintPDB(const std::string & filename, bool verbose) } if( !found ) { std::cout << "no pdb tag found" << std::endl; std::cerr << "no pdb tag found" << std::endl; ret = 1; } Loading Loading @@ -901,7 +901,7 @@ static int PrintCSA(const std::string & filename) found = true; if( csa.GetFormat() == gdcm::CSAHeader::ZEROED_OUT ) { std::cout << "CSA Header has been zero-out (contains only 0)" << std::endl; std::cerr << "CSA Header has been zero-out (contains only 0)" << std::endl; ret = 1; } else if( csa.GetFormat() == gdcm::CSAHeader::DATASET_FORMAT ) Loading @@ -920,7 +920,7 @@ static int PrintCSA(const std::string & filename) found = true; if( csa.GetFormat() == gdcm::CSAHeader::ZEROED_OUT ) { std::cout << "CSA Header has been zero-out (contains only 0)" << std::endl; std::cerr << "CSA Header has been zero-out (contains only 0)" << std::endl; ret = 1; } else if( csa.GetFormat() == gdcm::CSAHeader::DATASET_FORMAT ) Loading @@ -939,7 +939,7 @@ static int PrintCSA(const std::string & filename) found = true; if( csa.GetFormat() == gdcm::CSAHeader::ZEROED_OUT ) { std::cout << "CSA Header has been zero-out (contains only 0)" << std::endl; std::cerr << "CSA Header has been zero-out (contains only 0)" << std::endl; ret = 1; } else if( csa.GetFormat() == gdcm::CSAHeader::INTERFILE ) Loading @@ -958,7 +958,7 @@ static int PrintCSA(const std::string & filename) } if( !found ) { std::cout << "no csa tag found" << std::endl; std::cerr << "no csa tag found" << std::endl; ret = 1; } Loading Applications/Cxx/gdcmscu.cxx +1 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,7 @@ int main(int argc, char *argv[]) std::string str; //ss >> str; std::getline(ss, str); // do not skip whitespace if( str.size() % 2 == 1 ) str += " "; keys.push_back( std::make_pair(tag, str) ); } else if( option_index == 20 ) /* port-scp */ Loading CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ set(GDCM_PACKAGE_CONTACT "GDCM Developers <gdcm-developers@lists.sourceforge.net #---------------------------------------------------------------------------- set(GDCM_MAJOR_VERSION 2) set(GDCM_MINOR_VERSION 8) set(GDCM_BUILD_VERSION 6) set(GDCM_BUILD_VERSION 7) set(GDCM_VERSION "${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}") # let advanced user the option to define GDCM_API_VERSION: Loading Source/DataDictionary/gdcmPrivateDefaultDicts.cxx +13 −0 Original line number Diff line number Diff line Loading @@ -1723,6 +1723,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x07a1,0x002b,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x07a1,0x0036,"ELSCINT1",VR::AE,VM::VM1,"Tamar Source Ae",false }, {0x07a1,0x0040,"ELSCINT1",VR::CS,VM::VM1,"Tamar Study Body Part",false }, {0x07a1,0x0042,"ELSCINT1",VR::SH,VM::VM1,"?",false }, {0x07a1,0x0043,"ELSCINT1",VR::IS,VM::VM1,"?",false }, {0x07a1,0x0047,"ELSCINT1",VR::CS,VM::VM1,"?orientation?",false }, {0x07a1,0x0050,"ELSCINT1",VR::US,VM::VM1,"Tamar Site Id",false }, Loading @@ -1737,6 +1738,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x07a1,0x0088,"ELSCINT1",VR::US,VM::VM1,"?",false }, {0x07a1,0x0098,"ELSCINT1",VR::US,VM::VM1,"?",false }, {0x07a1,0x009f,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x07a1,0x00d0,"ELSCINT1",VR::LO,VM::VM1,"?",false }, {0x07a3,0x0001,"ELSCINT1",VR::LO,VM::VM1,"Tamar Exe Software Version",false }, {0x07a3,0x0003,"ELSCINT1",VR::CS,VM::VM1,"Tamar Study Has Sticky Note",false }, {0x07a3,0x0005,"ELSCINT1",VR::CS,VM::VM1,"?",false }, Loading @@ -1750,16 +1752,22 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x07a3,0x001c,"ELSCINT1",VR::ST,VM::VM1,"?patient name?",false }, {0x07a3,0x001d,"ELSCINT1",VR::ST,VM::VM1,"?radiologist name?",false }, {0x07a3,0x001e,"ELSCINT1",VR::ST,VM::VM1,"?num?",false }, {0x07a3,0x001f,"ELSCINT1",VR::ST,VM::VM1,"?",false }, {0x07a3,0x0022,"ELSCINT1",VR::ST,VM::VM1,"?",false }, {0x07a3,0x0023,"ELSCINT1",VR::ST,VM::VM1,"?+sign?",false }, {0x07a3,0x0024,"ELSCINT1",VR::ST,VM::VM1,"?",false }, {0x07a3,0x0034,"ELSCINT1",VR::SH,VM::VM1,"Tamar Study Age",false }, {0x07a3,0x0043,"ELSCINT1",VR::DS,VM::VM1_n,"?",false }, {0x07a3,0x0052,"ELSCINT1",VR::LO,VM::VM1,"?",false }, {0x07a3,0x0055,"ELSCINT1",VR::SH,VM::VM1,"?",false }, {0x07a3,0x005c,"ELSCINT1",VR::ST,VM::VM1,"?",false }, {0x07a3,0x0061,"ELSCINT1",VR::LT,VM::VM1,"?",false }, {0x07a3,0x0062,"ELSCINT1",VR::SQ,VM::VM1,"?",false }, {0x07a3,0x0063,"ELSCINT1",VR::SQ,VM::VM1,"?",false }, {0x07a3,0x0064,"ELSCINT1",VR::IS,VM::VM1_n,"?",false }, {0x07a3,0x0065,"ELSCINT1",VR::CS,VM::VM1_n,"?yes/no bool?",false }, {0x07a3,0x0066,"ELSCINT1",VR::IS,VM::VM1,"?",false }, {0x07a3,0x008f,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x07a3,0x0099,"ELSCINT1",VR::CS,VM::VM1,"?yes/no bool?",false }, {0x07a3,0x009c,"ELSCINT1",VR::CS,VM::VM1,"?yes/no bool?",false }, {0x07a3,0x009f,"ELSCINT1",VR::CS,VM::VM1,"?",false }, Loading @@ -1779,8 +1787,11 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x07a3,0x00cb,"ELSCINT1",VR::SQ,VM::VM1,"?network seq11?",false }, {0x07a3,0x00cc,"ELSCINT1",VR::LO,VM::VM1,"Tamar Grid Token Version",false }, {0x07a5,0x0000,"ELSCINT1",VR::LO,VM::VM1,"?",false }, {0x07a5,0x0054,"ELSCINT1",VR::DT,VM::VM1,"?",false }, {0x07a5,0x0056,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x07a5,0x0063,"ELSCINT1",VR::CS,VM::VM1_n,"?",false }, {0x07a5,0x0069,"ELSCINT1",VR::LO,VM::VM1,"?",false }, {0x07a5,0x00c8,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x5001,0x0070,"ELSCINT1",VR::SQ,VM::VM1,"?",false }, {0x5001,0x0071,"ELSCINT1",VR::SH,VM::VM1,"?",false }, {0x5001,0x0080,"ELSCINT1",VR::SQ,VM::VM1,"?",false }, Loading Loading @@ -6045,7 +6056,9 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x200b,0x0099,"Philips RAD Imaging DD 097",VR::SH,VM::VM1,"?",false }, {0x200b,0x009a,"Philips RAD Imaging DD 097",VR::FD,VM::VM1,"?",false }, {0x200b,0x009b,"Philips RAD Imaging DD 097",VR::FD,VM::VM1,"?",false }, {0x200b,0x009f,"Philips RAD Imaging DD 097",VR::SQ,VM::VM1,"?",false }, {0x200b,0x00a0,"Philips RAD Imaging DD 097",VR::LT,VM::VM1,"?",false }, {0x200b,0x00a1,"Philips RAD Imaging DD 097",VR::CS,VM::VM1,"?bool?",false }, {0x0031,0x0030,"Philips US Imaging 60",VR::UL,VM::VM1,"Private data",false }, {0x0031,0x0031,"Philips US Imaging 60",VR::UL,VM::VM1,"Private data",false }, {0x200d,0x0005,"Philips US Imaging DD 017",VR::LO,VM::VM1,"?",false }, Loading Source/MediaStorageAndFileFormat/gdcmIPPSorter.cxx +33 −3 Original line number Diff line number Diff line Loading @@ -37,6 +37,25 @@ inline double spacing_round(double n, int d) /* pow is defined as pow( double, d return floor(n * pow(10., d) + .5) / pow(10., d); } struct dircos_key { double dircos[6]; void read( const std::string & str ) { DirectionCosines dc; dc.SetFromString( str.c_str() ); const double * ptr = dc; memcpy( dircos, ptr, sizeof(dircos) ); } }; struct dircos_comp { bool operator()( dircos_key const & lhs, dircos_key const & rhs ) { const double *iop1 = lhs.dircos; const double *iop2 = rhs.dircos; return std::lexicographical_compare(iop1, iop1+6, iop2, iop2+6); } }; bool IPPSorter::Sort(std::vector<std::string> const & filenames) { // BUG: I cannot clear Filenames since input filenames could also be the output of ourself... Loading Loading @@ -88,11 +107,22 @@ bool IPPSorter::Sort(std::vector<std::string> const & filenames) { if( iops.size() != 1 ) { gdcmDebugMacro( "More than one IOP (or no IOP): " << iops.size() ); //std::copy(iops.begin(), iops.end(), std::ostream_iterator<std::string>(std::cout, "\n")); std::set< dircos_key, dircos_comp > s; for( Scanner::ValuesType::const_iterator it = iops.begin(); it != iops.end(); ++it ) { dircos_key dk; dk.read( *it ); s.insert( dk ); } // sometime we want to handle: // iops = {[0] = "1\\0\\0\\0\\1\\-0", [1] = "1\\0\\0\\0\\1\\0 "} if( s.size() != 1 ) { gdcmDebugMacro( "More than one IOP (or no IOP): " << iops.size() << ". Try changing DirCosTolerance" ); return false; } } } const size_t fsize = frames.size(); // Should I really tolerate issue with Frame of Reference UID ? if( fsize == 1 ) // by the book { Loading Loading
Applications/Cxx/gdcmdump.cxx +5 −5 Original line number Diff line number Diff line Loading @@ -816,7 +816,7 @@ static int PrintPDB(const std::string & filename, bool verbose) } if( !found ) { std::cout << "no pdb tag found" << std::endl; std::cerr << "no pdb tag found" << std::endl; ret = 1; } Loading Loading @@ -901,7 +901,7 @@ static int PrintCSA(const std::string & filename) found = true; if( csa.GetFormat() == gdcm::CSAHeader::ZEROED_OUT ) { std::cout << "CSA Header has been zero-out (contains only 0)" << std::endl; std::cerr << "CSA Header has been zero-out (contains only 0)" << std::endl; ret = 1; } else if( csa.GetFormat() == gdcm::CSAHeader::DATASET_FORMAT ) Loading @@ -920,7 +920,7 @@ static int PrintCSA(const std::string & filename) found = true; if( csa.GetFormat() == gdcm::CSAHeader::ZEROED_OUT ) { std::cout << "CSA Header has been zero-out (contains only 0)" << std::endl; std::cerr << "CSA Header has been zero-out (contains only 0)" << std::endl; ret = 1; } else if( csa.GetFormat() == gdcm::CSAHeader::DATASET_FORMAT ) Loading @@ -939,7 +939,7 @@ static int PrintCSA(const std::string & filename) found = true; if( csa.GetFormat() == gdcm::CSAHeader::ZEROED_OUT ) { std::cout << "CSA Header has been zero-out (contains only 0)" << std::endl; std::cerr << "CSA Header has been zero-out (contains only 0)" << std::endl; ret = 1; } else if( csa.GetFormat() == gdcm::CSAHeader::INTERFILE ) Loading @@ -958,7 +958,7 @@ static int PrintCSA(const std::string & filename) } if( !found ) { std::cout << "no csa tag found" << std::endl; std::cerr << "no csa tag found" << std::endl; ret = 1; } Loading
Applications/Cxx/gdcmscu.cxx +1 −0 Original line number Diff line number Diff line Loading @@ -283,6 +283,7 @@ int main(int argc, char *argv[]) std::string str; //ss >> str; std::getline(ss, str); // do not skip whitespace if( str.size() % 2 == 1 ) str += " "; keys.push_back( std::make_pair(tag, str) ); } else if( option_index == 20 ) /* port-scp */ Loading
CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ set(GDCM_PACKAGE_CONTACT "GDCM Developers <gdcm-developers@lists.sourceforge.net #---------------------------------------------------------------------------- set(GDCM_MAJOR_VERSION 2) set(GDCM_MINOR_VERSION 8) set(GDCM_BUILD_VERSION 6) set(GDCM_BUILD_VERSION 7) set(GDCM_VERSION "${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}") # let advanced user the option to define GDCM_API_VERSION: Loading
Source/DataDictionary/gdcmPrivateDefaultDicts.cxx +13 −0 Original line number Diff line number Diff line Loading @@ -1723,6 +1723,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x07a1,0x002b,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x07a1,0x0036,"ELSCINT1",VR::AE,VM::VM1,"Tamar Source Ae",false }, {0x07a1,0x0040,"ELSCINT1",VR::CS,VM::VM1,"Tamar Study Body Part",false }, {0x07a1,0x0042,"ELSCINT1",VR::SH,VM::VM1,"?",false }, {0x07a1,0x0043,"ELSCINT1",VR::IS,VM::VM1,"?",false }, {0x07a1,0x0047,"ELSCINT1",VR::CS,VM::VM1,"?orientation?",false }, {0x07a1,0x0050,"ELSCINT1",VR::US,VM::VM1,"Tamar Site Id",false }, Loading @@ -1737,6 +1738,7 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x07a1,0x0088,"ELSCINT1",VR::US,VM::VM1,"?",false }, {0x07a1,0x0098,"ELSCINT1",VR::US,VM::VM1,"?",false }, {0x07a1,0x009f,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x07a1,0x00d0,"ELSCINT1",VR::LO,VM::VM1,"?",false }, {0x07a3,0x0001,"ELSCINT1",VR::LO,VM::VM1,"Tamar Exe Software Version",false }, {0x07a3,0x0003,"ELSCINT1",VR::CS,VM::VM1,"Tamar Study Has Sticky Note",false }, {0x07a3,0x0005,"ELSCINT1",VR::CS,VM::VM1,"?",false }, Loading @@ -1750,16 +1752,22 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x07a3,0x001c,"ELSCINT1",VR::ST,VM::VM1,"?patient name?",false }, {0x07a3,0x001d,"ELSCINT1",VR::ST,VM::VM1,"?radiologist name?",false }, {0x07a3,0x001e,"ELSCINT1",VR::ST,VM::VM1,"?num?",false }, {0x07a3,0x001f,"ELSCINT1",VR::ST,VM::VM1,"?",false }, {0x07a3,0x0022,"ELSCINT1",VR::ST,VM::VM1,"?",false }, {0x07a3,0x0023,"ELSCINT1",VR::ST,VM::VM1,"?+sign?",false }, {0x07a3,0x0024,"ELSCINT1",VR::ST,VM::VM1,"?",false }, {0x07a3,0x0034,"ELSCINT1",VR::SH,VM::VM1,"Tamar Study Age",false }, {0x07a3,0x0043,"ELSCINT1",VR::DS,VM::VM1_n,"?",false }, {0x07a3,0x0052,"ELSCINT1",VR::LO,VM::VM1,"?",false }, {0x07a3,0x0055,"ELSCINT1",VR::SH,VM::VM1,"?",false }, {0x07a3,0x005c,"ELSCINT1",VR::ST,VM::VM1,"?",false }, {0x07a3,0x0061,"ELSCINT1",VR::LT,VM::VM1,"?",false }, {0x07a3,0x0062,"ELSCINT1",VR::SQ,VM::VM1,"?",false }, {0x07a3,0x0063,"ELSCINT1",VR::SQ,VM::VM1,"?",false }, {0x07a3,0x0064,"ELSCINT1",VR::IS,VM::VM1_n,"?",false }, {0x07a3,0x0065,"ELSCINT1",VR::CS,VM::VM1_n,"?yes/no bool?",false }, {0x07a3,0x0066,"ELSCINT1",VR::IS,VM::VM1,"?",false }, {0x07a3,0x008f,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x07a3,0x0099,"ELSCINT1",VR::CS,VM::VM1,"?yes/no bool?",false }, {0x07a3,0x009c,"ELSCINT1",VR::CS,VM::VM1,"?yes/no bool?",false }, {0x07a3,0x009f,"ELSCINT1",VR::CS,VM::VM1,"?",false }, Loading @@ -1779,8 +1787,11 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x07a3,0x00cb,"ELSCINT1",VR::SQ,VM::VM1,"?network seq11?",false }, {0x07a3,0x00cc,"ELSCINT1",VR::LO,VM::VM1,"Tamar Grid Token Version",false }, {0x07a5,0x0000,"ELSCINT1",VR::LO,VM::VM1,"?",false }, {0x07a5,0x0054,"ELSCINT1",VR::DT,VM::VM1,"?",false }, {0x07a5,0x0056,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x07a5,0x0063,"ELSCINT1",VR::CS,VM::VM1_n,"?",false }, {0x07a5,0x0069,"ELSCINT1",VR::LO,VM::VM1,"?",false }, {0x07a5,0x00c8,"ELSCINT1",VR::CS,VM::VM1,"?",false }, {0x5001,0x0070,"ELSCINT1",VR::SQ,VM::VM1,"?",false }, {0x5001,0x0071,"ELSCINT1",VR::SH,VM::VM1,"?",false }, {0x5001,0x0080,"ELSCINT1",VR::SQ,VM::VM1,"?",false }, Loading Loading @@ -6045,7 +6056,9 @@ static const DICT_ENTRY DICOMV3DataDict [] = { {0x200b,0x0099,"Philips RAD Imaging DD 097",VR::SH,VM::VM1,"?",false }, {0x200b,0x009a,"Philips RAD Imaging DD 097",VR::FD,VM::VM1,"?",false }, {0x200b,0x009b,"Philips RAD Imaging DD 097",VR::FD,VM::VM1,"?",false }, {0x200b,0x009f,"Philips RAD Imaging DD 097",VR::SQ,VM::VM1,"?",false }, {0x200b,0x00a0,"Philips RAD Imaging DD 097",VR::LT,VM::VM1,"?",false }, {0x200b,0x00a1,"Philips RAD Imaging DD 097",VR::CS,VM::VM1,"?bool?",false }, {0x0031,0x0030,"Philips US Imaging 60",VR::UL,VM::VM1,"Private data",false }, {0x0031,0x0031,"Philips US Imaging 60",VR::UL,VM::VM1,"Private data",false }, {0x200d,0x0005,"Philips US Imaging DD 017",VR::LO,VM::VM1,"?",false }, Loading
Source/MediaStorageAndFileFormat/gdcmIPPSorter.cxx +33 −3 Original line number Diff line number Diff line Loading @@ -37,6 +37,25 @@ inline double spacing_round(double n, int d) /* pow is defined as pow( double, d return floor(n * pow(10., d) + .5) / pow(10., d); } struct dircos_key { double dircos[6]; void read( const std::string & str ) { DirectionCosines dc; dc.SetFromString( str.c_str() ); const double * ptr = dc; memcpy( dircos, ptr, sizeof(dircos) ); } }; struct dircos_comp { bool operator()( dircos_key const & lhs, dircos_key const & rhs ) { const double *iop1 = lhs.dircos; const double *iop2 = rhs.dircos; return std::lexicographical_compare(iop1, iop1+6, iop2, iop2+6); } }; bool IPPSorter::Sort(std::vector<std::string> const & filenames) { // BUG: I cannot clear Filenames since input filenames could also be the output of ourself... Loading Loading @@ -88,11 +107,22 @@ bool IPPSorter::Sort(std::vector<std::string> const & filenames) { if( iops.size() != 1 ) { gdcmDebugMacro( "More than one IOP (or no IOP): " << iops.size() ); //std::copy(iops.begin(), iops.end(), std::ostream_iterator<std::string>(std::cout, "\n")); std::set< dircos_key, dircos_comp > s; for( Scanner::ValuesType::const_iterator it = iops.begin(); it != iops.end(); ++it ) { dircos_key dk; dk.read( *it ); s.insert( dk ); } // sometime we want to handle: // iops = {[0] = "1\\0\\0\\0\\1\\-0", [1] = "1\\0\\0\\0\\1\\0 "} if( s.size() != 1 ) { gdcmDebugMacro( "More than one IOP (or no IOP): " << iops.size() << ". Try changing DirCosTolerance" ); return false; } } } const size_t fsize = frames.size(); // Should I really tolerate issue with Frame of Reference UID ? if( fsize == 1 ) // by the book { Loading