LDicomDS::SetGraphicObjectInfo

#include "Ltdic.h"

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

Updates the attributes of a graphic annotation object.

Parameters

pDICOMELEMENT pGraphicAnnSQItem

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

L_UINT uGraphicObjectIndex

Index of the graphic annotation object to be updated

pDICOMGRAPHICOBJECT pGraphicObject

Structure containing the graphic annotation object attributes.

Returns

Value Meaning
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

Platforms

Win32, x64

See Also

Functions

Topics

Example

L_INT LDicomDS_SetGraphicObjectInfoExample(LDicomDS& PresStateDS)   
{ 
   L_INT                nRet; 
   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 = TEXT("First Layer"); 
   GraphicObject.nPointCount = (L_UINT16)nCount;  
   GraphicObject.uUnits = DICANN_UNIT_PIXEL;  
   GraphicObject.pAnnPoints = pAnnPoints;  
   GraphicObject.uStructSize = sizeof(DICOMGRAPHICOBJECT);  
 
   nRet = PresStateDS.SetGraphicObjectInfo(pGraphicAnnSQItem, 0, &GraphicObject);  
   if (nRet == DICOM_SUCCESS)  
   { 
      MessageBox( NULL,  
                  TEXT("Graphic Object has been successfully updated!"),  
                  TEXT("Note"),  
                  MB_OK);  
   } 
   if (pAnnPoints)  
   { 
      delete [] pAnnPoints;  
   } 
 
   return nRet; 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C++ Class Library Help