Hello, I've noticed that getOFString() will return an error code if used to retrieve a ShortString or LongString field that has a VM of zero. However, it will successfully return an empty string if used on a ShortText or LongText field with a VM of zero.
I know the main difference between the *String and *Text fields is that the former allow multiple items to be encoded using the backslash as separator. It still seems like the behavior should be the same when VM=0, though. Is this difference by design?
getOFString() Behavior With VM=0
Moderator: Moderator Team
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 5
- Joined: Wed, 2011-04-20, 04:09
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Thank you for pointing this out. No, I don't think that this was a deliberate design decision. It is caused by the fact that SH and LO use the method DcmByteString::getOFString() - where pos=0 is invalid in case of VM=0 - while ST and LT use internally getOFStringArray() which does not check the "pos" parameter.
We will add this issue to our to-do list.
We will add this issue to our to-do list.
-
- DCMTK Developer
- Posts: 2512
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Thanks again for reporting this. Should be fixed now.
Who is online
Users browsing this forum: No registered users and 1 guest