pydicom / deid

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

Function return types need handling #116

Open vsoch opened 4 years ago

vsoch commented 4 years ago

As discussed in https://github.com/pydicom/deid/pull/113#pullrequestreview-370586965, currently it's possible to provide a function that returns the wrong return type for a variable. This will trigger an error, and likely it should be better handled. Here are some examples from @wetzelj:

- PatientID is defined as DICOM datatype LO (Long String) - custom function returns an integer
- CTDIvol is defined as DICOM datatype FD (Floating Point Double) - custom function returns string

We'd want to better check / handle this, along with adding tests for it.

vsoch commented 4 years ago

I think we would still need to add this check (quick glance I don't see it).