GetBitmapCount Example for C++Builder
Cardinal uCount;
/* move to the first image element */
LEADDicom1->FindFirstElement(TAG_PIXEL_DATA, false);
uCount = LEADDicom1->GetBitmapCount();
if(uCount == 1)
{
/* get the bitmap */
LEADDicom1->GetBitmapValue(0, 0, ORDER_RGB);
LEADImage1->Bitmap = LEADDicom1->Bitmap;
LEADDicom1->Bitmap = 0; /* free the image */
}
else if(uCount > 1)
{
/* get the bitmap list */
LEADDicom1->GetBitmapListValue(0, uCount, 0, ORDER_RGB);
LEADImage1->BitmapList = LEADDicom1->BitmapList;
ShowMessage("There are " + IntToStr(LEADDicom1->BitmapListCount) + " Images");
LEADDicom1->BitmapList = 0; /* free the image */
/* play the animation */
LEADImage1->AnimationLoop = true;
LEADImage1->AnimationEnable
= true;
}
else
ShowMessage("No Image!");
ShowMessage("wait");
LEADImage1->AnimationEnable = false;