GSTT-CSC / hazen-web-app

Interactive web-based implementation of hazen
Other
0 stars 0 forks source link

Fix interaction between hazenlib and web-app #19

Closed tomaroberts closed 2 years ago

tomaroberts commented 2 years ago

Currently, the Tasks do not work when performed on an uploaded dataset. An exception occurs:

image


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 for slice_width.py, but the same principle applies to all the tasks.

image

Todo: implement a fix that works for all of the tasks.

sophie22 commented 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.

heyhaleema commented 2 years ago

Closed by #31.