#include "ltdic.h"
L_VOID LDicomAssociate::DelTransfer(nID, nIndex)
L_UCHAR nID; |
presentation ID |
L_INT nIndex; |
index |
Deletes a Transfer Syntax from the specified Presentation Context.
Parameter |
Description |
nID |
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. |
nIndex |
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
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 |
Win32, x64
Functions: |
LDicomAssociate::GetTransfer, LDicomAssociate::SetTransfer, LDicomAssociate::GetTransferCount, LDicomAssociate::AddTransfer |
Topics: |
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;}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
