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_DicomGetBinaryValue

Show in webframe

#include "Ltdic.h"

L_LTDIC_API L_BOOL L_DicomGetBinaryValue(hDS, pElement, pValue, nLength)

HDICOMDS hDS;

/* a DICOM handle */

pDICOMELEMENT pElement;

/* pointer to a DICOMELEMENT structure */

L_VOID * pValue;

/* pointer to a buffer */

L_UINT32 nLength;

/* length of the buffer */

Updates a buffer with a binary value.

Parameter

Description

hDS

A DICOM handle.

pElement

Pointer to a DICOMELEMENT structure within the Data Set.

pValue

Buffer that will be updated with the value of the binary value associated with the specified item in the Data Set. You are responsible for allocating the memory for this buffer.

nLength

Length, in bytes, of the buffer you allocated.

Returns

TRUE

The function is able to update the buffer with the binary value.

FALSE

The function cannot update the buffer with a binary value.

Comments

Note: You must allocate the memory for pValue.

The DICOMELEMENT structure has a member also called nLength. If this nLength value is greater than the nLength of the buffer you allocated (pValue), then the binary value copied into pValue will be truncated to the smaller length. If the nLength of the DICOMELEMENT is shorter than the nLength of pValue, the entire binary value associated with the DICOMELEMENT will be copied into pValue.

This function can be called for every Value Representation, and it will return the exact value in the Value Field (unconverted).

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_DicomGetCharValue, L_DicomGetShortValue, L_DicomGetLongValue, L_DicomGetFloatValue, L_DicomGetDoubleValue, L_DicomGetStringValue, L_DicomGetAgeValue, L_DicomGetDateValue, L_DicomGetTimeValue, L_DicomGetDateTimeValue

Topics:

Working with Data Sets

Example

This example gets the binary value for an element

L_INT DicomGetBinaryValueExample(L_VOID)
{
   HDICOMDS hDS;
   pDICOMELEMENT pElement;
   L_UCHAR szText[256];

   hDS = L_DicomCreateDS(NULL);

   L_DicomInitDS(hDS, CLASS_XA_BIPLANE_IMAGE_STORAGE_RETIRED, 0); 

   pElement = L_DicomFindFirstElement(hDS, NULL, TAG_PATIENT_NAME, FALSE);
   if (pElement != NULL)
   {
      memset(szText, 0, sizeof(szText));
      L_DicomGetBinaryValue(hDS, pElement, szText, sizeof (szText)-1);
   }

   L_DicomFreeDS(hDS);
   return DICOM_SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.