pydicom / deid

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

Replace tags with VR PN in recipe #219

Closed NirutaDhimal closed 2 years ago

NirutaDhimal commented 2 years ago

Is there a way to replace only the tags with Value Representation "PN" using recipe?

vsoch commented 2 years ago

Not yet, but this will be supported with https://github.com/pydicom/deid/pull/215

vsoch commented 2 years ago

hey @NirutaDhimal ! This was just merged. See this page, https://pydicom.github.io/deid/user-docs/recipe-headers/

Sections -> Header -> Select

and that is the syntax you can use to select VR tags

image

So I think you could do either of the following to blank (replace with nothing) or replace:

BLANK select:VR:PN
REPLACE select:VR:PN <another-thing>

Pinging @jstorrs in case there is further discussion!

NirutaDhimal commented 2 years ago

Thank you. It's working .

vsoch commented 2 years ago

Woohoo! Great to hear - giving a shoutout to @jstorrs that just added this feature (good timing too!) Closing issue.