Use The DICOM Image Interface to manipulate, display and convert DICOM images to other formats. For an example of using this class see DICOMImageExample.cs. More...
Inherits IDispatch.
Public Member Functions | |
HRESULT | LoadFile ([in] BSTR filename) |
Load image from DICOM file. | |
HRESULT | SaveBitmap (LONG frame, BSTR filename) |
Save as Bitmap. | |
HRESULT | SetWindow ([in] double center, [in] double width) |
Set the window center and window width. | |
HRESULT | ScaledImage ([in] int new_width, [in] int new_height, [out, retval] IDCXIMG **scaledImage) |
Create a scaled image from this image. | |
HRESULT | GetBitmap ([in] LONG frameNo, [in] LONG bufferSizeInBytes, [in] unsigned __int3264 bufPtr) |
Get Windows bitmap (DIB) into pre-allocated memory buffer, e.g. from BitmapData.scan0. More... | |
HRESULT | GetWindow ([out] double *center, [out] double *width) |
\Get window center and width | |
HRESULT | GetHistogramWindow ([in] double threshold, [out] double *center, [out] double *width) |
Calculate histogram window center and width After getting the center and width call SetWindow to use them. More... | |
Use The DICOM Image Interface to manipulate, display and convert DICOM images to other formats. For an example of using this class see DICOMImageExample.cs.
HRESULT IDCXIMG::GetBitmap | ( | [in] LONG | frameNo, |
[in] LONG | bufferSizeInBytes, | ||
[in] unsigned __int3264 | bufPtr | ||
) |
Get Windows bitmap (DIB) into pre-allocated memory buffer, e.g. from BitmapData.scan0.
The bitmap is 24 bits per pixel with strides aligned to 32 bit (double word) length For example if the image width is 250 pixels and height is 250 pixels then the stride (one line of pixels) will be 752 bytes long (250*3 + 2 bytes to align to a multiply of 4 and the buffer size should be at least 752 * 250 i.e. 188000 bytes. If you use .NET Bitmap class then you can just get the BitmapData to allocate the buffer for you As in the DICOMImageExample.cs example.
frameNo | Frame Number (0 based) |
bufferSizeInBytes | Buffer size in bytes |
bufPtr | Pointer to DIB buffer |
HRESULT IDCXIMG::GetHistogramWindow | ( | [in] double | threshold, |
[out] double * | center, | ||
[out] double * | width | ||
) |
Calculate histogram window center and width After getting the center and width call SetWindow to use them.
threshold | Threshold |
center | Output window center |
width | Output window width |