From 28a238696c79390137c0bec2242d5de7ee4c4123 Mon Sep 17 00:00:00 2001 From: Tobias Block Date: Thu, 24 Feb 2022 22:37:25 +0000 Subject: [PATCH] Added configuration option to enable acceptance of all DICOM transfer syntaxes --- common/config.py | 1 + common/types.py | 1 + configuration/default_mercure.json | 1 + receiver.sh | 10 +++++++++- webinterface/templates/configuration.html | 20 ++++++++++++++------ 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/common/config.py b/common/config.py index cb93dc4a..f5b4c88a 100755 --- a/common/config.py +++ b/common/config.py @@ -32,6 +32,7 @@ mercure_defaults = { "appliance_name": "master", "port": 11112, + "accept_compressed_images": "False", "incoming_folder": "/opt/mercure/data/incoming", "studies_folder": "/opt/mercure/data/studies", "outgoing_folder": "/opt/mercure/data/outgoing", diff --git a/common/types.py b/common/types.py index 9de38cdd..3440daff 100755 --- a/common/types.py +++ b/common/types.py @@ -90,6 +90,7 @@ class Rule(BaseModel, Compat): class Config(BaseModel, Compat): appliance_name: str port: int + accept_compressed_images: str incoming_folder: str studies_folder: str outgoing_folder: str diff --git a/configuration/default_mercure.json b/configuration/default_mercure.json index f588a534..db8700bf 100755 --- a/configuration/default_mercure.json +++ b/configuration/default_mercure.json @@ -1,6 +1,7 @@ { "appliance_name" : "master", "port" : 11112, + "accept_compressed_images" : "False", "incoming_folder" : "/opt/mercure/data/incoming", "studies_folder" : "/opt/mercure/data/studies", "outgoing_folder" : "/opt/mercure/data/outgoing", diff --git a/receiver.sh b/receiver.sh index 469ca72f..f008d15a 100755 --- a/receiver.sh +++ b/receiver.sh @@ -28,6 +28,7 @@ fi incoming=$(cat $config | jq -r '.incoming_folder') port=$(cat $config | jq '.port') bookkeeper=$(cat $config | jq -r '.bookkeeper') +accept_compressed=$(cat $config | jq -r '.accept_compressed_images') # Check if incoming folder exists if [ ! -d "$incoming" ]; then @@ -65,6 +66,13 @@ else bookkeeper=" $bookkeeper" fi +transfer_syntax_option="" +if [ $accept_compressed = "True" ] +then + echo "NOTE: Accepting all supported transfer syntaxes" + transfer_syntax_option="+xa" +fi + echo "" echo "Starting receiver process on port $port, folder $incoming, bookeeper $bookkeeper" -storescp --fork --promiscuous -od "$incoming" +uf -xcr "$binary $incoming/#f #a #c$bookkeeper" $port +storescp --fork --promiscuous $transfer_syntax_option -od "$incoming" +uf -xcr "$binary $incoming/#f #a #c$bookkeeper" $port diff --git a/webinterface/templates/configuration.html b/webinterface/templates/configuration.html index fbe6e967..f0b4ef88 100755 --- a/webinterface/templates/configuration.html +++ b/webinterface/templates/configuration.html @@ -16,7 +16,7 @@

Configuration

  General
- + @@ -37,6 +37,14 @@
DICOM Port:
+ + + +
Operating System: {{os_string}}{{config['port']}}
Accept Compressed Images:{{config['accept_compressed_images']}} + {% if config['accept_compressed_images']=='True' %} + + {% endif %} +
@@ -45,7 +53,7 @@
  Error Handling
- + @@ -62,7 +70,7 @@
  Monitoring
Retry Delay: {{config['retry_delay']}} sec
- + @@ -83,7 +91,7 @@
  Off-Peak Hours
Bookkeeper: {{config['bookkeeper']}}
- + @@ -100,7 +108,7 @@
&n
  Thresholds
From: {{config['offpeak_start']}}
- + @@ -137,7 +145,7 @@
  Folders
Series Completion: {{config['series_complete_trigger']}} sec
- +
Incoming: {{config['incoming_folder']}}