I have a DICOM image that I am reading using C# and converting it into a 16bit bitmap. The bitmap gets created but the image has DICOM overlays. I want to burn the overlay into the bitmap while creating the final dicom bitmap. I am unable to do that. Any help?
One way would be to create a bitmap of overlay data and merge the 2 bitmaps but I can not get the overlay data as bitmap also. I have captured the binary overlay data but how do I burn into a bitmap?
Thanks
The DICOM overlay is simply a bitmap mask. When rendering the image, I would suggest just traversing through the pixels, and in the case where the setting the pixel to white.
In the case of grayscale images, you'd have to check the photometric interpretation to see if it is MONOCHROME1 or MONOCHROME2. You would then have to check the bits allocated to see what the maximum pixel value is, and force the pixel values that have the overlay set to that value int he case of a MONOCHROME1 image. In the case of a MONOCHROME2 image, you'd have to set the pixels with the overlay enabled to the minimum pixel value.
In the case of a color image, you could change the pixel to a specific color, or to white if necessary to get the overlay to display.