Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C DLL Help

L_DicomSetGraphicObjectInfo

Show in webframe

#include "l_bitmap.h"

L_LTDIC_API L_UINT16 L_DicomSetGraphicObjectInfo(hDS, pGraphicAnnSQItem, uGraphicObjectIndex, pGraphicObject)

HDICOMDS hDS;

/* a DICOM handle */

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

hDS

A DICOM handle.

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

Pointer to a structure containing the graphic annotation object attributes.

Returns

DICOM_SUCCESS

The function was successful.

>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

Platforms

Win32, x64, Linux.

See Also

Functions:

L_DicomFindFirstGraphicAnnSQItem, L_DicomCreateGraphicAnnSQItem, L_DicomCreateGraphicObject, L_DicomRemoveGraphicObject, L_DicomGetGraphicObjectInfo, L_DicomGetGraphicObjectCount, L_DicomRemoveAllGraphicObjects, L_DicomGetGraphicObjPointCount, L_DicomGetGraphicObjElement, L_DicomConvertLEADAnnObjToDicomAnnObjs, L_DicomConvertDicomAnnObjToLEADAnnObj

Topics:

Working with DICOM Annotations

 

Dicom Annotations: Graphic Objects

Example

L_INT DicomSetGraphicObjectInfoExample(HDICOMDS hPresStateDS)
{
   DICOMGRAPHICOBJECT GraphicObject;
   L_UINT nCount = 1;
   pDICOMELEMENT pGraphicAnnSQItem = L_DicomFindFirstGraphicAnnSQItem(hPresStateDS);
   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);
   L_UINT16 nRet = L_DicomSetGraphicObjectInfo (hPresStateDS, 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;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.