We have a research/teaching use case where we'd like to have the users deal with anonymized images, but have our data administrator be able to track those DICOM back to the originals.
Reading through the online documentation, I think one approach I could use would be either the REST API or a backend lua script to run "modify" on series and maintaing a separate (ex. sqlite) database of the map between old and new PatientID. I'd then export the modified series.
If I'm reading the documentation correctly, a big distinction between modify and anonymize is that the modified series will increase disk usage within Orthanc as the modified DICOM files are stored. Anonymize, on the other hand, simply strips (or changes) the relevant DICOM parameters during export. Is that correct?
Does the anonymize API maintain the sort of map I'm describing between the old and new DICOM? (ex. by way of the new UID it generates)? Or is the association lost once the anonymized images leave Orthanc?
I've been evaluating several different open source systems for managing our research DICOM (ex. MIRC/CTP, Kitware MIDAS, dcm4che, etc.) and really like the simplicity and elegance of Orthanc.
Thanks,
John.
That setup has worked for several months until recently when I had to switch from calling "/studies/{ID}/anonymize" to calling on an instance level, "instances/{ID}/anonymize".
My question is, where is the AnonymizedFrom meta stored? Or set for that matter?
Should a call to anonymize at the instance level be setting the AnonymizedFrom field or do I need to do that myself? And if I need to set this meta data, how do I do it?
I should add that because I am running anonymize at the instance level, I am creating new Study, Series and Instance UID manually before calling anonymize and then feeding them to anonymize via the "replace" option. I do not let anonymize generate UID itself. Maybe anonymize ONLY sets AnonymizedFrom when it handles the UID generation? And I've skipped that step by generating UID myself?
I found the routine AnonymizeOrModifyResource in OrthancRestAnonymizeModify and see the code where the metadata is set up to point from anonymized/modified files to original files.
Checking the metadata table in the PostGres database I can see that my newly anonymized/modified Dicom are missing these metadata connections.
Perhaps that data is never updated when anonymizing at the instance level? After all, unlike anonymizing at the Patient/Study/Series levels, which generate new Patient/Study/Series within Orthanc itself and return metadata, a call to /instances/{ID}/anonymize will RETURN the anonymized DICOM itself. This must then be uploaded back into Orthanc, if you want it there.
Is there a way to call anonymize at the instance level and have Orthanc keep a record in the metadata table of the links to the original DICOM?
Similarly, is there a way to have it simply retain the new DICOM, rather than sending it in response.