diff --git a/app/main/templates/_acr_geom.html b/app/main/templates/_acr_geom.html new file mode 100644 index 0000000..8f2c45a --- /dev/null +++ b/app/main/templates/_acr_geom.html @@ -0,0 +1,9 @@ + + {{ measurement|capitalize }} + +{% for nested_key, nested_value in value.items() %} + + {{ nested_key }} + {{ nested_value }} + +{% endfor %} \ No newline at end of file diff --git a/app/main/templates/_acr_slice_position.html b/app/main/templates/_acr_slice_position.html new file mode 100644 index 0000000..06ecada --- /dev/null +++ b/app/main/templates/_acr_slice_position.html @@ -0,0 +1,9 @@ + + {{ measurement }} + +{% for nested_key, nested_value in value.items() %} + + {{ nested_key|capitalize }} + {{ nested_value }} + +{% endfor %} \ No newline at end of file diff --git a/app/main/templates/_acr_snr.html b/app/main/templates/_acr_snr.html new file mode 100644 index 0000000..ae3dde1 --- /dev/null +++ b/app/main/templates/_acr_snr.html @@ -0,0 +1,9 @@ + + {{ measurement|capitalize }} + +{% for key in value %} + + {{ key|capitalize }} + {{ value.get(key) }} + +{% endfor %} \ No newline at end of file diff --git a/app/main/templates/_magnet_slice_width.html b/app/main/templates/_magnet_slice_width.html new file mode 100644 index 0000000..41cf6ae --- /dev/null +++ b/app/main/templates/_magnet_slice_width.html @@ -0,0 +1,24 @@ +{% if value is mapping %} + + {{ measurement|capitalize }} + + {% for nested_key, nested_value in value.items() %} + + {{ nested_key|capitalize }} + {{ nested_value }} + + {% endfor %} +{% elif value is iterable %} + {% if value|length > 1 %} + + {{ measurement|capitalize }} + {{ value[0] }}, {{ value[1] }}, {{ value[2] }} + + {% endif %} +{% else %} + + {{ measurement|capitalize }} + {{ value }} + +{% endif %} + diff --git a/app/main/templates/_magnet_snr.html b/app/main/templates/_magnet_snr.html new file mode 100644 index 0000000..91779a3 --- /dev/null +++ b/app/main/templates/_magnet_snr.html @@ -0,0 +1,20 @@ +{% if value is mapping %} + + {{ measurement.split(' ')[0] | upper }} {{ measurement.split(' ', 1)[1] }} + + {% for nested_key, nested_value in value.items() %} + {% if nested_value is mapping %} + {% for nested_nested_key, nested_nested_value in nested_value.items() %} + + {{ nested_nested_key|capitalize }} ({{ nested_key }}) + {{ nested_nested_value }} + + {% endfor %} + {% else %} + + {{ nested_key|capitalize }} + {{ nested_value }} + + {% endif %} + {% endfor %} +{% endif %} \ No newline at end of file diff --git a/app/main/templates/series_view.html b/app/main/templates/series_view.html index 3218be6..16c61ef 100644 --- a/app/main/templates/series_view.html +++ b/app/main/templates/series_view.html @@ -84,17 +84,29 @@

- + {% for measurement, value in data.measurement.items() %} - - - - + {% if task == 'acr_geometric_accuracy' %} + {% include '_acr_geom.html' %} + {% elif task == 'acr_snr' %} + {% include '_acr_snr.html' %} + {% elif task == 'acr_slice_position' %} + {% include '_acr_slice_position.html' %} + {% elif task == 'slice_width' %} + {% include '_magnet_slice_width.html' %} + {% elif task == 'snr' %} + {% include '_magnet_snr.html' %} + {% else %} + + + + + {% endif %} {% endfor %}
MeasurementMeasurement Value
{{ measurement }}{{ value }}
{{ measurement|capitalize }}{{ value }}