#include "ltdic.h"
L_UCHAR LDicomAssociate::FindNextAbstract(nID, pszUID)
Finds the next Presentation Context that contains the specified Abstract Syntax.
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.
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 function 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 LDicomAssociate::GetAbstract.
To set the Abstract Syntax of a specific Presentation Context, call LDicomAssociate::SetAbstract.
Required DLLs and Libraries
Win32, x64
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_INT LDicomAssociate_FindNextAbstractExample()
{
L_INT nRet = -1;
//create the Associate Class as Request
LDicomAssociate *pDicomAssociate = new LDicomAssociate(TRUE);
pDicomAssociate->Reset(TRUE);
nRet = pDicomAssociate->AddPresentation(1, PDU_ACCEPT_RESULT_SUCCESS, UID_VERIFICATION_CLASS);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
nRet = pDicomAssociate->AddTransfer(1, UID_IMPLICIT_VR_LITTLE_ENDIAN);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
nRet = pDicomAssociate->AddPresentation(3, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
nRet = pDicomAssociate->AddTransfer(3, UID_IMPLICIT_VR_LITTLE_ENDIAN);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
nRet = pDicomAssociate->AddPresentation(5, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
nRet = pDicomAssociate->AddTransfer(5, UID_EXPLICIT_VR_LITTLE_ENDIAN);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
nRet = pDicomAssociate->AddPresentation(7, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
nRet = pDicomAssociate->AddTransfer(7, UID_RLE_LOSSLESS);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
nRet = pDicomAssociate->AddPresentation(9, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
nRet = pDicomAssociate->AddTransfer(9, UID_JPEG2000);
if(nRet != DICOM_SUCCESS)
{
return nRet;
}
CString csMsg;
// Get the number of times the abstract syntax UID_CT_IMAGE_STORAGE occurs
L_INT nAbstractCount = pDicomAssociate->GetAbstractCount(UID_CT_IMAGE_STORAGE);
csMsg.Format(TEXT("Abstract Count: %d\n"), nAbstractCount);
OutputDebugString(csMsg);
// Get the presentation IDs that contain the abstract syntax UID_CT_IMAGE_STORAGE
L_UCHAR uID = pDicomAssociate->FindAbstract(UID_CT_IMAGE_STORAGE);
while (uID != 0)
{
csMsg.Format(TEXT("\tPresentation Context: %d\n"), uID);
OutputDebugString(csMsg);
uID = pDicomAssociate->FindNextAbstract(uID, UID_CT_IMAGE_STORAGE);
}
// Free the associate
delete pDicomAssociate;
return nRet;
}
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