[resolved] Odd length in character string values

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
mlhostis
Posts: 5
Joined: Tue, 2005-05-10, 12:19

[resolved] Odd length in character string values

#1 Post by mlhostis »

Hello everybody,

I've read in the Dicom Norm that character string values (except VR UI) should be padded with space characters when necessary to achieve even length.

But when I convert a dcm file to xml format, odd strings haven't white space at the end.

So I'd like to know if white spaces are written in the dicom file or if it is only the length field which must have an even number ?

Thanks in advance,

mlhostis
Last edited by mlhostis on Mon, 2005-05-30, 15:05, edited 1 time in total.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

DICOM strings except UI are indeed space padded to achieve even length. DCMTK creates and removes this padding character transparently in the background (unless certain options are enabled), so the XML representation created by dcm2xml does not see this artifact, and does not have to.

mlhostis
Posts: 5
Joined: Tue, 2005-05-10, 12:19

#3 Post by mlhostis »

I wasn't sure at all but that's what I thought.

Thanks a lot for your prompt reply.

mlhostis.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest