InsertBitmapValue method

Delphi example

C++Builder example

 

Builder Syntax

int __fastcall InsertBitmapValue(Ltvcltyp::TBitmapHandle Bitmap, Cardinal uIndex, int nCompression, int nPhotometric, int nBitsPerPixel, int nQFactor);

Delphi Syntax

function InsertBitmapValue(Bitmap: TBitmapHandle; uIndex: Cardinal; nCompression, nPhotometric, nBitsPerPixel, nQFactor: Integer): Integer;

Overview

Refer to Working with Data Sets.

Remarks

This method inserts the image in the given bitmap into the Pixel Data Element at the specified index.

Most DICOM files will only have one Data Element of type TAG_PIXEL_DATA. Therefore, in most instances the CurrentElement property can be Nil (NULL), since the method will automatically replace the images of the only Pixel Data Element in the file. If the CurrentElement property is not Nil, it must contain the Pixel Data Element itself.

If the DICOM file is CLASS_BASIC_DIRECTORY, the file may contain more than one Pixel Data Element. In this case you must specify in the CurrentElement property the Pixel Data Element in which the images will be replaced.

If you wish to replace only one image within the Pixel Data Element, you must use DeleteBitmapValue method and InsertBitmapValue method.

This method generates an OnProgressStatus event.

See Also

Elements:

GetBitmapValue method, GetBitmapListValue method, InsertBitmapValue method, SetBitmapListValue method, SetBitmapListValue method, DeleteBitmapValue method