#include "ltdic.h"
L_LTDIC_API L_UCHAR L_DicomFindNextAbstract(hPDU, nID, pszUID)
Finds the Presentation Context with the specified Abstract Syntax.
A DICOM Associate handle.
The presentation ID of the Presentation Context, within the DICOM Associate, to start the search.
Character string that contains the Abstract String to find. For a list of possible values, refer to Abstract Syntax Values. This parameter cannot exceed PDU_MAX_UID_SIZE + 1, including the null character at the end.
The presentation ID of the Presentation Context, within the DICOM Associate, that has the specified Abstract Syntax. Returns 0 if no presentation context is found that contains the abstract syntax.
This method finds the next presentation context that contains the specified Abstract Syntax. The search starts with the specified presentation ID (nID). This function is useful if an Abstract Syntax appears in more than one presentation context. See the example to see how to list all presentation contexts that contain a particular abstract syntax.
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 Associate objects of type Associate Request.
To get the Abstract Syntax of a specific Presentation Context, call L_DicomGetAbstract.
To set the Abstract Syntax of a specific Presentation Context, call L_DicomSetAbstract.
Required DLLs and Libraries
Win32, x64, Linux.
This example creates an association, and adds an abstract syntax to more than one presentation context. It then uses the GetAbstractCount and FindNextAbstract methods to examine the association.
L_VOID DicomFindNextAbstractExample()
{
//create the Associate Class as Request
HDICOMPDU hPDU = L_DicomCreateAssociate(TRUE);
L_DicomResetAssociate(hPDU, TRUE);
L_DicomAddPresentation(hPDU, 1, PDU_ACCEPT_RESULT_SUCCESS, UID_VERIFICATION_CLASS);
L_DicomAddTransfer(hPDU, 1, UID_IMPLICIT_VR_LITTLE_ENDIAN);
L_DicomAddPresentation(hPDU, 3, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);
L_DicomAddTransfer(hPDU, 3, UID_IMPLICIT_VR_LITTLE_ENDIAN);
L_DicomAddPresentation(hPDU, 5, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);
L_DicomAddTransfer(hPDU, 5, UID_EXPLICIT_VR_LITTLE_ENDIAN);
L_DicomAddPresentation(hPDU, 7, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);
L_DicomAddTransfer(hPDU, 7, UID_RLE_LOSSLESS);
L_DicomAddPresentation(hPDU, 9, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);
L_DicomAddTransfer(hPDU, 9, UID_JPEG2000);
L_TCHAR szMsg[200];
// Get the number of times the abstract syntax UID_CT_IMAGE_STORAGE occurs
L_INT nAbstractCount = L_DicomGetAbstractCount(hPDU, UID_CT_IMAGE_STORAGE);
wsprintf(szMsg, TEXT("Abstract Count: %d\n"), nAbstractCount);
OutputDebugString(szMsg);
// Get the presentation IDs that contain the abstract syntax UID_CT_IMAGE_STORAGE
L_UCHAR uID = L_DicomFindAbstract(hPDU, UID_CT_IMAGE_STORAGE);
while (uID != 0)
{
wsprintf(szMsg, TEXT("\tPresentation Context: %d\n"), uID);
OutputDebugString(szMsg);
uID = L_DicomFindNextAbstract(hPDU, uID, UID_CT_IMAGE_STORAGE);
}
// Free the associate
L_DicomFreeAssociate(hPDU);
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document