Enet4 / dicom-rs

Rust implementation of the DICOM standard
https://dicom-rs.github.io
Apache License 2.0
416 stars 81 forks source link

Handle C-ECHO request in storeSCP CLI tool #338

Closed PierreBou91 closed 1 year ago

PierreBou91 commented 1 year ago

This commit adds support for handling C-ECHO requests in the storeSCP CLI tool. With this update, the storeSCP tool can now process incoming C-ECHO requests and send appropriate responses.

Related to issue #337

Before screenshot: before

After screenshots: after

It appears that the main functionality of the storescp is maintained: send

All test passed after cargo test

The changes in transfer.rs were relevant to:

  1. Remove duplicates SOPClasses.
  2. Add the Verification SOP Class necessary for the presentation context.

Please tell me if any additions / modification / deletion are needed.

PierreBou91 commented 1 year ago

I forgot to fmt, apologies for that.

Thanks for the suggestion regarding the switch to InMemDicomObject::from_element_iter, I also made the modification for create_cstore_response as I felt like it was the same scenario.

PierreBou91 commented 1 year ago

I also got rid of the useless array in create_cstore_response so it matches your modifications. The built version seemed to work fine. Thanks for your time and advices @Enet4 !