pydicom / deid

best effort anonymization for medical images using python
https://pydicom.github.io/deid/
MIT License
138 stars 43 forks source link

Add possibility to clean PyDicom objects #223

Closed RobinFrcd closed 1 year ago

RobinFrcd commented 1 year ago

Description

The point of this PR is to add the possibility to work on PyDicom objects directly, in order to speed up the process. It indeed avoids reading the dicom file from disk twice.

Extracting the clean_pixel_data function out of the DicomCleaner class also helps when we want to process multiple images in multiple processes without having to instance multiple DicomCleaner times (which is slow because it needs to load the recipe from disk).

Checklist

RobinFrcd commented 1 year ago

@vsoch I think we're good :+1:

vsoch commented 1 year ago

I do too! I'm in the middle of a work day so likely I'll do one final look, merge and release this evening. Stay tuned!

vsoch commented 1 year ago

Snuck it in :) https://pypi.org/project/deid/0.2.34/ Thank you @RobinFrcd !