I'm coding a Q/R application, but I have some difficulties to do a C-FIND with Patient Root Q/R Model Information : the DcmSCU class doesn't find a Presentation Context fitting the situation with findUncompressedPC(UID_FINDPatientRootQueryRetrieveInformationModel, scu) in the example given in the official website. For clarity, here is the code of this function :
Code: Select all
Uint8 MN_DCM_client::findUncompressedPC(const OFString& sopClass, DcmSCU &scu)
{
Uint8 pc;
pc = scu.findPresentationContextID(sopClass, UID_LittleEndianExplicitTransferSyntax);
if (pc == 0)
pc = scu.findPresentationContextID(sopClass, UID_BigEndianExplicitTransferSyntax);
if (pc == 0)
pc = scu.findPresentationContextID(sopClass, UID_LittleEndianImplicitTransferSyntax);
return pc;
}
Code: Select all
// Returns usable presentation context ID for a given abstract syntax UID and
// transfer syntax UID. 0 if none matches.
T_ASC_PresentationContextID DcmSCU::findPresentationContextID(const OFString &abstractSyntax,
const OFString &transferSyntax,
const T_ASC_SC_ROLE requestorRole)
{
if (!isConnected())
return 0;
DUL_PRESENTATIONCONTEXT *pc;
LST_HEAD **l;
OFBool found = OFFalse;
if (abstractSyntax.empty()) return 0;
/* first of all we look for a presentation context
* matching both abstract and transfer syntax
*/
l = &m_assoc->params->DULparams.acceptedPresentationContext;
pc = (DUL_PRESENTATIONCONTEXT*) LST_Head(l);
(void)LST_Position(l, (LST_NODE*)pc);
while (pc && !found)
{
found = (strcmp(pc->abstractSyntax, abstractSyntax.c_str()) == 0);
found &= (pc->result == ASC_P_ACCEPTANCE);
if (!transferSyntax.empty()) // ignore transfer syntax if not specified
found &= (strcmp(pc->acceptedTransferSyntax, transferSyntax.c_str()) == 0);
if (found) found &= pc->acceptedSCRole == ascRole2dulRole(requestorRole);
if (!found) pc = (DUL_PRESENTATIONCONTEXT*) LST_Next(l);
}
if (found)
return pc->presentationContextID;
return 0; /* not found */
}
What PresID is used by findscu.exe with Patient Root Q/R Model Information and Little Endian Implicit ? I'm searching on my own but maybe someone already has the answer.
Have a nice day,
ChoCChoK.