#include "ltdic.h"
L_VOID LDicomAssociate::DelTransfer(nID, nIndex)
Deletes a Transfer Syntax from the specified Presentation Context.
Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.
The index of the Transfer Syntax to delete. This index is zero-based.
None.
A DICOM Associate (Request or Accept) can have multiple Presentation Contexts. A DICOM Associate Request can have multiple Transfer Syntax entries for each Presentation Context. A Transfer Syntax can be deleted by specifying the ID for the appropriate Presentation Context and the index for the appropriate Transfer Syntax.
Required DLLs and Libraries
Win32, x64
L_INT LDicomAssociate_DelTransferExample(LDicomAssociate* m_pDicomAssociate){L_INT nRet;long i;CString cStr;L_INT nTransferSyntaxCount;L_UCHAR nID;L_TCHAR szTransfer[PDU_MAX_UID_SIZE];//m_pDicomAssociate is a member variable declared as:// LDicomAssociate *m_pDicomAssociate;//create the Associate Class as Requestm_pDicomAssociate = new LDicomAssociate(TRUE);//set the Associate to the defaultm_pDicomAssociate->Default();//display each Transfer Syntax for the first Presentation ContextcStr = TEXT("Transfer Syntax");nID = m_pDicomAssociate->GetPresentation(0);nTransferSyntaxCount = m_pDicomAssociate->GetTransferCount(nID);for (i = 0; i<nTransferSyntaxCount; i++){m_pDicomAssociate->GetTransfer(nID, i, szTransfer, PDU_MAX_UID_SIZE);cStr += TEXT("\n");cStr += szTransfer;}AfxMessageBox(cStr);//add a transfer syntaxnRet = m_pDicomAssociate->AddTransfer(nID, UID_IMPLICIT_VR_LITTLE_ENDIAN);if(nRet != DICOM_SUCCESS)return nRet;//display each Transfer Syntax for the first Presentation ContextcStr = TEXT("Transfer Syntax--add a transfer syntax");nTransferSyntaxCount = m_pDicomAssociate->GetTransferCount( nID);for (i = 0; i<nTransferSyntaxCount; i++){m_pDicomAssociate->GetTransfer( nID, i, szTransfer, PDU_MAX_UID_SIZE);cStr += TEXT("\n");cStr += szTransfer;}AfxMessageBox(cStr);//change themnTransferSyntaxCount = m_pDicomAssociate->GetTransferCount( nID);for (i = 0 ; i < nTransferSyntaxCount ; i++){nRet = m_pDicomAssociate->SetTransfer( nID, i, UID_EXPLICIT_VR_BIG_ENDIAN);if(nRet != DICOM_SUCCESS)return nRet;}//display each Transfer Syntax for the first Presentation ContextcStr = TEXT("Transfer Syntax--changed");nTransferSyntaxCount = m_pDicomAssociate->GetTransferCount( nID);for (i = 0; i<nTransferSyntaxCount; i++){m_pDicomAssociate->GetTransfer( nID, i, szTransfer, PDU_MAX_UID_SIZE);cStr += TEXT("\n");cStr += szTransfer;}AfxMessageBox(cStr);//delete the last onenTransferSyntaxCount = m_pDicomAssociate->GetTransferCount( nID);m_pDicomAssociate->DelTransfer( nID, nTransferSyntaxCount - 1);//display each Transfer Syntax for the first Presentation ContextcStr = TEXT("Transfer Syntax--delete last one");nTransferSyntaxCount = m_pDicomAssociate->GetTransferCount( nID);for (i = 0; i<nTransferSyntaxCount; i++){m_pDicomAssociate->GetTransfer( nID, i, szTransfer, PDU_MAX_UID_SIZE);cStr += TEXT("\n");cStr += szTransfer;}AfxMessageBox(cStr);//Free associatedelete m_pDicomAssociate;return DICOM_SUCCESS;}
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
