L_DicomConvertLEADAnnObjToDicomAnnObjs

#include "l_bitmap.h"

L_LTDIC_API L_UINT16 L_DicomConvertLEADAnnObjToDicomAnnObjs(hDS, hAnnObject, pGraphicAnnSQItem, pConversionProc, pUserData, uFlags)

HDICOMDS hDS;

a DICOM handle

HANNOBJECT hAnnObject;

handle to the LEAD annotation object to convert

pDICOMELEMENT pGraphicAnnSQItem;

pointer to a DICOMELEMENT structure

pCONVERTLEADANNOBJTODICOMANNPROC pConversionProc;

pointer to a callback function

L_VOID * pUserData;

pointer to more parameters for the callback

L_UINT uFlags;

reserved for future use

Converts a LEAD Annotation object into one or more DICOM annotation objects, and (optionally) adds the new DICOM annotation objects into the dataset.

Parameter

Description

hDS

A DICOM handle.

hAnnObject

Handle to the LEAD annotation object to be converted, cannot be NULL.

pGraphicAnnSQItem

Pointer to an item element under the "Graphic Annotation Sequence" (0008,1115) in the "Graphic Annotation Module".If this parameter is not NULL then the resulting DICOM annotation objects will be added to the dataset under the item pointed to by this parameter. Pass NULL, if you dont want the resulting objects to be added to the dataset.

pConversionProc

Pointer to the callback function that will be called for each DICOM annotation object generated by this function. The callback function must adhere to the function prototype described in CONVERTLEADANNOBJTODICOMANNPROC.

pUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.

uFlags

Reserved for future use. Pass 0.

Returns

DICOM_SUCCESS

The function was successful.

>0

An error occurred. Refer to Return Codes.

Comments

This function will convert a LEAD Annotation object into one or more DICOM annotation objects (text and graphic). For each resulting DICOM annotation object the callback function pConversionProc will be called.

If the parameter pGraphicAnnSQItem is not NULL, then the function will automatically add the resulting DICOM annotation objects into the dataset. If the resulting DICOM annotation object is a "Text Object" then it will be added under the "Text Object Sequence" under the item pointed to by pGraphicAnnSQItem. If the resulting DICOM annotation object is a "Graphic Object" then it will be added under the "Graphic Object Sequence" under the item pointed to by pGraphicAnnSQItem.

Currently, a subset of the LEADTOOLS annotation objects can be converted (mapped) into DICOM objects, this includes:

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:

L_DicomConvertDicomAnnObjToLEADAnnObj

Topics:

Working with DICOM Annotations

 

Dicom Annotations: Graphic Objects

Example

L_UINT16 EXT_CALLBACK fnCallback( 
const pDICOMGRAPHICOBJECT pGraphicObject, 
const pDICOMTEXTOBJECT pTextObject, 
L_VOID *pUserData) 
{ 
   UNREFERENCED_PARAMETER(pUserData); 
   if (pGraphicObject) 
   { 
      MessageBox( NULL, 
      TEXT("A Graphical object has been created."), 
      TEXT("Note"), 
      MB_OK); 
   } 
   else if (pTextObject) 
   { 
      MessageBox( NULL, 
      TEXT("A Textual object has been created."), 
      TEXT("Note"), 
      MB_OK); 
   } 
   return DICOM_SUCCESS; 
} 
L_INT DicomConvertLEADAnnObjToDicomAnnObjsExample( 
HDICOMDS hPresStateDS, 
HANNOBJECT hAnnObject) 
{ 
   pDICOMELEMENT pGraphicAnnSQItem = L_DicomFindFirstGraphicAnnSQItem(hPresStateDS); 
   L_UINT16 nRet = L_DicomConvertLEADAnnObjToDicomAnnObjs(  hPresStateDS, 
   hAnnObject, 
   pGraphicAnnSQItem, 
   fnCallback, 
   NULL , 
   0); 
   if (nRet == DICOM_SUCCESS) 
   { 
      MessageBox( NULL, 
      TEXT("LEAD annotation object  has been successfully converted."), 
      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