Issues with Anonymisation

185 views
Skip to first unread message

Eva Herbst

unread,
Mar 4, 2024, 10:27:27 AM3/4/24
to xnat_discussion
Hi everyone,

The clinic I work with recently set up an XNAT system and I am trying out the anonymisation scripts.

I have been testing the anonymization scripts according to the instructions in the XNAT documentation, but I am running into the issue that the anonymization is not working. The DICOM images are imported but the headers are not changed.

I have tried either overwriting or removing different fields, both with automatic archiving and the prearchive step settings.

I also tested specifying different version numbers, or none at all, at the top of the anonymization script.

Could this problem be due to a mismatch in plugin versions and XNAT versions?

Or does the anonymisation script not depend on a lugin?


Thank you very much,

Eva




Charlie Moore

unread,
Mar 4, 2024, 10:32:31 AM3/4/24
to xnat_discussion
Hi Eva,

The anonymization feature does not depend on any plugins. Could you provide some examples of some of the scripts you were trying where you weren't seeing the changes you expect? Additionally, how were you checking the script being applied? If you're using the "View DICOM Headers" link in the scan preview, some screenshots with any sensitive information removed would be helpful as well.

Thanks,
Charlie Moore

Eva Herbst

unread,
Mar 5, 2024, 3:43:36 AM3/5/24
to xnat_discussion
Thank you so much for your quick reply!
I am at the clinic tomorrow so I can take screenshots.

For now, here is some more info:

I was trying a script as a test to remove the referring physician's name.
The script looked like this
version "6.1" 
(0008,0090) := "ANON"

I also tried a different script where I tried removing that field instead with:
-(0008,0090)

I also tried specifying no version at all.

We also have a test site-wide anonymisation script which looks like this (I think in the future IT will add more fields to remove - I do not have permissions to adjust it).

XNAT_sitewide_anon.png
Just to clarify, can I run site-wide anonymization as well as project anonymization or does this cause a conflict?

To check whether anonymisation worked, I archived the data and then checked the DICOM headers.
I tested both the option  "All image data will be placed into the archive automatically" and using the Prearchive: "" All image data should be placed in a temporary location (prearchive) before being manually transferred into the permanent archive"

Thank you!
Eva

Eva Herbst

unread,
Mar 6, 2024, 11:06:04 AM3/6/24
to xnat_discussion
Hello,

Here is some more info.
I import projects via the .csv importer from our PACS. 
Each patient often has multiple DICOM sets.
I activate the project anonymisation script and load the images in the pre-archive. Here, the project-anonymisation is not applied yet (as is expected).
However, upon archiving and then opening the images and checking the DICOM headers, the anonymisation is still not applied.

We have XNAT version 1.8.8 build 92.

When I say "anonymisation doesn't work", I mean that the tags remain unchanged from their original values when trying to remove them or rename them with a string.

I also tested another script where instead of the referring physician name, I tried to change the institution name, as in one of the examples:

version "6.5"

(0008,0080) := "My Institution"

Today I tested specifying version 6.5 in my code, previously I tried 6.4 or leaving out version altogether (so as in DicomEdit 4).

I read this post about issues with private tags and missing creator tags, which require using the set function. But as far as I understand the institute name is not a private tag, so I don't think that is the issue.

version "6.5"

(0008,0080) := "My Institution"

I am attaching a csv file with the dicom tags in an example MR scan.
I removed all fields, but I thought the tags present could be helpful in troubleshooting.

I also found this post discussing anonymisation issues with the upload assistant.  The proposed solution was using the desktop client rather than the upload assistant.
I use the PACS upload from csv (not the upload assistant) but nonetheless I asked IT to install XNAT desktop to see if that solves the issue - but it seems to be an issue with the compressed 

I am quite stuck at this point but would love to get it to work with XNAT rather than resorting to another anonymisation solution.

Thank you very much,
Eva
example_tags_nodata.csv.xlsx

Will Horton

unread,
Mar 6, 2024, 4:52:45 PM3/6/24
to xnat_discussion
Eva, 
I'm confused by how you're describing your DICOM upload methods. We don't support using the CSV Uploader for anything but tabular subject or experiment data, and anonymization is not applied via that method. In order for DICOM anonymization to be applied on import, you must be using one of the standard import or upload methods: 

* Receiving from PACS via DICOM SCP Receiver
* Uploading compressed DICOM image sessions via the Compressed Image Uploader in the UI
* Uploading uncompressed DICOM image sessions via the XNAT Desktop Client (which you've already said you haven't tried yet) 
* Uploading uncompressed DICOM images sessions via the legacy XNAT Upload Assistant
* Importing via the Import API
* Requesting and importing from a PACS via the DICOM Query Retrieve plugin

The bulk of these methods are documented here: https://wiki.xnat.org/documentation/image-session-upload-methods-in-xnat

The simplest test to ensure that your anon script is working would be to take a single image session, zip it up, and use the Compressed Image Uploader to upload it to a test project with your script activated. 

Regards,
Will 

Eva Herbst

unread,
Mar 7, 2024, 3:53:23 AM3/7/24
to xnat_discussion
Dear Will,

Thank you so much for the quick reply.
When I say importing via .csv, I mean the DICOM Query Retrieve Plugin > Import from PACS > Search via CSV
This should still work with anonymisation, right?

I will try your suggested test with the compressed images the next time I am at the clinic.

Thank you,
Eva

John Flavin

unread,
Mar 7, 2024, 11:19:40 AM3/7/24
to xnat_di...@googlegroups.com
One quick thing I can think to check: Can you verify the settings on the SCP receiver to which you are sending the images? (Administer > Site Administration > DICOM SCP Receivers). Click Edit on the SCP receiver in question. Make sure that Anonymization is Enabled.

John Flavin

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/a6fab7c1-5ead-4e1b-9fe5-fa5ae34fc195n%40googlegroups.com.

Eva Herbst

unread,
Mar 7, 2024, 12:11:12 PM3/7/24
to xnat_discussion
Thank you for the suggestion!
I guess you need admin access for this - our IT person who manages XNAT is back next week, I will ask him.

XNAT is fairly new to him too, hence the issues with anonymisation.

Best,
Eva

Eva Herbst

unread,
Mar 13, 2024, 4:07:09 AM3/13/24
to xnat_discussion
Dear John,

You were right, the anonymisation was not enabled on the admin side. 
I got the administrator to fix it.

We haven't been able to test it yet because XNAT seems to be down.

Thanks!
Eva

Eva Herbst

unread,
Mar 14, 2024, 8:01:44 AM3/14/24
to xnat_discussion
Thanks all for your help, we did some tests and the problem is solved now.

Best,
Eva

Reply all
Reply to author
Forward
0 new messages