LDicomDS::GetLayerCount

#include "Ltdic.h"

L_UINT16 LDicomDS::GetLayerCount(pCount)

L_UINT * pCount;

/* pointer to a variable which will be updated with the layer count */

Gets the number of the Graphic Layers.

Parameter

Description

pCount

Pointer to a variable which will be updated with the layer count.

Returns

0

SUCCESS

>0

An error occurred. Refer to Return Codes.

Comments

This function will return the number of layers inside a DICOM dataset by counting the number of items under the "Graphic Layer Sequence" (0070,0060).

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

LDicomDS::GetLayerInfo, LDicomDS::SetLayerInfo, LDicomDS::RemoveLayerByIndex, LDicomDS::RemoveLayerByName, LDicomDS::RemoveAllLayers, LDicomDS::GetLayerIndex, LDicomDS::GetLayerGraphicObjectCount, LDicomDS::RemoveLayerGraphicObjects, LDicomDS::GetLayerTextObjectCount, LDicomDS::RemoveLayerTextObjects, LDicomDS::GetLayerElementByIndex, LDicomDS::GetLayerElementByName, Class Members

Topics:

Working with DICOM Annotations

Example

L_VOID DisplayNumberOfLayers(LDicomDS& PresStateDS) 
{
 L_CHAR szText[256] = "\0";
 L_UINT uCount; 
   L_UINT16 nRet = PresStateDS.GetLayerCount(&uCount); 
 if (nRet == DICOM_SUCCESS) 
 {
  wsprintf(szText, "Number of layers in the Dataset is: %i", uCount); 
    MessageBox( NULL, 
                  szText, 
                  "Note", 
                  MB_OK); 
 }
}