dcm2pnm problem with conversion

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
pboninsk
Posts: 5
Joined: Wed, 2005-03-09, 20:36
Location: Poland
Contact:

dcm2pnm problem with conversion

#1 Post by pboninsk »

Hello,

I have problem with correct option set for dcm2pnm. For rest of my test files conversion results was good, but for one the reult is strange. My commnd line: dcm2pnm.exe +Wn +on ct.dcm ct.png . Image is available at http://www.ire.pw.edu.pl/~pboninsk/ct.dcm, result i got is here: http://www.ire.pw.edu.pl/~pboninsk/ct.png. IrfanView can display that image in proper form. I assume i use dcm2pnm incorrectly. How should i use it ?

Thanks

Peter

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 »

The image is defective. The header data claims that the pixel data consists of unsigned integer values, although the values are in reality signed. You can fix the image with dcmodify:

Code: Select all

dcmodify -i PixelRepresentation=1 ct.dcm
After that, dcm2pnm will produce an appropriate result. IrfanView seems to ignore the header data in this case and to assume sign extended data. There is no such workaround in DCMTK.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest