pydicom / deid

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

"stop_before_pixels" argument for "get_identifiers" #163

Open allanhummer opened 3 years ago

allanhummer commented 3 years ago

Sometimes image information of the DICOM is not needed when processing the headers (e.g. for grouping multiple measurements of the same patient). Especially when dealing with large quantities of DICOMs, it would be very useful to omit the pixel array to save a lot of memory.

read_file (dcmread), which is used by deid already has a "stop_before_pixels" argument. It would be great to access this directly when using "get_identifiers".

Thanks for providing this helpful toolbox!

vsoch commented 3 years ago

Sure, that sounds easy to do! Here is a PR https://github.com/pydicom/deid/pull/164 for you to test, and I've added some questions I'm interested in your feedback on.