You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the following JSON file:
{
"(0x0010, 0x0010)": {
"action": "regexp",
"find": ".",
"replace": "ID001^ID002"
},
"(0x0010, 0x0020)": {
"action": "regexp",
"find": ".",
"replace": "ID003"
},
}
In the anonymized DICOM files, the PatientID tag gets set to ID003ID003 (i.e. it is duplicated).
The PatientName tag is similarly duplicated and set to ID001^ID002ID001^ID002
The text was updated successfully, but these errors were encountered:
I suspect that this comes from the regexp. "find": "." is going to take each character of the initial value and replace it with whatever is in replace.
So in my test file, 3860448 is replaced by ID003ID003ID003ID003ID003ID003ID003 (7xID003 because there are 7 characters in 3860448)
I suspect that this comes from the regexp. "find": "." is going to take each character of the initial value and replace it with whatever is in replace. So in my test file, 3860448 is replaced by ID003ID003ID003ID003ID003ID003ID003 (7xID003 because there are 7 characters in 3860448)
What do you intend to do with this regexp ?
Thanks for looking into this. I am just looking to simply replace, the original PatientID with something different. Is there a way to specify this in the JSON file? I don't think "find": "*" worked for me.
In Python code which works fine, I am just using:
def setupPatientID(dataset, tag):
element = dataset.get(tag)
if element is not None:
element.value = args.new_id
I used the following JSON file:
{
"(0x0010, 0x0010)": {
"action": "regexp",
"find": ".",
"replace": "ID001^ID002"
},
"(0x0010, 0x0020)": {
"action": "regexp",
"find": ".",
"replace": "ID003"
},
}
In the anonymized DICOM files, the PatientID tag gets set to ID003ID003 (i.e. it is duplicated).
The PatientName tag is similarly duplicated and set to ID001^ID002ID001^ID002
The text was updated successfully, but these errors were encountered: