GetBitmapCount Example for C++ 6.0 and later
void CDicomDlg::TestProcBitmap()
{
long lCount;
CString szOut;
m_LEADRasterView1.ShowWindow(SW_SHOW);
m_List1.ShowWindow(SW_HIDE);
m_pLEADDicomDS->FindFirstElement(TAG_PIXEL_DATA, FALSE);
lCount = m_pLEADDicomDS->GetBitmapCount();
if(lCount == 1)
{
//get the bitmap
m_pLEADDicomDS->GetBitmapValue(0, 0, ORDER_RGB, 0);
m_LEADRasterView1.GetRaster().SetBitmap(m_pLEADDicomDS->GetBitmap());
m_pLEADDicomDS->Bitmap = 0; //free the imae
}
else if(lCount > 1)
{
//get the bitmap list
m_pLEADDicomDS->GetBitmapListValue(0, lCount, 0, ORDER_RGB, 0);
m_LEADRasterView1.GetRaster().SetBitmapList(m_pLEADDicomDS->BitmapList);
szOut.Format("There are %ld Images", lCount);
AfxMessageBox(szOut);
m_pLEADDicomDS->BitmapList = 0; //free the imae
//play the animation
m_LEADRasterView1.SetAnimationLoop(TRUE);
m_LEADRasterView1.SetAnimationEnable(TRUE);
}
else
AfxMessageBox("No Image!");
AfxMessageBox("wait");
}