LDicomDS::SetGraphicObjectInfo

#include "Ltdic.h"

L_UINT16 LDicomDS::SetGraphicObjectInfo(pGraphicAnnSQItem, uGraphicObjectIndex, pGraphicObject)

pDICOMELEMENT pGraphicAnnSQItem;

/* pointer to a DICOMELEMENT structure */

L_UINT uGraphicObjectIndex;

/* graphic annotation object index */

pDICOMGRAPHICOBJECT pGraphicObject;

/* pointer to the graphic annotation object attributes structure */

Updates the attributes of a graphic annotation object.

Parameter

Description

pGraphicAnnSQItem

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

uGraphicObjectIndex

Index of the graphic annotation object to be updated

pGraphicObject

Structure containing the graphic annotation object attributes.

Returns

0

SUCCESS

>0

An error occurred. Refer to Return Codes.

Comments

Before calling this function, initialize pGraphicObject-> uStructSize to be sizeof(DICOMGRAPHICOBJECT) and initialize all the structure members.

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::CreateGraphicObject, LDicomDS::RemoveGraphicObject, LDicomDS::GetGraphicObjectInfo, LDicomDS::GetGraphicObjectCount, LDicomDS::RemoveAllGraphicObjects, LDicomDS::GetGraphicObjPointCount, LDicomDS::GetGraphicObjElement, LDicomDS::ConvertLEADAnnObjToDicomAnnObjs, LDicomDS::ConvertLEADAnnObjToDicomAnnObjs, LDicomDS::ConvertDicomAnnObjToLEADAnnObj, Class Members

Topics:

Working with DICOM Annotations

Example

L_VOID UpdateFirstGraphicObject(LDicomDS& PresStateDS) 
{
   DICOMGRAPHICOBJECT GraphicObject; 
 L_UINT nCount = 1; 

   pDICOMELEMENT pGraphicAnnSQItem = PresStateDS.FindFirstGraphicAnnSQItem();
 pDICOMANNPOINT pAnnPoints = new DICOMANNPOINT[nCount]; 

 DICOMANNPOINT  Point; 

 Point.fX = (L_FLOAT)8.1; 
 Point.fY = (L_FLOAT)8.3; 

 pAnnPoints[0] = Point; 

 memset(&GraphicObject, 0, sizeof(DICOMGRAPHICOBJECT)); 
 GraphicObject.bFilled = TRUE; 
 GraphicObject.uType = DICANN_TYPE_POINT; 
 GraphicObject.pszLayerName = "First Layer";
 GraphicObject.nPointCount = nCount; 
 GraphicObject.uUnits = DICANN_UNIT_PIXEL; 
 GraphicObject.pAnnPoints = pAnnPoints; 
 GraphicObject.uStructSize = sizeof(DICOMGRAPHICOBJECT); 

 L_UINT16 nRet = PresStateDS.SetGraphicObjectInfo(pGraphicAnnSQItem, 0, &GraphicObject); 
 if (nRet == DICOM_SUCCESS) 
 {
      MessageBox( NULL, 
                  "Graphic Object has been successfully updated!", 
                  "Note", 
                  MB_OK); 
 }
 if (pAnnPoints) 
 {
  delete [] pAnnPoints; 
 }
}