| Summary: | Skipping one pixel for implicit VR DICOM files | ||
|---|---|---|---|
| Product: | Examples/Extended | Reporter: | Ken Sutherland <kensuth> |
| Component: | medical/DICOM | Assignee: | Jonathan Madsen <jonathan.madsen> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | ||
| Priority: | P4 | ||
| Version: | 10.4 | ||
| Hardware: | All | ||
| OS: | All | ||
Thanks, I submitted the fix. |
When reading pixel data from a DICOM file, two bytes are skipped after the tag, but only for *explicit* VR transfer syntax files. I think the code should be like this: // beginning of the pixels if(tagDictionary == 0x7FE00010) { // Folling 2 fread's are modifications to original DICOM example //(Jonathan Madsen) if (fImplicitEndian == false) // NOTE: Only for explicit VR! rflag = std::fread(buffer,2,1,dicom); // Reserved 2 bytes // (not used for pixels) rflag = std::fread(buffer,4,1,dicom); // Element Length // (not used for pixels) break; // Exit to ReadImageData() }