about dcmqrscp

All other questions regarding DCMTK

Moderator: Moderator Team

Message
Author
Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

about dcmqrscp

#1 Post by Xiao » Sat, 2011-07-23, 07:46

I used dcmqrscp to test 'getscu' which I developped and got an error, the following is the output of dcmqrscp, Is that the role error? could you tell me why? and where should I modified? thanks!

E: Get SCP: storeSCU: [file: /data/db/COMMON/MR_4e2979885f2bbf46.dcm] No presentation context with requestor SCP role for: (MR) 1.2.840.10008.5.1.4.1.1.4
E: getSCP: Get Sub-Op Failed: 0006:0208 DIMSE No valid Presentation Context ID

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#2 Post by Xiao » Mon, 2011-07-25, 03:59

Belowing is the output of dcmqrscp(V3.6.0).

D: setting network receive timeout to 60 seconds
W: cannot set network receive timeout to 60 seconds
D: PDU Type: Associate Request, PDU Length: 24826 + 6 bytes PDU header
D: Only dumping 512 bytes.
D: 01 00 00 00 60 fa 00 01 00 00 43 4f 4d 4d 4f 4e
D: 20 20 20 20 20 20 20 20 20 20 4d 45 20 20 20 20
D: 20 20 20 20 20 20 20 20 20 20 00 00 00 00 00 00
D: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D: 00 00 00 00 00 00 00 00 00 00 10 00 00 15 31 2e
D: 32 2e 38 34 30 2e 31 30 30 30 38 2e 33 2e 31 2e
D: 31 2e 31 20 00 01 1a 01 00 ff 00 30 00 00 1b 31
D: 2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 35 2e 31
D: 2e 34 2e 31 2e 32 2e 32 2e 33 40 00 00 13 31 2e
D: 32 2e 38 34 30 2e 31 30 30 30 38 2e 31 2e 32 2e
D: 31 40 00 00 11 31 2e 32 2e 38 34 30 2e 31 30 30
D: 30 38 2e 31 2e 32 40 00 00 13 31 2e 32 2e 38 34
D: 30 2e 31 30 30 30 38 2e 31 2e 32 2e 32 40 00 00
D: 16 31 2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 31
D: 2e 32 2e 34 2e 39 30 40 00 00 16 31 2e 32 2e 38
D: 34 30 2e 31 30 30 30 38 2e 31 2e 32 2e 34 2e 39
D: 31 40 00 00 16 31 2e 32 2e 38 34 30 2e 31 30 30
D: 30 38 2e 31 2e 32 2e 34 2e 37 30 40 00 00 16 31
D: 2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 31 2e 32
D: 2e 34 2e 35 30 40 00 00 16 31 2e 32 2e 38 34 30
D: 2e 31 30 30 30 38 2e 31 2e 32 2e 34 2e 35 31 40
D: 00 00 13 31 2e 32 2e 38 34 30 2e 31 30 30 30 38
D: 2e 31 2e 32 2e 35 40 00 00 17 31 2e 32 2e 38 34
D: 30 2e 31 30 30 30 38 2e 31 2e 32 2e 34 2e 31 30
D: 30 20 00 01 1c 03 00 ff 00 30 00 00 1d 31 2e 32
D: 2e 38 34 30 2e 31 30 30 30 38 2e 35 2e 31 2e 34
D: 2e 31 2e 31 2e 39 2e 31 2e 33 40 00 00 13 31 2e
D: 32 2e 38 34 30 2e 31 30 30 30 38 2e 31 2e 32 2e
D: 31 40 00 00 11 31 2e 32 2e 38 34 30 2e 31 30 30
D: 30 38 2e 31 2e 32 40 00 00 13 31 2e 32 2e 38 34
D: 30 2e 31 30 30 30 38 2e 31 2e 32 2e 32 40 00 00
D: 16 31 2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 31
D:
D: Parsing an A-ASSOCIATE PDU
I: Association Received (192.168.1.193:ME -> COMMON) Mon Jul 25 11:04:10 2011
I:
D: Parameters:
D: ====================== BEGIN A-ASSOCIATE-RQ =====================
D: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.0
D: Our Implementation Version Name: OFFIS_DCMTK_360
D: Their Implementation Class UID: 1.2.276.0.7230010.3.0.3.5.4
D: Their Implementation Version Name: OFFIS_DCMTK_354
D: Application Context Name: 1.2.840.10008.3.1.1.1
D: Calling Application Name: ME
D: Called Application Name: COMMON
D: Responding Application Name:
D: Our Max PDU Receive Size: 16384
D: Their Max PDU Receive Size: 16384
D: Presentation Contexts:
D: Context ID: 1 (Proposed)
D: Abstract Syntax: =GETStudyRootQueryRetrieveInformationModel
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianExplicit
D: =LittleEndianImplicit
D: =BigEndianExplicit
D: =JPEG2000LosslessOnly
D: =JPEG2000
D: =JPEGLossless:Non-hierarchical-1stOrderPrediction
D: =JPEGBaseline
D: =JPEGExtended:Process2+4
D: =RLELossless
D: =MPEG2MainProfile@MainLevel
D: ...
D: Context ID: 71 (Proposed)
D: Abstract Syntax: =MRImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianExplicit
D: =LittleEndianImplicit
D: =BigEndianExplicit
D: =JPEG2000LosslessOnly
D: =JPEG2000
D: =JPEGLossless:Non-hierarchical-1stOrderPrediction
D: =JPEGBaseline
D: =JPEGExtended:Process2+4
D: =RLELossless
D: =MPEG2MainProfile@MainLevel
D: Context ID: 73 (Proposed)
D: Abstract Syntax: =MRSpectroscopyStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianExplicit
D: =LittleEndianImplicit
D: =BigEndianExplicit
D: =JPEG2000LosslessOnly
D: =JPEG2000
D: =JPEGLossless:Non-hierarchical-1stOrderPrediction
D: =JPEGBaseline
D: =JPEGExtended:Process2+4
D: =RLELossless
D: =MPEG2MainProfile@MainLevel
D: ...
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation: none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response: none
D: ======================= END A-ASSOCIATE-RQ ======================
D: Constructing Associate AC PDU
I: Association Acknowledged (Max Send PDV: 16372)
D: ====================== BEGIN A-ASSOCIATE-AC =====================
D: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.0
D: Our Implementation Version Name: OFFIS_DCMTK_360
D: Their Implementation Class UID: 1.2.276.0.7230010.3.0.3.5.4
D: Their Implementation Version Name: OFFIS_DCMTK_354
D: Application Context Name: 1.2.840.10008.3.1.1.1
D: Calling Application Name: ME
D: Called Application Name: COMMON
D: Responding Application Name:
D: Our Max PDU Receive Size: 16384
D: Their Max PDU Receive Size: 16384
D: Presentation Contexts:
D: Context ID: 1 (Accepted)
D: Abstract Syntax: =GETStudyRootQueryRetrieveInformationModel
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianExplicit
D: ...
D: Context ID: 71 (Accepted)
D: Abstract Syntax: =MRImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianExplicit
D: Context ID: 73 (Accepted)
D: Abstract Syntax: =MRSpectroscopyStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianExplicit
D: ...
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation: none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response: none
D: ======================= END A-ASSOCIATE-AC ======================
I: Received Get SCP:
I: ===================== INCOMING DIMSE MESSAGE ====================
I: Message Type : C-GET RQ
I: Message ID : 1
I: Affected SOP Class UID : GETStudyRootQueryRetrieveInformationModel
I: Data Set : present
I: Priority : medium
I: ======================= END DIMSE MESSAGE =======================
I: Get SCP Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0052) CS [STUDY] # 6, 1 QueryRetrieveLevel
I: (0020,000d) UI [1.2.840.113619.2.25.1.1762157631.873231325.140] # 46, 1 StudyInstanceUID
I:
E: Get SCP: storeSCU: [file: /data/db/COMMON/MR_4e28f085fbf57199.dcm] No presentation context with requestor SCP role for: (MR) 1.2.840.10008.5.1.4.1.1.4
E: getSCP: Get Sub-Op Failed: 0006:0208 DIMSE No valid Presentation Context ID
I: Get SCP Response 1 [status: Pending]
E: Get SCP: storeSCU: [file: /data/db/COMMON/MR_4e28f54d7ecd5e5a.dcm] No presentation context with requestor SCP role for: (MR) 1.2.840.10008.5.1.4.1.1.4
E: getSCP: Get Sub-Op Failed: 0006:0208 DIMSE No valid Presentation Context ID
I: Get SCP Response 2 [status: Pending]
I: Get SCP Response 3 [status: Refused: OutOfResourcesSubOperations]
I: Association Release
I: Cleaned up after child (1085) Mon Jul 25 11:04:11 2011
I:

omarelgazzar
Posts: 101
Joined: Wed, 2009-07-08, 16:06
Location: Oldenburg, Germany

#3 Post by omarelgazzar » Mon, 2011-07-25, 08:34

The default role means that the association requestor is the SCU and the association acceptor is the SCP. For a successful C-Get operation, the c-store operations must reverse the roles. So, your getscu should propose SCP role for MR image storage. If you are using the last snapshot, you will find the function addPresentationContext() in DCMSCU class that takes the role of the SOP class as a parameter.

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#4 Post by Xiao » Tue, 2011-07-26, 05:08

Thank you for your update. There is no role field for A-ASSOCIATE-RQ PDU/A-ASSOCIATE-AC PDU in PS 3.8. What does dcmtk check it against ?

omarelgazzar
Posts: 101
Joined: Wed, 2009-07-08, 16:06
Location: Oldenburg, Germany

#5 Post by omarelgazzar » Tue, 2011-07-26, 08:48

Xiao wrote:Thank you for your update. There is no role field for A-ASSOCIATE-RQ PDU/A-ASSOCIATE-AC PDU in PS 3.8. What does dcmtk check it against ?
You can find explanation for role selection negotiation in PS 3.7 D.3.3.4. For C-Get operation look at PS 3.4.

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#6 Post by Xiao » Tue, 2011-07-26, 09:47

Thank you for your help!
I modifed getscu.cc, like the following, still not work, could you give me some further hints ?

/*
** Network initialization structure.
** Is a wrapper for DUL functionality.
T_ASC_NetworkRole role = NET_ACCEPTORREQUESTOR;//(opt_retrievePort > 0) ? NET_ACCEPTORREQUESTOR : NET_REQUESTOR;
OFCondition cond = ASC_initializeNetwork(role, OFstatic_cast(int, opt_retrievePort), opt_acse_timeout, &net);

omarelgazzar
Posts: 101
Joined: Wed, 2009-07-08, 16:06
Location: Oldenburg, Germany

#7 Post by omarelgazzar » Tue, 2011-07-26, 10:27

This is not the correct parameter place to select SCP role for association negotiation. Role selection is specified during association negotiation not in the initialization of the network. You need to add it to the function ASC_addPresentationContext
OFCondition
ASC_addPresentationContext(
T_ASC_Parameters * params,
T_ASC_PresentationContextID presentationContextID,
const char* abstractSyntax,
const char* transferSyntaxList[],
int transferSyntaxListCount,
T_ASC_SC_ROLE ´= ASC_SC_ROLE_DEFAULT);
By default the role is SCU for the association requestor. But for C-GET, your proposed role in this case should be ASC_SC_ROLE_SCP for each of the storage SOP classes you wish to get.

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#8 Post by Xiao » Tue, 2011-07-26, 10:50

It works, thank you very much!

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#9 Post by Xiao » Wed, 2011-07-27, 05:35

I have modified dimget.cc, and generate getscu.cc, if you would like the modification to be integrated into the dcmtk package, I will send you the code.(too big to post it here)

omarelgazzar
Posts: 101
Joined: Wed, 2009-07-08, 16:06
Location: Oldenburg, Germany

#10 Post by omarelgazzar » Wed, 2011-07-27, 07:05

Thanks for your contribution. If you like send the files to dicom/at/offis/dot/de. However, I cannot promise that this will be integrated into the dcmtk package but this is definitely could be useful for other users.

manoindia2020
Posts: 28
Joined: Tue, 2011-06-28, 13:36
Location: Chennai
Contact:

C-GET

#11 Post by manoindia2020 » Wed, 2011-08-24, 20:10

Xiao wrote:I have modified dimget.cc, and generate getscu.cc, if you would like the modification to be integrated into the dcmtk package, I will send you the code.(too big to post it here)
Can u please send the code to this mail id.(manoindia2020@gmail.com) I am seriously searching for a source to implement C-GET method.
with regards
Manoj Kumar D

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

#12 Post by Michael Onken » Thu, 2011-08-25, 08:41

Hi,

wait for a few days and you will get a tool called cgetscu or getscu that will work as movescu but use C-GET. I added corresponding functionality to the DcmSCU class and will publish that within the next days to the public DCMTK.

Best regards,
Michael

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

#13 Post by Michael Onken » Thu, 2011-08-25, 16:59

Hi,

everyhting you need for doing C-GET as a client including a ready-to-use tool is now released, see DCMTK's public git repository. This is the main commit followed by some enhancements made by Jörg.

Best regards,
Michael

manoindia2020
Posts: 28
Joined: Tue, 2011-06-28, 13:36
Location: Chennai
Contact:

getscu.cc sample command-line arguments

#14 Post by manoindia2020 » Thu, 2011-08-25, 22:52

Hi,
I have integrated the getscu in my application and tried to call the getscu using

getscu 11112 www.dicomserver.co.uk Querydicom.dcm

but the app crashes. I will try to fix by my side. Meanwhile Can I get sample arguments and how the files will be saved in disk?
with regards
Manoj Kumar D

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

#15 Post by Michael Onken » Fri, 2011-08-26, 12:09

Hi,

It crashes? Thats bad :-) Sure it's not your app? What is your exact call and what is inside your query file?

Best regards,
Michael

Edit: Works for me:

cgetscu dicomserver.co.uk 104 -P query.dcm -v

I: Requesting Association
I: Association Accepted (Max Send PDV: 65524)
I: Send C-GET Request
I: Received C-STORE Request
I: Sending C-STORE Response
I: Received C-GET Response
I: Received C-STORE Request
I: Sending C-STORE Response
I: Received C-GET Response
I: Received C-STORE Request
I: Sending C-STORE Response
I: Received C-GET Response
I: Received C-STORE Request
I: Sending C-STORE Response
I: Received C-GET Response
I: Received C-STORE Request
I: Sending C-STORE Response
I: Received C-GET Response
I: Received C-STORE Request
I: Sending C-STORE Response
I: Received C-GET Response
I: Received C-GET Response
I: Final status reports from last C-GET message:
I: Number of Remaining Suboperations: 0
I: Number of Completed Suboperations: 6
I: Number of Failed Suboperations : 0
I: Number of Warning Suboperations : 0
I: Releasing Association
I: Releasing Association

with query.dcm consisting of
# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0008,0052) CS [PATIENT] # 8, 1 QueryRetrieveLevel
(0010,0020) LO [fff] # 4, 1 PatientID

Post Reply

Who is online

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