DCMTK server code
Moderator: Moderator Team
-
- Posts: 8
- Joined: Tue, 2017-10-10, 09:44
DCMTK server code
I tried running a simple sever code
DcmSCP scp;
scp.setAETitle("SERVER");
scp.setPort(11112);
scp.listen();
As far as i know, the builtin listen() function of DCMScp class comes with the capability to handle C-ECHO. But when i try
echoscu -aec "SERVER" -aet "ECHO" 127.0.0.1 11112
i get the following output for echoscu
F: Association Request Failed: 0006:0317 Peer aborted Association (or never connected)
and at scp i get
I: Association Received TA-DT-110: ECHO -> SERVER
I: Incoming Association Request:
I: ====================== BEGIN A-ASSOCIATE-RQ =====================
I: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.2
I: Our Implementation Version Name: OFFIS_DCMTK_362
I: Their Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.2
I: Their Implementation Version Name: OFFIS_DCMTK_362
I: Application Context Name: 1.2.840.10008.3.1.1.1
I: Calling Application Name: ECHO
I: Called Application Name: SERVER
I: Responding Application Name:
I: Our Max PDU Receive Size: 16384
I: Their Max PDU Receive Size: 16384
I: Presentation Contexts:
I: Context ID: 1 (Proposed)
I: Abstract Syntax: =VerificationSOPClass
I: Proposed SCP/SCU Role: Default
I: Proposed Transfer Syntax(es):
I: =LittleEndianImplicit
I: Requested Extended Negotiation: none
I: Accepted Extended Negotiation: none
I: Requested User Identity Negotiation: none
I: User Identity Negotiation Response: none
I: ======================= END A-ASSOCIATE-RQ ======================
E: 0006:042d profile key undefined: DEFAULT
what am i missing here?
DcmSCP scp;
scp.setAETitle("SERVER");
scp.setPort(11112);
scp.listen();
As far as i know, the builtin listen() function of DCMScp class comes with the capability to handle C-ECHO. But when i try
echoscu -aec "SERVER" -aet "ECHO" 127.0.0.1 11112
i get the following output for echoscu
F: Association Request Failed: 0006:0317 Peer aborted Association (or never connected)
and at scp i get
I: Association Received TA-DT-110: ECHO -> SERVER
I: Incoming Association Request:
I: ====================== BEGIN A-ASSOCIATE-RQ =====================
I: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.2
I: Our Implementation Version Name: OFFIS_DCMTK_362
I: Their Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.2
I: Their Implementation Version Name: OFFIS_DCMTK_362
I: Application Context Name: 1.2.840.10008.3.1.1.1
I: Calling Application Name: ECHO
I: Called Application Name: SERVER
I: Responding Application Name:
I: Our Max PDU Receive Size: 16384
I: Their Max PDU Receive Size: 16384
I: Presentation Contexts:
I: Context ID: 1 (Proposed)
I: Abstract Syntax: =VerificationSOPClass
I: Proposed SCP/SCU Role: Default
I: Proposed Transfer Syntax(es):
I: =LittleEndianImplicit
I: Requested Extended Negotiation: none
I: Accepted Extended Negotiation: none
I: Requested User Identity Negotiation: none
I: User Identity Negotiation Response: none
I: ======================= END A-ASSOCIATE-RQ ======================
E: 0006:042d profile key undefined: DEFAULT
what am i missing here?
-
- DCMTK Developer
- Posts: 2055
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK server code
Hi,
which version of DCMTK are you using?
Best,
Michael
which version of DCMTK are you using?
Best,
Michael
-
- DCMTK Developer
- Posts: 2517
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK server code
Looking at the Implementation Version Name, I would say DCMTK 3.6.2
-
- Posts: 8
- Joined: Tue, 2017-10-10, 09:44
Re: DCMTK server code
Yes I am using DCMTK 3.6.2J. Riesmeier wrote:Looking at the Implementation Version Name, I would say DCMTK 3.6.2
I think that the default profile is missing profile key.
-
- Posts: 8
- Joined: Tue, 2017-10-10, 09:44
Re: DCMTK server code
adding the following to the code helped solve it.
scp.addPresentationContext(UID_VerificationSOPClass, UID_LittleEndianImplicitTransferSyntax);
And thank you guys for always helping out.
Regards
Hafiz
scp.addPresentationContext(UID_VerificationSOPClass, UID_LittleEndianImplicitTransferSyntax);
And thank you guys for always helping out.
Regards
Hafiz
-
- DCMTK Developer
- Posts: 2517
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK server code
I checked the classes: DcmSCP does provide a C-ECHO handler but does not add the Verification SOP Class to the (default) list of accepted Presentation Contexts; this is different from the DcmStorageSCP class, which is derived from DcmSCP and which accepts the Verification SOP Class by default.
Excerpt from the DcmStorageSCP documentation:
Excerpt from the DcmStorageSCP documentation:
Code: Select all
* [...] If no association negotiation profile is loaded,
* the SCP will only support the Verification SOP Class (with Default Transfer Syntax,
* i.e. C-ECHO with Implicit VR Little Endian), which is required for all DICOM
* Service Class Providers.
-
- DCMTK Developer
- Posts: 2055
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK server code
Not sure what the best behavior of DcmSCP would be, but I tend to keep it as is. However, at least the current documentation should be much clearer. I will change it in the next days. Thanks for the hint Hafiz.
Best regards,
Michael
Best regards,
Michael
-
- DCMTK Developer
- Posts: 2517
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK server code
Also the error message ("E: 0006:042d profile key undefined: DEFAULT") could be clearer, i.e. when the default profile is empty.
-
- DCMTK Developer
- Posts: 2055
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK server code
Yes, I'll fix that too.
-
- DCMTK Developer
- Posts: 2055
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DCMTK server code
Dear Hafiz,
here is the follow up:
I extended DcmSCP with an option for allowing to handle Verification SOP class. Also the existing documentation has been extended to explain the default behavior (i.e. not to support Verification at all). See this commit.
Also I added a better error message in case the user forgot to add any presentation contexts, or added invalid ones. In that case, the code now also returns a dedicated error code (new OFCondition consant). See this commit.
Thanks for reporting!
Best regards,
Michael
here is the follow up:
I extended DcmSCP with an option for allowing to handle Verification SOP class. Also the existing documentation has been extended to explain the default behavior (i.e. not to support Verification at all). See this commit.
Also I added a better error message in case the user forgot to add any presentation contexts, or added invalid ones. In that case, the code now also returns a dedicated error code (new OFCondition consant). See this commit.
Thanks for reporting!
Best regards,
Michael
-
- Posts: 8
- Joined: Tue, 2017-10-10, 09:44
Re: DCMTK server code
Dear Michael,
Thanks for updating the library and thanks for the mention. You guys are really doing a great job maintaining such a wonderful tool. Hope this proves useful to people who use this tool in the future.
Best Regards
Hafiz
Thanks for updating the library and thanks for the mention. You guys are really doing a great job maintaining such a wonderful tool. Hope this proves useful to people who use this tool in the future.
Best Regards
Hafiz
Who is online
Users browsing this forum: Baidu [Spider], Google [Bot] and 0 guests