#include "ltdic.h"
L_VOID LDicomAssociate::DelPresentation(nID)
L_UCHAR nID; |
presentation ID |
Deletes a presentation context in the DICOM Associate.
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. |
None.
A DICOM Associate can have multiple presentation contexts. Any of these can be deleted by passing the appropriate value for nID.
To determine the number of presentation contexts a DICOM Associate has, call LDicomAssociate::GetPresentationCount.
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::AddPresentation, LDicomAssociate::SetPresentation, LDicomAssociate::GetPresentation, LDicomAssociate::GetPresentationCount |
Topics: |
L_INT LDicomAssociate_DelPresentationExample(LDicomAssociate* m_pDicomAssociate){L_INT nRet;L_INT i;L_UCHAR nID, nMaxID;CString strMsg, strTmp;//create the Associate Class as Requestm_pDicomAssociate = new LDicomAssociate(TRUE);//set the Associate to the defaultm_pDicomAssociate->Default();//get current ID's and display themstrMsg = TEXT("Presentation Contexts");nMaxID = 0;for (i = 0; i < m_pDicomAssociate->GetPresentationCount(); i++){nID = m_pDicomAssociate->GetPresentation(i);strTmp.Format(TEXT("\n[%d] = %d"),i, nID);strMsg = strMsg + strTmp;//store the highest nIDif (nID > nMaxID)nMaxID = nID;}AfxMessageBox(strMsg);//nID must be unique and odd numbernID = nMaxID + 2;//delete presentation context that has presentation ID = 1m_pDicomAssociate->DelPresentation(1);//change the presentation context at index 3nRet = m_pDicomAssociate->SetPresentation(3,1);if(nRet != DICOM_SUCCESS){return nRet;}//add a presentation contextstrMsg = TEXT("Presentation Contexts--Added 1");nRet = m_pDicomAssociate->AddPresentation( 9, PDU_ACCEPT_RESULT_SUCCESS, UID_CT_IMAGE_STORAGE);if(nRet != DICOM_SUCCESS)return nRet;for (i = 0 ; i < m_pDicomAssociate->GetPresentationCount() ; i++){nID = m_pDicomAssociate->GetPresentation(i);strTmp.Format(TEXT("\n[%d] = %d"),i, nID);strMsg = strMsg + strTmp;}AfxMessageBox(strMsg);//delete the one we addedstrMsg = TEXT("Presentation Contexts--Deleted 9");m_pDicomAssociate->DelPresentation(9);for (i = 0; i<m_pDicomAssociate->GetPresentationCount(); i++){nID = m_pDicomAssociate->GetPresentation(i);strTmp.Format(TEXT("\n[%d] = %d"),i, nID);strMsg = strMsg + strTmp;}AfxMessageBox(strMsg);//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
