L_DicomGetAbstract

#include "ltdic.h"

L_LTDIC_API L_VOID L_DicomGetAbstract(hPDU, nID, strAbstract, SizeInWords)

HDICOMPDU hPDU;

/* a DICOM Associate handle */

L_UCHAR nID;

/* presentation ID */

L_TCHAR * strAbstract;

/* buffer to be updated */

L_UINT32 SizeInWords;

/* size of the destination string buffer */

Gets the Abstract Syntax for the specified Presentation Context of the specified DICOM Associate.

Parameter

Description

hPDU

A DICOM Associate handle.

nID

Presentation ID of the Presentation Context from which to get the abstract syntax. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data. It also identifies a specific Presentation Context within an Associate.

strAbstract

Buffer to be updated with the Presentation ID .

SizeInWords

Size of the destination string buffer.

Returns

None.

Comments

The Abstract Syntax provides information about the class type of the data that will be transferred across the DICOM Associate connection.

This function is valid only for DICOM Associates of type Associate Request.

To set the Abstract Syntax of a specific Presentation Context, call L_DicomSetAbstract.

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

See Also

Functions:

L_DicomSetAbstract

Topics:

Working with DICOM Associate Connections

Example

L_INT DicomGetAbstractExample(HDICOMPDU hPDU)
{
   L_UCHAR i;
   L_INT lCount;
   L_TCHAR szOut[4000];L_TCHAR szAbstract[PDU_MAX_UID_SIZE+1];
   L_UCHAR nID;

   /* get current abstracts for each Presentation Context */
   lstrcpy(szOut, TEXT("Presentation Contexts--Abstracts"));
   lCount = L_DicomGetPresentationCount(hPDU);
   for(i = 0; i<lCount; i++)
   {
     nID = L_DicomGetPresentation(hPDU,i);L_DicomGetAbstract(hPDU, nID, szAbstract, PDU_MAX_UID_SIZE+1);
     lstrcat(szOut, TEXT("\n"));
     lstrcat(szOut, szAbstract);
   }
   MessageBox(NULL, szOut, TEXT("Test"), MB_OK);

   /* change the abstracts */
   for (i = 0; i<lCount; i++)
   {
      nID = L_DicomGetPresentation(hPDU,i);
      L_DicomSetAbstract(hPDU, nID, UID_CR_IMAGE_STORAGE);
   }

   /* redisplay */
   lstrcpy(szOut, TEXT("Presentation Contexts--Abstracts"));
   for(i = 0; i<lCount; i++)
   {
     nID = L_DicomGetPresentation(hPDU,i);L_DicomGetAbstract(hPDU, nID, szAbstract, PDU_MAX_UID_SIZE+1);
     lstrcat(szOut, TEXT("\n"));
     lstrcat(szOut, szAbstract);
   }
   MessageBox(NULL, szOut, TEXT("Test"), MB_OK);
   return DICOM_SUCCESS;
}