Is it possible to cancel a C-Move initiated with /modalities/:modality/move on the DICOM level?

Hi,

the synchronous Orthanc endpoint /modalities/:modality/move is a great way to initiate a low level C-MOVE.

However, if I abort the request midway, I noticed the C-MOVE will not be canceled, resulting in some useless network traffic.
Is it possible to send a C-MOVE-CANCEL message somehow to a remote modality using Orthanc (as per http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.2.2.html)?

Thanks!

Best Regards,
Georg

No, it’s currently not possible to cancel a C-MOVE.

Thanks for clarifying. Is the feature on the roadmap or would the Orthanc developers be open to a contribution? If so, where would I have to start to look in the Orthanc source code if I wanted to contribute the feature?

Thanks,
Georg

Ofcourse yes. You can read as many bytes as you wants then send A-abort.

Hello,

The C-MOVE-CANCEL command is not supported yet, but you can cancel the underlying job using the REST API of Orthanc (check out the asynchronous mode):
https://book.orthanc-server.com/users/rest.html#performing-retrieve-c-move

https://book.orthanc-server.com/users/advanced-rest.html#jobs

HTH,
Sébastien-

Dear Georg,

Thanks for clarifying. Is the feature on the roadmap or would the Orthanc developers be open to a contribution? If so, where would I have to start to look in the Orthanc source code if I wanted to contribute the feature?

This feature is pending our long-term roadmap, as can be seen in our TODO:
https://bitbucket.org/sjodogne/orthanc/src/default/TODO

No work on this feature is currently planned, except if an industrial sponsor wants to fund the development of this feature.

We are obviously open to contributions, but please make sure to carefully read the FAQ about contributing to the internal code of Orthanc:
https://book.orthanc-server.com/faq/licensing.html#contributed-vs-internal-code

Such a feature is very low-level, and might severely impact Orthanc, so we’ll have to be especially strict before accepting external contributions on this specific topic. That being said, the starting point for this development would consist in introducing a handler for the “DIMSE_C_CANCEL_RQ” enumeration value in the switch-case of the “Orthanc::CommandDispatcher::Step()” method:
https://bitbucket.org/sjodogne/orthanc/src/Orthanc-1.5.7/Core/DicomNetworking/Internals/CommandDispatcher.cpp#lines-623

You would have to introduce support for the structure “T_DIMSE_C_CancelRQ” that is part of the “T_DIMSE_Message” union in the DCMTK networking library:
https://github.com/DCMTK/dcmtk/blob/master/dcmnet/include/dcmtk/dcmnet/dimse.h

I’m looking forward to your contributions!

Sébastien-