Creating a Monochrome Bitmap from Dicom Image

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
kathirvel_kg
Posts: 7
Joined: Fri, 2006-08-04, 09:53

Creating a Monochrome Bitmap from Dicom Image

#1 Post by kathirvel_kg »

Hello everyone,
I want to create bitmaps from dicom images
manually. So, i got the pixel data, designed BITMAPFILEHEADER and
BITMAPINFOHEADER and wrote this into a file.

I used DicomImage::createWindowsDIB( ) function to convert RGB values
to BGR . then wrote into the file.
This works sucessfull for 24 bit images.
But incase of 16bit images it is not the case. Its not working. why?

can anyone put some light in this.

is there any function to create Monochrome(16 bit and 8 bit) images from the pixel data?

Regards,
Kathirvel

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 »

Monochrome Windows DIBs are created by the same function. As you can read in the documentation "8 bit images require an appropriate color palette (256 entries, values: 0 to 255) and are only applicable to monochrome images". So you have to set the parameter "bits" to "8" and create a "color palette". As far as I know, there is no 16 bit monochrome mode for Windows DIBs.

kathirvel_kg
Posts: 7
Joined: Fri, 2006-08-04, 09:53

Thanks Jorg

#3 Post by kathirvel_kg »

thanks for ur advise. Now i am able to generate Monochrome images.

Post Reply

Who is online

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