GSTT-CSC / hazen

Quality assurance framework for Magnetic Resonance Imaging
https://github.com/GSTT-CSC/hazen
Apache License 2.0
22 stars 12 forks source link

Object orientated hazenlib #253

Closed laurencejackson closed 2 years ago

laurencejackson commented 2 years ago

This PR converts all the core tasks used by GSTT MRI physics into classes to facilitate integration with the hazen webapp.

All tasks inherit from HazenTask, take a list of paths to dicoms as input, have a run method for processing data, and return the results as a dictionary defined by tags in the dicom input.

github-actions[bot] commented 2 years ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
hazenlib
   HazenTask.py21386%25–27
   init.py1453675%137, 141, 151, 156, 193, 200–205, 216, 219–226, 246–248, 266–268, 287–289, 298, 303, 309, 339, 362, 382–383, 387
   acr_uniformity.py923958%91–107, 114–143, 147
   relaxometry.py3179072%238–256, 630, 689–691, 745, 793–815, 833–848, 1173–1176, 1185–1188, 1200–1213, 1216–1221, 1233–1263
   shapes.py20955%13, 16, 24–29, 32
   snr_map.py108595%403, 408–410, 440
   tools.py82693%43–50, 89
hazenlib/tasks
   ghosting.py1474867%18–29, 44, 106–107, 111, 121–122, 148–150, 167–169, 215–248
   relaxometry.py7271%10–11
   slice_position.py1151983%31, 40–41, 101–102, 128, 208, 215–228
   slice_width.py3544886%33–36, 106, 165–183, 448, 453–454, 460, 465, 527–528, 777–816
   snr.py1574273%59–64, 218–228, 270–274, 311–322, 327–335, 364–375
   spatial_resolution.py2918870%35–38, 60–118, 131, 216, 252–259, 284, 410–444
   uniformity.py741777%42–45, 89–90, 97, 131–143
TOTAL196745277% 

Tests Skipped Failures Errors Time
176 0 :zzz: 0 :x: 0 :fire: 2m 36s :stopwatch:
laurencejackson commented 2 years ago

@tomaroberts ready for review.

laurencejackson commented 2 years ago

To install in your venv pip install git+https://github.com/GSTT-CSC/hazen@object-orientated-hazenlib#egg=hazen

The line we'll add to the webapp requirements.txt (until this branch becomes main when relaxometry snr_map etc are converted) pip install git+https://github.com/GSTT-CSC/hazen@webapp-core-tasks#egg=hazen