Need help with DcmSCP

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Soniko
Posts: 4
Joined: Wed, 2019-01-16, 11:05

Need help with DcmSCP

#1 Post by Soniko »

Hello!
I`m new in use Dicom. I want to store dicom files on client side.
So i use this example (https://support.dcmtk.org/redmine/proje ... wto_DcmSCU) to send move request to my server.
Also I think i need receive files with DcmSCP, so i run this function in another thread:

Code: Select all

void serv()
{
	DcmSCP scp;
	scp.setAETitle(APPLICATIONTITLE);
	scp.setPort((Uint16)11112);
	OFList<OFString> ts;
	ts.push_back(UID_LittleEndianExplicitTransferSyntax);
	ts.push_back(UID_BigEndianExplicitTransferSyntax);
	ts.push_back(UID_LittleEndianImplicitTransferSyntax);
	scp.addPresentationContext(UID_MOVEStudyRootQueryRetrieveInformationModel, ts);
	scp.addPresentationContext(UID_CTImageStorage, ts);
	scp.addPresentationContext(UID_JPEG2000TransferSyntax, ts);
	scp.addPresentationContext(UID_JPEGLSLossyTransferSyntax, ts);
	scp.addPresentationContext(UID_VerificationSOPClass, ts);
	scp.listen();	
}
And it`s don`t working. This is what programs write:

Code: Select all

I: Requesting Association
I: Association Accepted (Max Send PDV: 16372)
I: Sending C-ECHO Request (MsgID 1)
I: Received C-ECHO Response (Success)
I: Sending C-FIND Request (MsgID 2)
I: Received C-FIND Response (Pending)
I: Received C-FIND Response (Success)
I: There are 2 studies available
I: Sending C-MOVE Request (MsgID 3)
I: Association Received 185: ORTHANC -> MICRODICOM
I: Association Acknowledged (Max Send PDV: 16372)
I: Received Association Release Request
I: Association Received 185: ORTHANC -> MICRODICOM
I: Association Acknowledged (Max Send PDV: 16372)
I: Received C-MOVE Response (Failed: UnableToProcess)
E: Unable to process C-Move response
I: Received study #      1: 1.2.826.0.1.3680043.8.1055.1.20111102150758591.92402465.76095170
I: Releasing Association
I: Received Association Release Request
But if i run storescp.exe from dcmtk before, files are accepted well.
As i understand, i miss something. What i can do to fix that?

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

Re: Need help with DcmSCP

#2 Post by Michael Onken »

Hi,

DcmSCP is a base class for developing your own SCPs. It does cannot handle Storage requests out of the box, or even Query/Retrieve requests.

The example SCU that you are running is sending Query/Retrieve requests, i.e. it tries to search and download DICOM images from DcmSCP which does not make sense.

If you want to store images with your own SCP, you might want to look into the class DcmStorageSCP which derives from DcmSCP and implements a Storage handler.

If you want to store images from your own SCU code, you should look into the class DcmStorageSCU which is a Storage SCU derived from DcmSCU.

Best regards,
Michael

Soniko
Posts: 4
Joined: Wed, 2019-01-16, 11:05

Re: Need help with DcmSCP

#3 Post by Soniko »

Oh. Thank you. It was very helpful. This is exactly what I wanted to know.

Post Reply

Who is online

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