Skip to content

Commit

Permalink
ENH: Clean ctkDICOMEcho
Browse files Browse the repository at this point in the history
  • Loading branch information
Punzo committed Dec 12, 2023
1 parent c257967 commit 75211ae
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions Libs/DICOM/Core/ctkDICOMEcho.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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");
Expand All @@ -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");
Expand Down

0 comments on commit 75211ae

Please sign in to comment.