US DICOM anonymisation (incl. burned-in pixel clean up)#635
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #635 +/- ##
==========================================
+ Coverage 87.79% 88.50% +0.71%
==========================================
Files 78 79 +1
Lines 3735 3776 +41
==========================================
+ Hits 3279 3342 +63
+ Misses 456 434 -22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Unsure of what to do for |
|
@stefpiatek – see CI error here. I need to add deid to PIXL's packages, however PIXL sets its pydicom version to 2.4.5, whereas deid requires pydicom>=3.0.0,<4.0.0. It looks like this applies across all of the PIXL modules (core, export, imaging, etc.). Can update the various pyproject.toml files across the software, but that seems like quite a bulk significant change. Thoughts? PS: I've got a local validation error to do with PixlConfig which is making the tests very angry, but let's start with the above. |
Yeah let's go for an upgrade of pydicom, tests should give enough coverage to know if that'll cause issues. Let me know if it needs to update the DICOM validation library with that change as well. IIRC if that updates we need to work out the new way to pre-download the validation schema |
Note: deid v0.3.25 is not latest, but compatible with pydicom v2.4.5
|
@stefpiatek – ready for review. I haven't thrown lots of DICOMs at it yet, but be good to get your eyes on this now I think. Also just realised... I'm not sure if the functionality I've implemented us actually integrated into the PIXL workflow. Think I might've made a function and test, but suspect it's not linked in? |
|
Tested |
stefpiatek
left a comment
There was a problem hiding this comment.
Nice! Thanks Tom, couple of suggestions to keep it clean and as simple as possible. Did you want to make those changes and then we test out on some live data?
- Adds _clean_dicom_image_pixels() to anonymise_dicom() - Adds check so anonymisation continues if recipe within scheme - Updates unit test to call anonymise_dicom() so better reflects production workflow - Note: pytest_pixl.dicom.generate_dicom_dataset now outputs FileDataset, for compatibility with deid package
nb: setuptools<82 for deid compatibility
|
@stefpiatek – thanks for the review; resolved your requests. |
stefpiatek
left a comment
There was a problem hiding this comment.
Nice, thanks Tom. Had to do some tweaks to avoid compiling on the GAE but tested out in orthanc and there's de-identified ultrasounds 🎉
Description
Example of before (left) and after pixel cleaning (using pydicom-data US test dataset):
Type of change
Please delete options accordingly to the description.
Suggested Checklist
mainbranch.squash and merge