MODALIZER SDK  3.0.0.8
IDCXIMG Interface Reference

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...
 

Properties

pVal Object [get, set]
 Set/Get image from a DICOM Object. More...
 
pVal Width [get]
 Width. More...
 
pVal Height [get]
 Height. More...
 
VARIANT VOILookupTables [get]
 an Array of all VOI Lookup Tables in the DICOM Object The array size is the number of tables The value of every entry is the LUT Explanation (may be null) More...
 
val VOI_LUT [set]
 Activate a VOI LUT Table by its index. More...
 

Detailed Description

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.

Member Function Documentation

◆ GetBitmap()

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.

Parameters
frameNoFrame Number (0 based)
bufferSizeInBytesBuffer size in bytes
bufPtrPointer to DIB buffer

◆ GetHistogramWindow()

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.

Parameters
thresholdThreshold
centerOutput window center
widthOutput window width

Property Documentation

◆ Height

pVal IDCXIMG::Height
getproperty

Height.

◆ Object

pVal IDCXIMG::Object
getsetproperty

Set/Get image from a DICOM Object.

◆ VOI_LUT

val IDCXIMG::VOI_LUT
setproperty

Activate a VOI LUT Table by its index.

◆ VOILookupTables

VARIANT IDCXIMG::VOILookupTables
getproperty

an Array of all VOI Lookup Tables in the DICOM Object The array size is the number of tables The value of every entry is the LUT Explanation (may be null)

◆ Width

pVal IDCXIMG::Width
getproperty

Width.