From 75211aec6ddbe591d27a87f88bd571bd4d8390c1 Mon Sep 17 00:00:00 2001 From: Davide Punzo Date: Tue, 12 Dec 2023 13:11:56 +0100 Subject: [PATCH] ENH: Clean ctkDICOMEcho --- Libs/DICOM/Core/ctkDICOMEcho.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Libs/DICOM/Core/ctkDICOMEcho.cpp b/Libs/DICOM/Core/ctkDICOMEcho.cpp index 7cb7525ccc..a2b731d235 100644 --- a/Libs/DICOM/Core/ctkDICOMEcho.cpp +++ b/Libs/DICOM/Core/ctkDICOMEcho.cpp @@ -225,7 +225,6 @@ bool ctkDICOMEcho::echo() { Q_D(ctkDICOMEcho); - //d->SCU.setAETitle(OFString(this->callingAETitle().toStdString().c_str())); d->SCU.setPeerAETitle(OFString(this->calledAETitle().toStdString().c_str())); d->SCU.setPeerHostName(OFString(this->host().toStdString().c_str())); d->SCU.setPeerPort(this->port()); @@ -237,7 +236,7 @@ bool ctkDICOMEcho::echo() transferSyntaxes.push_back(UID_BigEndianExplicitTransferSyntax); transferSyntaxes.push_back(UID_LittleEndianImplicitTransferSyntax); - d->SCU.addPresentationContext(UID_FINDStudyRootQueryRetrieveInformationModel, transferSyntaxes); + d->SCU.addPresentationContext(UID_VerificationSOPClass, transferSyntaxes); if (!d->SCU.initNetwork().good()) { logger.error("Error initializing the network"); @@ -252,20 +251,9 @@ bool ctkDICOMEcho::echo() return false; } - Uint16 presentationContext = 0; - // Check for any accepted presentation context for ECHO in study root (don't care about transfer syntax) - presentationContext = d->SCU.findPresentationContextID(UID_FINDStudyRootQueryRetrieveInformationModel, ""); - if (presentationContext == 0) - { - logger.error("Failed to find acceptable presentation context"); - } - else - { - logger.info("Found useful presentation context"); - } - logger.debug("Seding Echo"); - OFCondition status = d->SCU.sendECHORequest(presentationContext); + // Issue ECHO request and let scu find presentation context itself (0) + OFCondition status = d->SCU.sendECHORequest(0); if (!status.good()) { logger.error("Echo failed");