#include "Ltdic.h"
L_LTDIC_API L_UINT32 L_DicomGetConvertValue(hDS, pElement, Destination, DestSizeInWords)
HDICOMDS hDS; |
a DICOM |
pDICOMELEMENT pElement; |
pointer to a DICOMELEMENT structure |
L_TCHAR *Destination; |
character string |
L_UINT32 DestSizeInWords; |
size of the destination string buffer |
Converts the value of an element to a string and returns the number of characters in that string. Items in the string are separated by a '\'.
Parameter |
Description |
hDS |
A DICOM handle. |
pElement |
Pointer to a DICOMELEMENT structure within the Data Set. |
Destination |
Character string to be updated with the string version of the value. |
DestSizeInWords |
Size of the destination string buffer. |
Number of characters in the "Destination" parameter.
Call this function twice. The first should have "Destination" set to NULL. This will provide you with the size of the string that will be stored in "Destination". Next, allocate the memory required for "Destination" and call this function again to update "Destination" with the string.
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
Win32, x64, Linux.
Functions: |
|
Topics: |
This example converts the value to a string and display it in a list-box control
L_INT DicomGetConvertValueExample(HDICOMDS hDS, pDICOMELEMENT pElement)
{
L_TCHAR *pszText;
L_TCHAR *p;
L_TCHAR *q;
L_UINT32 nLength;
L_UINT32 nCount;
L_UINT32 i;
nCount = L_DicomGetCountValue(hDS, pElement);
nLength = L_DicomGetConvertValue(hDS, pElement, NULL, 0);
pszText = (L_TCHAR *)malloc(nLength * sizeof(L_TCHAR));
L_DicomGetConvertValue(hDS, pElement, pszText, nLength);
for (i = 0, p = pszText; i < nCount; i++)
{
q = _tcschr(p, '\\');
if (q != NULL)
{
*q++ = 0;
}
MessageBox(NULL, p, TEXT("Value"), MB_OK);
p = q;
}
free(pszText);
L_DicomFreeValue(hDS, pElement);
return DICOM_SUCCESS;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.