LDicomDS::GetTextObjectCount

#include "Ltdic.h"

L_UINT16 LDicomDS::GetTextObjectCount(pGraphicAnnSQItem, pCount)

pDICOMELEMENT pGraphicAnnSQItem;

/* pointer to a DICOMELEMENT structure */

L_UINT* pCount;

/* pointer to a variable which will be updated with the text annotation object count */

Retrieves the number of text annotation objects in the specified "Graphic Annotation Sequence" (0070,0001) item.

Parameter

Description

pGraphicAnnSQItem

Pointer to an item element under the "Graphic Annotation Sequence" (0070,0001) in the "Graphic Annotation Module".

pCount

Pointer to a variable, which will be updated with the text annotation object count.

Returns

0

SUCCESS

>0

An error occurred. Refer to Return Codes.

Comments

This function returns the number of text annotation objects in the specified "Graphic Annotation Sequence" (0070,0001) item in the "Graphic Annotation Module".

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::FindFirstGraphicAnnSQItem, LDicomDS::CreateGraphicAnnSQItem, LDicomDS::CreateTextObject, LDicomDS::RemoveTextObject, LDicomDS::GetTextObjectInfo, LDicomDS::SetTextObjectInfo, LDicomDS::RemoveAllTextObjects, LDicomDS::GetTextObjElement, LDicomDS::ConvertLEADAnnObjToDicomAnnObjs, LDicomDS::ConvertLEADAnnObjToDicomAnnObjs, LDicomDS::ConvertDicomAnnObjToLEADAnnObj, Class Members

Topics:

Working with DICOM Annotations

Example

L_VOID CountTextObjects(LDicomDS& PresStateDS) 
{

   pDICOMELEMENT pGraphicAnnSQItem = PresStateDS.FindFirstGraphicAnnSQItem();
 L_UINT uCount; 
   L_UINT16 nRet = PresStateDS. GetTextObjectCount (pGraphicAnnSQItem, &uCount); 
   if (nRet != DICOM_SUCCESS) 
    return; 
   if (uCount >= 0) 
   {
      L_CHAR szText[256] = "\0";
    wsprintf(szText, "Number of Textual Annotations is:  %i", uCount); 
  MessageBox( NULL, 
                  szText, 
                  "Note", 
                  MB_OK);  
   }
}