Getting DCM2PNG to work for images with multiple frames.

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
nech_neb
Posts: 11
Joined: Thu, 2006-07-20, 17:00

Getting DCM2PNG to work for images with multiple frames.

#1 Post by nech_neb »

I have a dicom image which has multiple frames.
I'm trying to convert the image to multiple bitmaps.
What is the best way to achieve this?

dcm2pnm.exe +Fa +ob TEST29 out.bmp

returns this:

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 in advance,
Much apprieciated.

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

Try dcmj2pnm since the image probably uses JPEG compression.

nech_neb
Posts: 11
Joined: Thu, 2006-07-20, 17:00

#3 Post by nech_neb »

Thanks!! Worked wonderfully.

nech_neb
Posts: 11
Joined: Thu, 2006-07-20, 17:00

#4 Post by nech_neb »

Is there a way to load an image using JPEG compression into a DicomImage object?

I tried the following,

DJEncoderRegistration::registerCodecs();
DicomImage * di = new DicomImage(fileName);

Tips?
Am I restricted to loading with a DcmFileFormat ??

Thanks in advance.

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#5 Post by Jörg Riesmeier »

You need to register the Decoders not the Encoders (see source code of dcm2pnm.cc and examples for module dcmjpeg ).

Post Reply

Who is online

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