Mercure module to decompress DICOM images. It uses the decoding plugins provided in the Pydicom package to decompress the files having different compressed transfer syntaxes.
Follow instructions on mercure website on how to add a new module. Use the docker tag mercureimaging/mercure-decompressor
.
- Clone repo.
- Build Docker container locally by running make (modify makefile with new docker tag as needed).
- Test container :
docker run -it -v /input_data:/input -v /output_data:/output --env MERCURE_IN_DIR=/input --env MERCURE_OUT_DIR=/output mercureimaging/mercure-decompressor
The mercure-decompressor module requires no additional configuration in mercure. A rule should be configured to receive the images with this module as a processing step. More information on mercure rule configuration can be found here.
By default, the decoding plugins for the incoming files will be tried in the below order. If you want to change the order or fix one plugin; settings can be configured in the mercure user interface.
{ "decoding_plugins": ['gdcm', 'pylibjpeg', 'pydicom'] }
If the received series/study has multiple transfer syntaxes, a mapping between tranfer_uid_name -> decoding_plugin_used
would be created and printed in the logs to avoid confusion. The above plugin order can be changed or fixed to one to satisfy the use case.