28 #include "dcmtk/dcmdata/dcfilefo.h"
29 #include "dcmtk/dcmdata/dcdeftag.h"
30 #include "dcmtk/dcmdata/dcpixel.h"
31 #include "dcmtk/dcmdata/dcpxitem.h"
32 #include "dcmtk/dcmdata/dcpixseq.h"
42 std::vector<G4double> dataV;
44 for(
int ii=0; ii<nData; ++ii) {
48 if (dset->findAndGetFloat64(tagKey, data,ii).good() ) {
49 dataV.push_back(data);
50 }
else if (dset->findAndGetUint16(tagKey, datai,ii).good() ) {
51 dataV.push_back(datai);
53 G4cout <<
"ERROR (" << std::showbase
55 << std::setfill(
'0') << std::hex << std::setw(4) << tagKey.getGroup()
56 <<
"," << tagKey.getElement() <<
") "<< std::dec << ii << std::endl;
60 (std::to_string(data) +
G4String(
" Have not read (")
61 + std::to_string(tagKey.getGroup())+
","+std::to_string(tagKey.getElement())
62 +
")"+
" : "+std::to_string(ii)).c_str());
76 if (dset->findAndGetOFString(tagKey, data).good() ) {
78 G4cout <<
"ERROR (" << std::showbase
80 << std::setfill(
'0') << std::hex << std::setw(4) << tagKey.getGroup() <<
","
81 << tagKey.getElement() <<
") "<< std::dec << std::endl;
85 (
" Have not read (" + std::to_string(tagKey.getGroup())+
","
86 +std::to_string(tagKey.getElement())+
")"+
" : ").c_str());
virtual std::vector< G4double > Read1Data(DcmDataset *dset, DcmTagKey tagKey, G4int nData)
const XML_Char const XML_Char * data
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual OFString Read1DataStr(DcmDataset *dset, DcmTagKey tagKey)