L_DicomSetTextObjectInfo

#include "l_bitmap.h"

L_LTDIC_API L_UINT16 L_DicomSetTextObjectInfo(hDS, pGraphicAnnSQItem, uTextObjectIndex, pTextObject)

HDICOMDS hDS;

a DICOM handle

pDICOMELEMENT pGraphicAnnSQItem;

pointer to a DICOMELEMENT structure

L_UINT uTextObjectIndex;

text annotation object index

pDICOMTEXTOBJECT pTextObject;

pointer to the text annotation object attributes structure

Updates the attributes of a text annotation object.

Parameter

Description

hDS

A DICOM handle.

pGraphicAnnSQItem

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

uTextObjectIndex

Index of the text annotation object to be updated

pTextObject

Structure containing the text annotation object attributes.

Returns

DICOM_SUCCESS

The function was successful.

>0

An error occurred. Refer to Return Codes.

Comments

Before calling this function, initialize pTextObject->uStructSize to be sizeof(DICOMTEXTOBJECT) 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_DicomCreateTextObject, L_DicomRemoveTextObject, L_DicomGetTextObjectInfo, L_DicomGetTextObjectCount, L_DicomRemoveAllTextObjects, L_DicomGetTextObjElement, L_DicomConvertLEADAnnObjToDicomAnnObjs, L_DicomConvertDicomAnnObjToLEADAnnObj

Topics:

Working with DICOM Annotations

 

Dicom Annotations: Text Objects

Example

L_INT DicomSetTextObjectInfoExample(HDICOMDS hPresStateDS) 
{ 
   DICOMTEXTOBJECT   TextObject; 
   L_FLOAT           pAnchorPoint[2]; 
   L_FLOAT           pBRHCorner[2]; 
   L_FLOAT           pTLHCorner[2]; 
   L_UINT16          nRet; 
   pDICOMELEMENT pGraphicAnnSQItem = L_DicomFindFirstGraphicAnnSQItem(hPresStateDS) ; 
   memset(&TextObject, 0, sizeof(DICOMTEXTOBJECT)); 
   pAnchorPoint[0] = (L_FLOAT)1.188; 
   pAnchorPoint[1] = (L_FLOAT)1.188; 
   pBRHCorner[0] = (L_FLOAT)1.288; 
   pBRHCorner[1] = (L_FLOAT)1.288; 
   pTLHCorner[0] = (L_FLOAT)1.388; 
   pTLHCorner[1] = (L_FLOAT)1.388; 
   TextObject.bAnchorPointVisible = FALSE; 
   TextObject.pAnchorPoint = pAnchorPoint; 
   TextObject.pBRHCorner = pBRHCorner; 
   TextObject.pszTextValue = TEXT("Text Value updated"); 
   TextObject.pTLHCorner = pTLHCorner; 
   TextObject.uAnchorPointUnits = DICANN_UNIT_PIXEL; 
   TextObject.uBoundingBoxUnits = DICANN_UNIT_PIXEL; 
   TextObject.pszLayerName = TEXT("First Layer"); 
   TextObject.uTextJustification = DICANN_TEXT_LEFT; 
   TextObject.uStructSize = sizeof(DICOMTEXTOBJECT); 
   nRet = L_DicomSetTextObjectInfo(hPresStateDS,pGraphicAnnSQItem, 0, &TextObject); 
   if (nRet == DICOM_SUCCESS) 
   { 
      MessageBox( NULL, 
      TEXT("Object has been successfully updated."), 
      TEXT("Note"), 
      MB_OK); 
   } 
   return nRet; 
} 

Help Version 19.0.2017.10.18
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS DICOM C API Help