Closed rijobro closed 5 years ago
It actually returns the string Loaded:XX
with XX the number of bytes.
This post might help.
I've switch the tag reading to using gdcm::StringFilter
, which is good, but doesn't solve the problem. The issue seems to be with reading long private fields. The StringFilter
will return an empty string whereas using element.GetValue()
can give you the Loaded:XX
issue you've observed.
So I've kind have fudged this to work by doing:
if stringFilter returns 0
if element.GetValue != "Loaded:"
return the value
else
return empty.
This appears to be okay for SMS 3.4 (roughly >=2014) data. I haven't got any old (3.2) data to hand to check if this approach works there too.
Let me know if the branch works.
For certain files,
nm_extract
works fine, but for some others I've had a problem (although we're not sure if it'spet-rd-tools
or something else (e.g.,gdcm
).In
nmtools/MMR.hpp
, the DICOM tag(0x029, 0x1010)
is initially used. If the returned string does not containSV10
,(0x029, 0x1110)
is used instead.However, for some images, the following line (in
Common.hpp
):returns the length of the string instead of the string itself. This then causes problems.
For these images, we can manually change the code to look straight for
(0x029, 0x1110)
, skipping out(0x029, 0x1010)
altogether.Sorry if this message is a bit cryptic, I can probably explain it better in person. @KrisThielemans helped with the debugging.