Hi,
We are facing an issue with OFString compare method.
In DcmPresentationState::createFromImage method, line 928
else if ((aString != "MONOCHROME2")&&(aString != "MONOCHROME 2"))
is failing for sString value "MONOCHROME2"
This is what I found, it is failing for image where the padding used is NULL instead of SPACE.
For bad case, sString size is 12 (while NULL padding), because of this OFString::compare method is returning false.
But for good case, sString size is 11 (while SPACE padding).
The dataset was downloaded from Osirix, so I am not sure what is wrong.
Please suggest.
Thanks
Rakesh
OFString::compare (const OFString& str) is failing
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: OFString::compare (const OFString& str) is failing
Using a zero (0x00) byte instead of a space (0x20) for padding a CS value violates the DICOM standard, if this was the question.
Re: OFString::compare (const OFString& str) is failing
Yes, thats was the doubt I have.. so can we report that as violation of DICOM std.?
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: OFString::compare (const OFString& str) is failing
If you want to refer to the DICOM standard, here is the definition of the corresponding VR: http://medical.nema.org/medical/dicom/c ... able_6.2-1
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest