Implicit to Explicit Conversion Error For Signed Data

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
kent
Posts: 1
Joined: Tue, 2005-10-25, 15:29

Implicit to Explicit Conversion Error For Signed Data

#1 Post by kent »

I think I found a bug in the way dcmtk is writing explicit VR for tags that have different VRs based on secondary information. This was tested using DCMTK 3.5.3

The interesting part is the following few tags:

Code: Select all

(0028,0103) US 1                                          #   2, 1 PixelRepresentation
(0028,0106) xs 0                                          #   2, 1 SmallestImagePixelValue
(0028,0107) xs 1220                                       #   2, 1 LargestImagePixelValue
So the Smallest and Largest Image Pixel Value *should* be interpreted as a SS (signed short) because Pixel Representation is 1 (signed).

So when converting this Implicit VR Little Endian file to Explicit VR Little Endian with the command:

Code: Select all

dcmconv +te implicit.dcm explicit.dcm
I get the following for those three tags:

Code: Select all

(0028,0103) US 1                                        #   2, 1 PixelRepresentation
(0028,0106) US 0                                        #   2, 1SmallestImagePixelValue
(0028,0107) US 1220                                     #   2, 1 LargestImagePixelValue
So I assume that if one was running storescp or imagectn with writing explicit VR and accepting implicit VR, signed images would be "incorrect" when stored as explicit VR.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Semrush [Bot] and 1 guest