| View Issue Details [ Jump to Notes ] | [ Print ] |
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0010833 | ITK | | public | 2010-06-15 15:42 | 2010-08-02 15:55 |
|
| Reporter | Greg Sharp | |
| Assigned To | Mathieu Malaterre | |
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | |
| Platform | All | OS | All | OS Version | All |
| Product Version | ITK-3-18 | |
| Target Version | | Fixed in Version | ITK-3-20 | |
|
| Summary | 0010833: GDCM parse fault for special SQ data elements |
| Description | As per the dicom standard (Page 42 of PS 3.5-2009), special SQ data elements (fffe,e000), (fffe,e00d), and (fffe,e0dd) are always implicit VR. However, in certain circumstances, ITK/GDCM attempts to read these data elements in explicit VR mode. This fault causes a data truncation during read, and the remainder of the file is ignored.
Suggested fix:
My suggestion is to check for these special SQ elements, and make sure that they are always parsed using implicit VR mode. The attached patch does this by avoiding the call to FindDocEntryVR() for special SQ data elements.
|
| Tags | No tags attached. |
|
| Resolution Date | |
| Sprint | |
| Sprint Status | |
|
| Attached Files | gdcm-sq-parse-bug.patch [^] (816 bytes) 2010-06-15 15:42 [Show Content] [Hide Content]--- src-ori/gdcmDocument.cxx 2010-06-15 15:19:30.000000000 -0400
+++ src/gdcmDocument.cxx 2010-06-15 15:35:39.000000000 -0400
@@ -2363,8 +2363,21 @@
if ( HasDCMPreamble )
HandleOutOfGroup0002(group, elem);
- std::string vr = FindDocEntryVR();
- std::string realVR = vr;
+ std::string vr, realVR;
+ if (group == 0xfffe && (elem == 0xe000 || elem == 0xe00d || elem == 0xe0dd))
+ {
+ // DICOM PS 3.6-2009, page 117 states:
+ // The VR for Data Elements, Item (FFFE,E000), Item Delimitation
+ // Item (FFFE,E00D), and Sequence Delimitation Item (FFFE,E0DD)
+ // do not exist. See PS 3.5 for explanation.
+ vr = GDCM_UNKNOWN;
+ realVR = GDCM_UNKNOWN;
+ }
+ else
+ {
+ vr = FindDocEntryVR();
+ realVR = vr;
+ }
if ( vr == GDCM_UNKNOWN )
{
contour-anon.dcm [^] (44,546 bytes) 2010-06-15 15:59 |
|