Palette Color Images to RGB

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
yogendrarampuria
Posts: 5
Joined: Tue, 2006-01-17, 18:36
Location: Hyderabad (AP), India
Contact:

Palette Color Images to RGB

#1 Post by yogendrarampuria »

Hi,
I have seen the dcmquant. I want a functionality exactly opposite of dcmquant. I want to convert PALETTE COLOR Image to RGB or YBR. How is that possible.
Also, the PALETTE COLOR images could be RLE compressed.
Intrestingly, dcmcjpeg does this. I mean if i try and compress unencapsulated PALETTE COLOR image, it converts its automagically to RGB. But haven't been able to figure out how.
Actually, my application is able to view RGB, YBR FULL,etc but not PALETTE COLOR images so I would like to do the conversion on the fly. In case extra file has to be created, its fine.
Any Clue about this thing?

Thanks in advance.

PS I am using DCMTK 3.5.3
Yogendra Rampuria

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

#2 Post by Michael Onken »

Hi,

if you're using the class DicomImage, you can use the getOutputData() method to access the pixel data. The returned data is in RGB format. Take a look at the API documentation at http://support.dcmtk.org/docs/mod_dcmimage.html how to use this class.

dcmcjpeg achieves the colour transformation using the same mechanism.

Regards,
Michael

yogendrarampuria
Posts: 5
Joined: Tue, 2006-01-17, 18:36
Location: Hyderabad (AP), India
Contact:

#3 Post by yogendrarampuria »

Michael Onken wrote:if you're using the class DicomImage, you can use the getOutputData() method to access the pixel data. The returned data is in RGB format.
thanks for the info but still I have a little more trouble which i shall ask you in some time but for the time being thanks a tone.
bye
Yogendra Rampuria

Post Reply

Who is online

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