DcmFindSCU::performQuery works but DcmSCU::sendFINDRequest doesn't

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

DcmFindSCU::performQuery works but DcmSCU::sendFINDRequest doesn't

#1 Post by srhdavidson »

Hello,

The following code snippet successfully retrieved study information from a GE MRI scanner:

Code: Select all

OFString QueryFileName = "QueryInput.dcm";

	DcmFileFormat QueryFile;
    QueryFile.getDataset()->putAndInsertString(DCM_QueryRetrieveLevel, "STUDY");
	QueryFile.getDataset()->putAndInsertString(DCM_StudyDate, "");
 	QueryFile.getDataset()->putAndInsertString(DCM_StudyTime, "");
	QueryFile.getDataset()->putAndInsertString(DCM_AccessionNumber, "");
	QueryFile.getDataset()->putAndInsertString(DCM_PatientName, "");
    QueryFile.getDataset()->putAndInsertString(DCM_PatientID, "*bobo*");
	QueryFile.getDataset()->putAndInsertString(DCM_StudyID, "");

	OFCondition result = QueryFile.saveFile(QueryFileName.c_str(), EXS_LittleEndianImplicit,EET_UndefinedLength, EGL_withoutGL);

	OFList<OFString> QueryFileNameList;
	QueryFileNameList.push_back(QueryFileName);

	OFList<OFString> lOverrideKeys;

	DcmFindSCU * FindSCU = new DcmFindSCU();
	result = FindSCU->initializeNetwork(10);

	result =  FindSCU->performQuery(PeerIPAddress,
									 PeerPort,
									 "FINDSCU",
									 PeerAETitle,
									 UID_FINDStudyRootQueryRetrieveInformationModel,
									 EXS_LittleEndianImplicit,
									 DIMSE_NONBLOCKING,
									 2,
									 ASC_DEFAULTMAXPDU,
									 OFFalse,
									 OFFalse,
									 1,
									 OFTrue,
									 500,
									 &lOverrideKeys,
									 NULL,
									 &QueryFileNameList);


	FindSCU->dropNetwork();

	delete FindSCU;
The next code snippet fails to retrieve study information. A "Peer aborted Association" message is received after the C-FIND request is sent.

Code: Select all

        DcmSCU * DicomSCU = new DcmSCU();

	DicomSCU->setAETitle("FINDSCU");
	DicomSCU->setPeerAETitle(PeerAETitle);
	DicomSCU->setPeerHostName(PeerIPAddress);
	DicomSCU->setPeerPort(PeerPort);
	DicomSCU->setDIMSEBlockingMode(DIMSE_NONBLOCKING);
	DicomSCU->setDIMSETimeout(2);
	DicomSCU->setMaxReceivePDULength(ASC_DEFAULTMAXPDU);

	OFList<OFString> TransferSyntaxes;
	TransferSyntaxes.push_back(UID_LittleEndianImplicitTransferSyntax);

	DicomSCU->addPresentationContext(UID_FINDStudyRootQueryRetrieveInformationModel, TransferSyntaxes);
	
	OFCondition result = DicomSCU->initNetwork();

	result = DicomSCU->negotiateAssociation();

	T_ASC_PresentationContextID cxID = DicomSCU->findPresentationContextID(UID_FINDStudyRootQueryRetrieveInformationModel, "");

    DcmDataset findParams;
    findParams.putAndInsertString(DCM_QueryRetrieveLevel, "STUDY");
	findParams.putAndInsertString(DCM_StudyDate, "");
 	findParams.putAndInsertString(DCM_StudyTime, "");
	findParams.putAndInsertString(DCM_AccessionNumber, "");
	findParams.putAndInsertString(DCM_PatientName, "");
    findParams.putAndInsertString(DCM_PatientID, "*bobo*");
	findParams.putAndInsertString(DCM_StudyID, "");

    FINDResponses responses;
    result = DicomSCU->sendFINDRequest(cxID, &findParams, &responses); 
	
	DicomSCU->closeAssociation(DCMSCU_RELEASE_ASSOCIATION);

	DcmDataset *dset;
	OFListIterator(FINDResponse*) it = responses.begin();
	while (it != responses.end())
	{
		FINDResponse* rsp = *it;
		dset =  rsp->m_dataset;

		if (dset != NULL)
		{
			OFString PatientName;
			result = dset->findAndGetOFString(DCM_PatientName, PatientName);

		}
		
		it++;
	}
To me, these two methods of sending a C-FIND request are the same. I don't see why one works and the other does not. I would much rather use the DcmSCU class because I don't want to have to write a file every time I send a request.

Can someone please show me the difference that I am not seeing?

Sean

Michael Onken
DCMTK Developer
Posts: 2055
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi Sean,

you are sending the request and then release the association?!?:

Code: Select all

result = DicomSCU->sendFINDRequest(cxID, &findParams, &responses); 
   DicomSCU->closeAssociation(DCMSCU_RELEASE_ASSOCIATION);
You have to handle the responses first!

Michael

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#3 Post by srhdavidson »

Michael,

I moved the closeAssociation call below the processing of the responses but that didn't solve my problem.

The sendFINDRequest function returns a bad result. I went into the de-bugger. From what I can tell, the request gets sent but the error is generated when waiting for the response.

Sean

Michael Onken
DCMTK Developer
Posts: 2055
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#4 Post by Michael Onken »

Sean,

my fault, of course the order does not matter, I was a little fast with my last words.

So, what do you get if you enable debug mode, any error explicit message from the server? Look here how to enable debug mode from your program. You might use DEBUG_LOG_LEVEL instead of INFO_LOG_LEVEL in the example.

Michael

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#5 Post by srhdavidson »

Michael,

Here are the contents of the debug log:
2011-05-27 13:44:40.477 DEBUG: Configured a total of 1 presentation contexts for SCU
2011-05-27 13:44:40.477 DEBUG: Request Parameters:
2011-05-27 13:44:40.477 DEBUG: ====================== BEGIN A-ASSOCIATE-RQ =====================
2011-05-27 13:44:40.477 DEBUG: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.0
2011-05-27 13:44:40.477 DEBUG: Our Implementation Version Name: OFFIS_DCMTK_360
2011-05-27 13:44:40.477 DEBUG: Their Implementation Class UID:
2011-05-27 13:44:40.477 DEBUG: Their Implementation Version Name:
2011-05-27 13:44:40.477 DEBUG: Application Context Name: 1.2.840.10008.3.1.1.1
2011-05-27 13:44:40.477 DEBUG: Calling Application Name: FINDSCU
2011-05-27 13:44:40.477 DEBUG: Called Application Name: TTH_MRS2
2011-05-27 13:44:40.477 DEBUG: Responding Application Name: resp. AP Title
2011-05-27 13:44:40.477 DEBUG: Our Max PDU Receive Size: 16384
2011-05-27 13:44:40.477 DEBUG: Their Max PDU Receive Size: 0
2011-05-27 13:44:40.477 DEBUG: Presentation Contexts:
2011-05-27 13:44:40.477 DEBUG: Context ID: 1 (Proposed)
2011-05-27 13:44:40.477 DEBUG: Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel
2011-05-27 13:44:40.477 DEBUG: Proposed SCP/SCU Role: Default
2011-05-27 13:44:40.477 DEBUG: Proposed Transfer Syntax(es):
2011-05-27 13:44:40.477 DEBUG: =LittleEndianImplicit
2011-05-27 13:44:40.477 DEBUG: Requested Extended Negotiation: none
2011-05-27 13:44:40.477 DEBUG: Accepted Extended Negotiation: none
2011-05-27 13:44:40.477 DEBUG: Requested User Identity Negotiation: none
2011-05-27 13:44:40.477 DEBUG: User Identity Negotiation Response: none
2011-05-27 13:44:40.477 DEBUG: ======================= END A-ASSOCIATE-RQ ======================
2011-05-27 13:44:40.477 INFO: Requesting Association
2011-05-27 13:44:40.555 DEBUG: Constructing Associate RQ PDU
2011-05-27 13:44:40.680 DEBUG: PDU Type: Associate Accept, PDU Length: 158 + 6 bytes PDU header
2011-05-27 13:44:40.680 DEBUG: 02 00 00 00 00 9e 00 01 00 00 54 54 48 5f 4d 52
2011-05-27 13:44:40.680 DEBUG: 53 32 20 20 20 20 20 20 20 20 46 49 4e 44 53 43
2011-05-27 13:44:40.680 DEBUG: 55 20 20 20 20 20 20 20 20 20 00 00 00 00 00 00
2011-05-27 13:44:40.680 DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2011-05-27 13:44:40.680 DEBUG: 00 00 00 00 00 00 00 00 00 00 10 00 00 15 31 2e
2011-05-27 13:44:40.680 DEBUG: 32 2e 38 34 30 2e 31 30 30 30 38 2e 33 2e 31 2e
2011-05-27 13:44:40.680 DEBUG: 31 2e 31 21 00 00 19 01 00 00 00 40 00 00 11 31
2011-05-27 13:44:40.680 DEBUG: 2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 31 2e 32
2011-05-27 13:44:40.680 DEBUG: 50 00 00 20 51 00 00 04 00 00 c8 00 52 00 00 14
2011-05-27 13:44:40.680 DEBUG: 31 2e 32 2e 38 34 30 2e 31 31 33 36 31 39 2e 36
2011-05-27 13:44:40.680 DEBUG: 2e 32 34 34
2011-05-27 13:44:40.680 DEBUG: Parsing an A-ASSOCIATE PDU
2011-05-27 13:44:40.680 DEBUG: Association Parameters Negotiated:
2011-05-27 13:44:40.680 DEBUG: ====================== BEGIN A-ASSOCIATE-AC =====================
2011-05-27 13:44:40.680 DEBUG: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.0
2011-05-27 13:44:40.680 DEBUG: Our Implementation Version Name: OFFIS_DCMTK_360
2011-05-27 13:44:40.680 DEBUG: Their Implementation Class UID: 1.2.840.113619.6.244
2011-05-27 13:44:40.680 DEBUG: Their Implementation Version Name:
2011-05-27 13:44:40.680 DEBUG: Application Context Name: 1.2.840.10008.3.1.1.1
2011-05-27 13:44:40.680 DEBUG: Calling Application Name: FINDSCU
2011-05-27 13:44:40.680 DEBUG: Called Application Name: TTH_MRS2
2011-05-27 13:44:40.680 DEBUG: Responding Application Name: TTH_MRS2
2011-05-27 13:44:40.680 DEBUG: Our Max PDU Receive Size: 16384
2011-05-27 13:44:40.680 DEBUG: Their Max PDU Receive Size: 51200
2011-05-27 13:44:40.680 DEBUG: Presentation Contexts:
2011-05-27 13:44:40.680 DEBUG: Context ID: 1 (Accepted)
2011-05-27 13:44:40.680 DEBUG: Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel
2011-05-27 13:44:40.680 DEBUG: Proposed SCP/SCU Role: Default
2011-05-27 13:44:40.680 DEBUG: Accepted SCP/SCU Role: Default
2011-05-27 13:44:40.680 DEBUG: Accepted Transfer Syntax: =LittleEndianImplicit
2011-05-27 13:44:40.680 DEBUG: Requested Extended Negotiation: none
2011-05-27 13:44:40.680 DEBUG: Accepted Extended Negotiation: none
2011-05-27 13:44:40.680 DEBUG: Requested User Identity Negotiation: none
2011-05-27 13:44:40.680 DEBUG: User Identity Negotiation Response: none
2011-05-27 13:44:40.680 DEBUG: ======================= END A-ASSOCIATE-AC ======================
2011-05-27 13:44:40.680 INFO: Association Accepted (Max Send PDV: 51188)
2011-05-27 13:44:40.680 INFO: Send C-FIND Request
2011-05-27 13:44:40.680 DEBUG: ===================== OUTGOING DIMSE MESSAGE ====================
2011-05-27 13:44:40.680 DEBUG: Message Type : C-FIND RQ
2011-05-27 13:44:40.680 DEBUG: Presentation Context ID : 1
2011-05-27 13:44:40.680 DEBUG: Message ID : 1
2011-05-27 13:44:40.680 DEBUG: Affected SOP Class UID : FINDStudyRootQueryRetrieveInformationModel
2011-05-27 13:44:40.680 DEBUG: Data Set : present
2011-05-27 13:44:40.680 DEBUG: Priority :
2011-05-27 13:44:40.680 DEBUG: ======================= END DIMSE MESSAGE =======================
2011-05-27 13:44:40.696 ERROR: Failed receiving DIMSE response: 0006:0317 Peer aborted Association (or never connected)
2011-05-27 13:44:41.649 INFO: Releasing Association
2011-05-27 13:44:41.649 ERROR: Association Release Failed: 0006:0303 DUL Finite State Machine Error: No action defined, state 1 event 10
2011-05-27 13:44:41.649 INFO: Aborting Association
2011-05-27 13:44:41.649 ERROR: Association Abort Failed: 0006:0303 DUL Finite State Machine Error: No action defined, state 1 event 14

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#6 Post by srhdavidson »

Following up, here's the DIMSE portion of the log that is generated when the DcmFindSCU class is used and successfully elicits a reply:
2011-05-27 14:34:35.262 INFO: ===================== OUTGOING DIMSE MESSAGE ====================
2011-05-27 14:34:35.262 INFO: Message Type : C-FIND RQ
2011-05-27 14:34:35.262 INFO: Presentation Context ID : 1
2011-05-27 14:34:35.262 INFO: Message ID : 1
2011-05-27 14:34:35.262 INFO: Affected SOP Class UID : FINDStudyRootQueryRetrieveInformationModel
2011-05-27 14:34:35.262 INFO: Data Set : present
2011-05-27 14:34:35.262 INFO: Priority : low
2011-05-27 14:34:35.262 INFO: ======================= END DIMSE MESSAGE =======================
The one difference seems to be in the priority: absent vs "low". Might this be the problem? Although I thought this was already dealt with? Maybe I need to wait for the next release?

And is there a way to set the priority higher?

Michael Onken
DCMTK Developer
Posts: 2055
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#7 Post by Michael Onken »

Hi,

the "Priority" attribute must be set, as the standard in part 4 says for C-FIND:
9.1.2.1.4 Priority
This parameter specifies the priority of the C-FIND operation. It shall be one of LOW, MEDIUM, or HIGH.
So this was fixed with the commit you quoted. There is no reason I can see why the server should not accept the command since it looks fine for me.

What is the message (i.e. which query attributes) you send?

Michael

P.S [Edit]: Currently the corresponding request output is missing in the SCU C-FIND output, I will add this later today. Of course you should know anyway what attributes you send in the c-find query.

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#8 Post by srhdavidson »

Michael,

I'm currently working with DCMTK 3.6.0 where the priority bug still exists. I think the solution to the problem is to download the most recent snapshot of the DCMTK code, build it, and then use it in my application. I downloaded dcmtk-3.6.1_20110519. As you may recall from my previous post, I'm using Visual C++ 6.0 and need to use the changext script to convert the extensions of the source code files. Unfortunately, I ran into a problem with the script. This is the output when I entered the command "config/changext cpp" in the DCMTK folder (through cygwin):
$ config/changext cpp
config/changext: line 23: $'\r': command not found
config/changext: line 26: $'\r': command not found
to .cpp C++ files from .cc
config/changext: line 29: syntax error near unexpected token `$'do\r''
'onfig/changext: line 29: `do
Any ideas on what's going on?

Sean

Michael Onken
DCMTK Developer
Posts: 2055
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#9 Post by Michael Onken »

Hi,

actually line 23 is the first line that is not a comment in that file, and line 26 is the next one only containing a blank line. Are you sure you did not change the unix line endings to windows line endings? Some CVS clients like to change this per default, for example.

You can open the file in a text editor like notepad++ and display line endings. Check that they all say "LF" instead of "CR" (which is actually \r) or "CR/LF".

Michael

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#10 Post by srhdavidson »

Michael,

I opened the script file in notepad++ and all line feeds were CR/LF. I used notepadd++ to change the end-of-line to "Unix Format" (LF) and that allowed me to run the script in cygwin.

Once the script was run, I was able to generate the Visual C++ workspace with CMake. The ALL_BUILD Debug compilation failed at dcm2jpeg with the following errors:
D:\Program Files\dcmtk-3.6.1_20110519\dcmjpeg\libsrc\djdijg12.cpp(252) : error C2665: 'delete' : none of the 2 overloads can convert parameter 1 from type 'volatile struct DJDIJG12SourceManagerStruct *'
djdijg8.cpp
D:\Program Files\dcmtk-3.6.1_20110519\dcmjpeg\libsrc\djdijg8.cpp(252) : error C2665: 'delete' : none of the 2 overloads can convert parameter 1 from type 'volatile struct DJDIJG8SourceManagerStruct *'
djdijg16.cpp
D:\Program Files\dcmtk-3.6.1_20110519\dcmjpeg\libsrc\djdijg16.cpp(252) : error C2665: 'delete' : none of the 2 overloads can convert parameter 1 from type 'volatile struct DJDIJG16SourceManagerStruct *'
I compiled the dcmnet project on its own and then successfully compiled my own project. As you can see from the log output, the priority is now set in the C-FIND message but I am still not getting any response from the scanner:
2011-05-30 11:02:14.745 DEBUG: Configured a total of 1 presentation contexts for SCU
2011-05-30 11:02:14.745 DEBUG: Request Parameters:
2011-05-30 11:02:14.745 DEBUG: ====================== BEGIN A-ASSOCIATE-RQ =====================
2011-05-30 11:02:14.745 DEBUG: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.1
2011-05-30 11:02:14.745 DEBUG: Our Implementation Version Name: OFFIS_DCMTK_361
2011-05-30 11:02:14.745 DEBUG: Their Implementation Class UID:
2011-05-30 11:02:14.745 DEBUG: Their Implementation Version Name:
2011-05-30 11:02:14.745 DEBUG: Application Context Name: 1.2.840.10008.3.1.1.1
2011-05-30 11:02:14.745 DEBUG: Calling Application Name: FINDSCU
2011-05-30 11:02:14.745 DEBUG: Called Application Name: TTH_MRS2
2011-05-30 11:02:14.745 DEBUG: Responding Application Name: resp. AP Title
2011-05-30 11:02:14.745 DEBUG: Our Max PDU Receive Size: 16384
2011-05-30 11:02:14.745 DEBUG: Their Max PDU Receive Size: 0
2011-05-30 11:02:14.745 DEBUG: Presentation Contexts:
2011-05-30 11:02:14.745 DEBUG: Context ID: 1 (Proposed)
2011-05-30 11:02:14.745 DEBUG: Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel
2011-05-30 11:02:14.745 DEBUG: Proposed SCP/SCU Role: Default
2011-05-30 11:02:14.745 DEBUG: Proposed Transfer Syntax(es):
2011-05-30 11:02:14.745 DEBUG: =LittleEndianImplicit
2011-05-30 11:02:14.745 DEBUG: Requested Extended Negotiation: none
2011-05-30 11:02:14.745 DEBUG: Accepted Extended Negotiation: none
2011-05-30 11:02:14.745 DEBUG: Requested User Identity Negotiation: none
2011-05-30 11:02:14.745 DEBUG: User Identity Negotiation Response: none
2011-05-30 11:02:14.745 DEBUG: ======================= END A-ASSOCIATE-RQ ======================
2011-05-30 11:02:14.745 INFO: Requesting Association
2011-05-30 11:02:14.823 DEBUG: Constructing Associate RQ PDU
2011-05-30 11:02:14.886 DEBUG: PDU Type: Associate Accept, PDU Length: 158 + 6 bytes PDU header
2011-05-30 11:02:14.886 DEBUG: 02 00 00 00 00 9e 00 01 00 00 54 54 48 5f 4d 52
2011-05-30 11:02:14.886 DEBUG: 53 32 20 20 20 20 20 20 20 20 46 49 4e 44 53 43
2011-05-30 11:02:14.886 DEBUG: 55 20 20 20 20 20 20 20 20 20 00 00 00 00 00 00
2011-05-30 11:02:14.886 DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2011-05-30 11:02:14.886 DEBUG: 00 00 00 00 00 00 00 00 00 00 10 00 00 15 31 2e
2011-05-30 11:02:14.886 DEBUG: 32 2e 38 34 30 2e 31 30 30 30 38 2e 33 2e 31 2e
2011-05-30 11:02:14.886 DEBUG: 31 2e 31 21 00 00 19 01 00 00 00 40 00 00 11 31
2011-05-30 11:02:14.886 DEBUG: 2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 31 2e 32
2011-05-30 11:02:14.886 DEBUG: 50 00 00 20 51 00 00 04 00 00 c8 00 52 00 00 14
2011-05-30 11:02:14.886 DEBUG: 31 2e 32 2e 38 34 30 2e 31 31 33 36 31 39 2e 36
2011-05-30 11:02:14.886 DEBUG: 2e 32 34 34
2011-05-30 11:02:14.886 DEBUG: Parsing an A-ASSOCIATE PDU
2011-05-30 11:02:14.886 DEBUG: Association Parameters Negotiated:
2011-05-30 11:02:14.886 DEBUG: ====================== BEGIN A-ASSOCIATE-AC =====================
2011-05-30 11:02:14.886 DEBUG: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.1
2011-05-30 11:02:14.886 DEBUG: Our Implementation Version Name: OFFIS_DCMTK_361
2011-05-30 11:02:14.886 DEBUG: Their Implementation Class UID: 1.2.840.113619.6.244
2011-05-30 11:02:14.886 DEBUG: Their Implementation Version Name:
2011-05-30 11:02:14.886 DEBUG: Application Context Name: 1.2.840.10008.3.1.1.1
2011-05-30 11:02:14.886 DEBUG: Calling Application Name: FINDSCU
2011-05-30 11:02:14.886 DEBUG: Called Application Name: TTH_MRS2
2011-05-30 11:02:14.886 DEBUG: Responding Application Name: TTH_MRS2
2011-05-30 11:02:14.886 DEBUG: Our Max PDU Receive Size: 16384
2011-05-30 11:02:14.886 DEBUG: Their Max PDU Receive Size: 51200
2011-05-30 11:02:14.886 DEBUG: Presentation Contexts:
2011-05-30 11:02:14.886 DEBUG: Context ID: 1 (Accepted)
2011-05-30 11:02:14.886 DEBUG: Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel
2011-05-30 11:02:14.886 DEBUG: Proposed SCP/SCU Role: Default
2011-05-30 11:02:14.886 DEBUG: Accepted SCP/SCU Role: Default
2011-05-30 11:02:14.886 DEBUG: Accepted Transfer Syntax: =LittleEndianImplicit
2011-05-30 11:02:14.886 DEBUG: Requested Extended Negotiation: none
2011-05-30 11:02:14.886 DEBUG: Accepted Extended Negotiation: none
2011-05-30 11:02:14.886 DEBUG: Requested User Identity Negotiation: none
2011-05-30 11:02:14.886 DEBUG: User Identity Negotiation Response: none
2011-05-30 11:02:14.886 DEBUG: ======================= END A-ASSOCIATE-AC ======================
2011-05-30 11:02:14.886 INFO: Association Accepted (Max Send PDV: 51188)
2011-05-30 11:02:14.901 INFO: Send C-FIND Request
2011-05-30 11:02:14.901 DEBUG: ===================== OUTGOING DIMSE MESSAGE ====================
2011-05-30 11:02:14.901 DEBUG: Message Type : C-FIND RQ
2011-05-30 11:02:14.901 DEBUG: Presentation Context ID : 1
2011-05-30 11:02:14.901 DEBUG: Message ID : 1
2011-05-30 11:02:14.901 DEBUG: Affected SOP Class UID : FINDStudyRootQueryRetrieveInformationModel
2011-05-30 11:02:14.901 DEBUG: Data Set : present
2011-05-30 11:02:14.901 DEBUG: Priority : low
2011-05-30 11:02:14.901 DEBUG: ======================= END DIMSE MESSAGE =======================
2011-05-30 11:02:16.903 ERROR: Failed receiving DIMSE response: 0006:0207 DIMSE No data available (timeout in non-blocking mode)

Michael Onken
DCMTK Developer
Posts: 2055
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#11 Post by Michael Onken »

Sean,

which query keys are you sending with the C-FIND, e.g. Patient Name, Patient ID, ... ?!

We really should be able to find out whats wrong with the network;)

Michael

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#12 Post by srhdavidson »

Michael,

Please see the code samples in the top of the post, which list the query parameters for both methods, the one that works (DcmFindSCU) and the one that doesn't (DcmSCU).

Sean

Michael Onken
DCMTK Developer
Posts: 2055
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#13 Post by Michael Onken »

Hi Sean,

sorry, was not on my mind anymore.

What happens if you run the example SCU I posted on the wiki? I tried it (as is) and works for me. Maybe you can exchange the server information with yours and give it a try.

I also added now the output of query keys in debug mode (for MOVE and FIND).

I'm sorry but I cannot see any other reasons why your code (without trying it) should not work. A look into the server logs, if any :/ or accessible, may be really helpful.

Michael

srhdavidson
Posts: 18
Joined: Mon, 2011-02-07, 17:27
Location: Toronto, Canada

#14 Post by srhdavidson »

I made the same changes to scu.cpp that you did in order to get the query parameters output to the debug log. After re-building dcmnet.lib and my application, the C-FIND message sent via the DcmSCU class now works. Very strange, but since it is now working, I will not complain. Now to try and get a C-MOVE request to work...

Thanks for your help,

Sean

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest