How to convert a dicom file from RGB format into MONOCHROME2?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
YenShihHung
Posts: 8
Joined: Mon, 2011-08-08, 09:53

How to convert a dicom file from RGB format into MONOCHROME2?

#1 Post by YenShihHung »

Hi ~ I need to convert DICOM files from RGB format into MONOCHROME2, I tried to use "dcmcjpeg + cm + pl sour.dcm dest.dcm", but this will be converted to jpeg file format is there another way? thank you

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#2 Post by J. Riesmeier »

dcmscale shows how to use the DCMTK to read a DICOM image file, transform the pixel data with the DicomImage Class and write a new DICOM image file. The conversion from color to monochrome can be achieved with DicomImage::createMonochromeImage().

YenShihHung
Posts: 8
Joined: Mon, 2011-08-08, 09:53

#3 Post by YenShihHung »

Got it. Thanks for your help. ^ ^ /

anilta
Posts: 60
Joined: Thu, 2014-04-10, 08:50

Re: How to convert a dicom file from RGB format into MONOCHROME2?

#4 Post by anilta »

I have a multi-frame image of RGB format.
Does DicomImage::createMonochromeImage() convert all the frames from RGB to MONOCHROME2?

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to convert a dicom file from RGB format into MONOCHROME2?

#5 Post by J. Riesmeier »

Does DicomImage::createMonochromeImage() convert all the frames from RGB to MONOCHROME2?
Yes, if all frames are actually selected for being loaded/processed (see DicomImage constructor).

Post Reply

Who is online

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