Anonymization Script in Project Leve

16 views
Skip to first unread message

Sarah Hong

unread,
Nov 16, 2021, 7:46:33 PM11/16/21
to xnat_discussion
Dear XNAT Group,

I use XNAT 1.8.2.2.
I would like to change session name for certain project, so I marked "enable Script" and wrote anonymization script under the project as shown below:

(0008,1030) := project
(0010,0010) := subject
(0010,0020) := session
studyDate := (0008,0020)
session := makeSessionLabel[format["{0}_{1}", subject, studyDate]]

and it does not seem to be working, so I tried 
 
(0008,1030) := project
(0010,0010) := subject
(0010,0020) := session
session := makeSessionLabel[format["{0}_{1}", subject, (0008,0020)]]

However, none seems to be working, but I'm not sure what I did wrong.
Please advise if you have any idea. Thank you.

Best,

Moore, Charlie

unread,
Nov 17, 2021, 11:26:16 AM11/17/21
to xnat_di...@googlegroups.com
Hello,

By "change session name", do you mean you want incoming DICOM data to be assigned a different session label when being received? If so, that is not something you can use the anonymization scripts for. I discussed in a bit more detail why that is in this thread (https://groups.google.com/g/xnat_discussion/c/_w8eybtu5jI/m/T-kNhB2IDQAJ). Making a custom DICOM object identifier (assuming the data is arriving via C-STORE) to assign the session label is probably your best bet here.

Thanks,
Charlie

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Sarah Hong <sarah...@gmail.com>
Sent: Tuesday, November 16, 2021 6:46 PM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Anonymization Script in Project Leve
 

* External Email - Caution *

--
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/e8b96a50-4c01-443e-852c-fcf69ff824d2n%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Sarah Hong

unread,
Dec 2, 2021, 4:37:48 PM12/2/21
to xnat_discussion
Thank you for your explanation, Moore!

Do you think it is possible to add two tags for session ID using Custom DICOM Routing? 
I have checked a few documentation related to DICOM Routing, but it seems like they offer some minor adjustment such as replacing certain letters, but I wonder if it can also perform such thing as assigning session using two tags. 
Unfortunately, our project does not use C-STORE at this moment, so I am looking for if there is any other way besides manually changing sessionID.

Thank you!

Best regards,

Moore, Charlie

unread,
Dec 2, 2021, 4:54:56 PM12/2/21
to xnat_di...@googlegroups.com
Hello there,

I suggested a custom DICOM object identifier because there are two facets in which the custom DICOM routing feature won't work for you (assuming I'm understanding you correctly):
  1. Custom session label routing can only use 1 DICOM element, but you need a function of 2 DICOM elements generating 1 label.
  2. Custom session label routing is only applicable sitewide, so you can't just use it for "certain project[s]".
Expanding the capability of the custom routing to support a composite of n DICOM elements is something we're interested in doing, but it's not on the roadmap. Unfortunately, DICOM object identifiers only apply to data coming in on an SCP receiver, so that wouldn't actually work for you either. As an ugly workaround, could you script computing the session label from the elements you want for you data and store it in an unused tag (preferably a private one)? You could then use the custom session labeling to pull from that element if available.

Thanks,
Charlie

Sent: Thursday, December 2, 2021 3:37 PM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: Re: [XNAT Discussion] Anonymization Script in Project Leve
 

Sarah Hong

unread,
Dec 2, 2021, 5:08:31 PM12/2/21
to xnat_discussion
I understand. I will try that. Thank you so much for kind explanation, Moore!

Best regards,
Reply all
Reply to author
Forward
0 new messages