-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Applying whitelist and blacklist filters #33
Comments
hey @BrianKolowitz ! The library is agnostic to the names of the filters, actually. The ones we are using (whitelist, blacklist, greylist) correspond with different actions that we implement. For example:
And when you run the above to replace identifiers with the above, although the criteria for filtering is represented in that deid recipe, the action to replace_identifiers doesn't look at any kind of filtering. You would have already done this and removed the ones you didn't want from your list of So what you want to do then is a workflow that looks like:
Running detect is just handing the file to the cleaner client. This is likely the extent of how you will want to use the cleaner. The output is a datastructure with the result, and detect means we take your deid recipe and parse headers looking for matches to the filters.
Then you could parse that datastructure and deal with the files appropriately, and then the ones that you want to continue processing could go into
If there are coordinates, they are blanked, otherwise no change. This is again reliant on how good your list is. Much better would be an OCR method, which I started but it needs more testing and development, if you are interested --> https://github.com/pydicom/dicom-scraper A full example script is here: If you step through this and want to write up some docs for the (web friendly / readable) version it would be greatly appreciated! I wrote them into that script but didn't pass on the knowledge to the docs yet. Let me know if you have other questions. |
Thanks. Is there a way to accomplish this in one line?
I'd like to specify something like this
so I don't have to be exhaustive in the modalities I list |
Could you write out in (people terms) what you are trying to do - basically "not in Modality CR or DX?" There should be a notequals, so like:
The whole list of filters are:
The stuff on the right side is all regular expressions, so whatever regular expression string you might use is fair game! if there is a filter that you think would be useful to add, let's add it! |
I think it's fine for my current needs, I'm trying to include only CR OR DX. |
Hi, I have a question regarding the filter section of my config and my source code. In my configuration https://github.com/BrianKolowitz/deid/blob/development/my_examples/deid/deid.dicom I specify a whitelist
in my code https://github.com/BrianKolowitz/deid/blob/development/my_examples/dicom/my_deid.py i specify the configuration
but i see images with modalities PR and RG in my output_folder.
Is this a bug or am I not properly using the library?
The text was updated successfully, but these errors were encountered: