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
There are two types of overlays:
1) Burned-In: is the original one. It uses higher bit(s) of monochrome pixeldata (that are outside of pixel range, for example, when BitsAllocated is 16 and BitsStored is 12, there are 4 unused bits per pixel (bits 12..15), that could be used for overlay. I'm not sure how it's done for signed images.
Note that there is no tag that specifies if an image has such overlay. (there is a tag called Burned In Annnotation (0028,0301), but it means something else).
2) Overlay module: a range of tags (group 0x600xx) is reserved for overlays. Each such group contains several tags along with a bitmap with 1 bit per pixel, where
1
means presence of overlay.Note that it's not a standard GDI bitmap, lines are not aligned on DWORD boundary! (and I'm not sure if it uses the same bit endianness.)
A DICOM image can have several (up to 16?) such overlays. See part 3 of the standart for exact specifications.