Compressed uploader and custom routing options

38 views
Skip to first unread message

André H.

unread,
Jul 8, 2022, 6:03:38 AM7/8/22
to xnat_discussion
Hello everyone,

I tried to upload data with the compressed uploader. As the session ID, XNAT finds an entry in the Patient ID DICOM tag. This is an issue for me, so I tried using the custom routing options. There I tried: "(0008,103E):\w+" and "(0008,103E):CT - Transaxials". The files that I tried to upload have an entry in (0008,103E) being "CT - Transaxials". According to the documentation, I would expect a session being created with the name "CT - Transaxials", but it still uses the Patient ID. Does the compressed uploader not support custom routing options?

Kind Regards,
André

[I am using XNAT 1.8.4.1 if that matters]

Charlie Moore

unread,
Jul 8, 2022, 11:59:36 AM7/8/22
to xnat_discussion
Hi André,

The compressed uploader supports custom routing. Neither (0008,103E):\w+ or (0008,103E):(\w+) work for me for routing with some data modified to match yours. I'm not super adept with regex, but I believe the issue is "\w" only matches "word characters", meaning alphanumeric or underscore. So, your regex is saying "one or more word characters". However, that doesn't match "CT - Transaxials", since those spaces are not word characters. If I try this routing string: (0008,103E):(.*) , then I do end up with the session label I would expect of "CT_-_Transaxials". A final word of caution: doing session routing based on (0008,103E) is a bit dangerous, as it's not something that would work in the general case, although it may be OK for your workflow. That field is at the series level, so frequently it will differ between every series in a study. For session routing, you want a field that is consistent for every series in your study (and for every instance in every series). Hope that helps.

Thanks,
Charlie Moore

André H.

unread,
Jul 15, 2022, 3:30:15 AM7/15/22
to xnat_discussion
Hi Charlie,

thank you, your suggestion worked like a charm. Interestingly I tried "(0008,103E):.*" (no brackets) before, and it does not work, I guess it's just a regex specification that I missed. I am new to regex. The specification for (0008,103E) is just a temporary test for me that works for my current project, but thank you for warning me.

Thanks again,
André

André H.

unread,
Jul 15, 2022, 4:44:18 AM7/15/22
to xnat_discussion
Now, I have a different Issue: When I upload 2 sessions by using the compressed uploader twice with 2 different zip files for 2 different CT Scans, everything works as expected. But if a put these 2 zip files in another parent zip file, the session defaults to the Patient ID again and XNAT puts both scans into a single session. The data has the same Study Instance UID. Any idea why this happens?

Charlie Moore

unread,
Jul 15, 2022, 10:26:24 AM7/15/22
to xnat_discussion
Hi André,

That happens because the compressed uploader only supports 1 study at a time. It's trying to interpret both of your studies as 1 study, and the custom routing probably doesn't agree between the two studies (it shouldn't!), so it's falling back to what does agree: patient ID.

Thanks,
Charlie Moore

André H.

unread,
Jul 28, 2022, 10:59:45 AM7/28/22
to xnat_discussion
Hi Charlie,

of course, that makes sense. Thank you again for your help.
Reply all
Reply to author
Forward
0 new messages