L_DicomGetAbstract

#include "ltdic.h"

L_CHAR * EXT_FUNCTION L_DicomGetAbstract(hPDU, nID)

HDICOMPDU hPDU;

/* a DICOM Associate handle */

L_UCHAR nID;

/* presentation ID */

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.

Returns

The Abstract Syntax of the specified Presentation Context of the specified DICOM Associate. For a list of possible values, refer to Abstract Syntax Values.

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

See Also

Functions:

L_DicomSetAbstract

Topics:

Working with DICOM Associate Connections

Example

L_VOID Test(HDICOMPDU hPDU)
{
   L_UCHAR  i;
   L_UCHAR  lCount;
   L_CHAR   szOut[4000];
   L_UCHAR  nID;

   /* get current abstracts for each Presentation Context */
   lstrcpy(szOut, "Presentation Contexts--Abstracts");
   lCount = L_DicomGetPresentationCount(hPDU);
   for(i = 0; i<lCount; i++)
   {
     nID = L_DicomGetPresentation(hPDU,i);
     lstrcat(szOut, "\n");
     lstrcat(szOut, L_DicomGetAbstract(hPDU, nID));
   }
   MessageBox(NULL, szOut, "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, "Presentation Contexts--Abstracts");
   for(i = 0; i<lCount; i++)
   {
     nID = L_DicomGetPresentation(hPDU,i);
     lstrcat(szOut, "\n");
     lstrcat(szOut, L_DicomGetAbstract(hPDU, nID));
   }
   MessageBox(NULL, szOut, "Test", MB_OK);
}