Project

General

Profile

Actions

Bug #554

closed

When OF/OD is mapped to OB, do we need to consider endianness?

Added by Jörg Riesmeier almost 12 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Library
Target version:
Start date:
2013-10-03
Due date:
% Done:

100%

Estimated time:
Module:
dcmdata
Operating System:
Compiler:

Description

When one of the two global flags dcmEnableOtherFloatStringVRGeneration or dcmEnableOtherDoubleStringVRGeneration are set to OFFalse and their corresponding VR is mapped to OB, do we need to consider endianness (i.e. conditionally swap bytes) because OF and OD consist of 4/8 bytes per value?

Currently, OF and OD are handled the same way as UN and UT.

See DcmVR::getValidEVR() for details.


Files

of_od_sample_implicit_vr.dcm (444 Bytes) of_od_sample_implicit_vr.dcm Marco Eichelberg, 2017-04-14 14:02
Actions #1

Updated by Marco Eichelberg over 8 years ago

We only map OF/OD to OB when reading a dataset in LittleEndianImplicit, i.e. in this case the OF/OD data will be kept in little endian byte order (just like we would do if we were mapping to UN). This could be an issue when we try to convert back to the real VR (dcmconv --convert-un) and byte order is big endian. In that case we need to handle the special case that the OB element - just like a UN element - is in little endian, not in big endian.

Actions #2

Updated by Marco Eichelberg over 8 years ago

My last comment was not correct. In fact the conversion of post-1993 VRs to OB happens while writing a dataset, not while reading. There was indeed a bug that can be reproduced by converting the attached DICOM sample file to explicit VR with dcmconv, using the --disable-new-vr option. When converting to explicit VR little endian (+te) the OB elements have the correct value, when converting to big endian (+tb), their value is wrong (OF/OD values swapped to big endian byte order).

Actions #3

Updated by Marco Eichelberg over 8 years ago

  • Status changed from New to Closed
  • Assignee set to Marco Eichelberg
  • % Done changed from 0 to 100

Closed by commit 5ecea10.

Actions #4

Updated by Jörg Riesmeier over 8 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF