@Michael Onken
Thanks for your reply!
I've responded to your questions below. Sorry for the delay.
Are you on Windows or a Unix-like system?
- Windows
What happens if you read other string values, like the Patient Name?
- Almost all fields, including the Patient Name are being interpreted the way I'd expect.
What value is shown when you print the "binary data" that you received? (e.g. std::cout << dminDateTimeStr << std::endl)
- "32"
Try to use findAndGetOFStringArray() instead and get all values, maybe the attribute value is multi-valued (though it is not permitted) and you only get the first value (0) right now. findAndGetOFStringArray() will give you all values.
- Results in the string: "32\30\32\33\31\31\30\37\31\31\30\36\30\30\2e\30\30\20"
Have you tried dcmdump on the file? Preferably a downloaded version. Then use also datasetItem->print() to print a dump from your own application. Check for differences and in general whether the datetime and the rest of the values look fine in both printed versions.
- datasetItem->print(), produces this: " (0018,1078) UN 32\30\32\33\31\31\30\37\31\31\30\36\30\30\2e\30\30\20 # 18, 1 RadiopharmaceuticalStartDateTime"
- I don't have the dcmdump exectuable, but the I've used the DVTk DICOM Editor exe to examine the file and it displays correctly as:
-- >(0018,1078) Radiopharmaceutical Start Datetime DT 1 20231107110600.00
- Note the VRs are different between these two.
- I've also examined the file using a HEX Editor and I can see that the file clearly indicates that the VR is UN for this field and the the HEX elements that follow the tag in the match those shown in the output of datasetItem->print(): 32 30 32 33 31 31 30 37 31 31 30 36 30 30 2e 30 30 20
I am not sure if there is a specific dictionary that is being specified. I have always assumed that default tag definitions (inclusive of VR) were being referenced. Does the dcmtk source get distributed with a dictionary file? Can you comment on how to reference it when loading a DICOM file? A quick look online suggested to me that when dcmtk is built on windows system the default behaviour is to use a built-in DICOM dict.
@J. Riesmeier
Thanks for your reply as well.
In which scope should the call to
Code: Select all
dcmEnableUnknownVRConversion.set(OFTrue);
be made? Does this function belong so a certain class?