Cancel C-MOVE following an event?

12 views
Skip to first unread message

Dan Bower

unread,
Aug 11, 2022, 7:35:42 AM8/11/22
to pydicom
Hi all,

I'm experienced with python but new to DICOM and pynetdicom.  I would like to retrieve only the first instance (image) of a series from PACS.  The approach I was thinking is to add a hook to the C_STORE service request (EVT_C_STORE, as per some of the code examples), but the question is whether I can then elegantly cancel the C-MOVE request.  To my knowledge, C-MOVE is less flexible than C-GET in this regard, but unfortunately the PACs system I am working with does not support C-GET.  Alternatively, I could set up C-MOVE (send_c_move) as an independent process using python multiprocessing and then terminate the process once a single file has download.  But again, this seems like an abrupt brute force approach.

Ultimately, I would like C-MOVE to exit cleanly without leaving orphaned or zombie processes running.

Any ideas much appreciated.  Many thanks.

Dan

Dan Bower

unread,
Aug 11, 2022, 7:49:56 AM8/11/22
to pydicom
From looking at the source, it seems valid to use a `send_c_cancel` request in the EVT_C_STORE to cancel the move.  Is there anything I have missed?

Darcy Mason

unread,
Aug 14, 2022, 11:22:15 AM8/14/22
to pydicom
I'd suggest starting a discussion on the pynetdicom repo to see if you can get an answer there.

Dan Bower

unread,
Aug 16, 2022, 11:08:35 AM8/16/22
to pydicom
Thanks, I have done that.
Reply all
Reply to author
Forward
0 new messages