JPEG2000LosslessOnly support

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
alwittta
Posts: 111
Joined: Wed, 2006-03-15, 08:30

JPEG2000LosslessOnly support

#1 Post by alwittta »

Dear friends,

Could anyone please tell me, how can I convert a JPEG2000LosslessOnly DICOM image using DCMTK?

When I used dcm2pnm application, I got the following error message.

Code: Select all

D:\CT3S1>dcm2pnm.exe -v -d 3E36692D 1.bmp
reading DICOM file: 3E36692D
preparing pixel data.
ERROR: cannot change to unencapsulated representation for pixel data !
$dcmtk: dcm2pnm v3.5.4 2005-12-20 $

dcm2pnm: Convert DICOM images to PGM/PPM or BMP
error: Invalid data value

Thanks and Regards
Alvin

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

#2 Post by Michael Onken »

Hi Alvin,

the public DCMTK does not support the JPEG2000 SOP class in terms that it is of course able to transfer or modify DICOM objects of this SOP class but is not able to (de)compress or convert the JPEG2000 coded image data.

This functionality is part of the commercial DCMJP2K module - you can find more information about this on the internet:
http://dicom.offis.de/dcmjp2k.php.en

For prices or whatever you may send a mail to dicom(at)offis(dot)de.

Regards,
Michael

alwittta
Posts: 111
Joined: Wed, 2006-03-15, 08:30

#3 Post by alwittta »

Dear Michael,

Thanks for the reply.
The place I am working is not wish to rise the amount for purchasing the product, since this is a charitable organization.

Cloud you please tell me, how difficult is this to do by myself?

How can I extract the pixel data of the JPEG2000 images using DCMTK's existing open classes?
Is it possible using DiColorImage and DiDocument class?

Thanks and Regards
Alvin

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

#4 Post by Michael Onken »

Hi,

if you are a bit familiar with programming and imaging, you could do the decompressing yourself (using DCMTK and a JPEG2000 library). However if you are not too experienced, this may take some time... Maybe there is another DICOM toolkit that can do JPEG2000 decompression for you - you could use the resulting file then again in DCMTK;)

First you need to extract the image data from the attribute pixel data and read the attributes from the image pixel module (rows, columns, photometric interpretation, ...) and feed this information into a JPEG 2000 decompressor. For the last step you can use an existing JPEG2000 library like Jasper or OpenJPEG. The former steps can be achieved with DCMTK.

It's best to look into the dcmjpeg module to see, how compression/decompression can be integrated seamlessly into dcmdata and dcmimage.

Regards,
Michael

Post Reply

Who is online

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