Converting Unsigned Data to Signed

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
helioars
Posts: 14
Joined: Mon, 2010-06-14, 11:46

Converting Unsigned Data to Signed

#1 Post by helioars »

Hi

I have read dicom file (compressed pixel data of JPEG2000 format) using third library so far. On checking out the header information of the dicom file, it has
Pixel Representation =1 and
Bit Depth = 16
Modality = CT

Now, the problem is , though the pixel representation signifies that the data are in Signed range, on displaying the dicom image, it is being incorrectly displayed. But, if i convert unsigned data to signed , the image is being displayed correctly.

So, is it possible that though pixel representation value is 1 , data stored is in the unsigned range. Or, are there any other means of checking whether conversion of unsigned data is necessary or not ?

With Best Regards :o

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi,

Pixel Representation is the right position to see whether the data should be interpreted (!) signed or unsigned.

Also note that there might be a Modality LUT inside the CT image, i.e. look especially at attributes Rescale Slope and Rescale Intercept. If slope is set to -1, that also would lead to a change in signedness.

Best regards,
Michael

helioars
Posts: 14
Joined: Mon, 2010-06-14, 11:46

#3 Post by helioars »

Hi,

Thanks for the reply but still remained with the unsolved problem.
Well, on trying with different sets of data
1. Uncompressed DICOM FILE
( Pixel Representation = 1, Rescale Slope = 1, Rescale Intercept = 0)
I do not need to convert the data into signed as it is already in the signed range. Result OK

2. Compressed DICOM FILE
( Pixel Representation = 1, Rescale Slope = 1, Rescale Intercept = 0)
Here, in this case i need to convert the signed data for displaying the image correctly.

Still wondering, in which case i need to convert the data into signed range though pixel representation is 1.

With Best Regards :o

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#4 Post by Michael Onken »

Well, seems to be that may be a problem with the image or the decoder which wrongy interprets the image. Difficult to say without having the image. If you like, send it to dicom at offis dot de and i'll have a look.

Michale

tiffany
Posts: 1
Joined: Mon, 2011-01-31, 20:36

#5 Post by tiffany »

Hello,

I am encountering the exact same problem described by helioars. Our customer is trying to open signed 16 bit MR data and it is displaying black with the default W/L. Our app is is treating the data as signed because Pixel Representation is set to 1, but when I force it to render as unsigned, it displays correctly.

They have compressed the data using JasPer, and I see that the file implementation version says "OFFIS-DCMTK-355". There is no Rescale Slope or Intercept.

Did you ever figure out what the issue was with the data that helioars described?

Thanks in advance for your help,

Tiffany

helioars
Posts: 14
Joined: Mon, 2010-06-14, 11:46

Compressed Images

#6 Post by helioars »

For Jpeg2000 format compressed data, i cannot still figure out when to convert the unsigned data to signed by checking the pixel representation.

Current problem that i have faced now is
For transfer syntax : EXS_JPEG2000LosslessOnly with pixel representation 1
i need to convert this data to signed range.

For transfer syntax : EXS_JPEG2000 with pixel representation 0, i dont need to convert to signed range.
[ U can download this second set of data from net :D http://pubimage.hcuge.ch:8080/
Dicom Image Data Name : AMNESIX, Modality: CT 16/64 ]

So, i would like to get some information on the role of pixel representation in case of compressed data. Can only pixel representation be used for deciding when to convert the data or should some other dicom fields also be taken into consideration.
With Best Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest