I have a DICOM image that I need to save as bitmap for image analysis. I am using fo DICOM 3.0.0.0 and VB.net 4.5.2. Before, I used to use OFFIS DCMTK dcmj2pnm to convert DICOM to bitmap. When I save bitmaps using dcmj2pnm, the background has pixel value 0 according to ImageJ. When I use RenderImage as bitmap and then analyse the output bmp with ImageJ, the background has pixel value 1. The renderoptions are default:
RescaleIntercept: 0
RescaleSlope: 1
VOILUTFunction: LINEAR
The colorMap tells me that it is completely linear (0 = 0, 1 = 1, etc).
Please see the attached DICOM image. This is my code:
Dim dcmImported As New DicomImage(e.Argument.ToString)
Dim bmpSlice As Bitmap = dcmImported.RenderImage(0).As(Of Bitmap)()
bmpSlice.Save("C:\Users\sdekker\Documents\IQ\Samples\fodicom\dcm.bmp")
Why does it produce a bitmap image with a different output than dcmj2pnm?
Thanks for your input!