I get different 16 gray pixel values when opening a dicom file with ImageEnVect component compared to the original values read with another dicom viewer (ImageJ). I have version 5.2.0. I followed suggested path from ImageEn help: // ImageEnView1.LegacyBitmap := False; // Do not use Tbitmap ImageEnView1.IO.NativePixelFormat := True; // Use the original pixel format
Now you can read the pixels using: word = ImageEnView1.IEBitmap.Pixels_ie16g[x,y]; //
Pixel values read this way are definitely 16 bit integer but seems to have a very different scale.
I just sent the dicom file to your email. I couldn't upload the file to the forum. ImageJ is a well known and widely used software in the medical field. It is supported by National Institute of Health (NIH).
By default, ImageEn adjusts each pixel of the original image to make it fit in the 0 to 65535 range. What you see is the actual pixel value.
Another way is to leave the original DICOM pixels unchanged, and change them only when displaying.
To do this just set ImageEnView1.IO.Params.DICOM_Range := iedrSetBlackWhite;
For example:
ImageEnView1.LegacyBitmap := False; // Do not use Tbitmap ImageEnView1.IO.NativePixelFormat := True; // Use the original pixel format ImageEnView1.IO.Params.DICOM_Range := iedrSetBlackWhite; ..now load the Dicom