Closed tomaroberts closed 2 years ago
Moving these 2 lines to the tasks.py solves issues for the majority of tasks/tests and output is generated correctly.
Issue with the current version is that the data
variable provided to the task scripts is correctly a list, but the list elements are just flat string of the filename rather than a loaded DICOM dataset that Hazen expects.
Inputs and outputs for all Hazen tasks should be standardised so that all tasks can be performed with the same calling command (around line 35 in tasks.py) result = task.main(data=dcms)
. However, it is not currently the case.
Most tasks take a list of DICOMs, but eg relaxometry expects an input called dcm_target_list
rather than data
snr and ghosting output a single value rather than a dictionary of measurement: value
.
Some can be fixed without much interference with the existing code.
Some tasks expect a specific number of DICOMS, snr wants 2 and slice_position expects 60, which is currently not possible. Maybe tasks can be selected first, with some description displayed and images are uploaded specifically for a task to be run on.
Closed by #31.
Currently, the Tasks do not work when performed on an uploaded dataset. An exception occurs:
I eventually located the problem – the problem is a path/data loading issue to do with some hazenlib changes since Haris' created the hazen-web-app. The following code hack to the
hazenlib
code fixes the problem forslice_width.py
, but the same principle applies to all the tasks.Todo: implement a fix that works for all of the tasks.