Hello Cristiano,
The behavior you’re seeing is what I would expect. There may be ways to work around it, but I’m having difficulty understanding what the end goal is here, so can you please clarify more specifically what you’re trying to do? It sounds like you already have an RTSTRUCT file exported from the OHIF viewer to your session, so I’m confused on the purpose of trying to upload it again to XNAT.
Thanks,
Charlie
--
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/ae5b930d-18e4-44c4-aba4-7f42c4f3f0c7%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.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/ae5b930d-18e4-44c4-aba4-7f42c4f3f0c7%40googlegroups.com.
Cristiano,
That sounds like a very exciting and ground-breaking project! I think I was the one too vague here as I really meant the goal of uploading an RTSTRUCT file to XNAT when it already exists. Unfortunately, the complete answer to the question of how to upload an RTSTRUCT instance in the general case is rather complex and involved.
How you upload an RTSTRUCT file is largely determined by a few competing factors:
1. Does the study to which the RTSTRUCT file corresponds already exist in XNAT?
2. What do you want to do with the file?
If you upload the file to the prearchive (as you tried), or archive it directly, it will normally need to be accompanied by its corresponding image data. This is a known limitation of XNAT, documented here: https://issues.xnat.org/browse/XNAT-4527 . Essentially, there is a list of “primary” modalities in XNAT where it knows how to construct a session object from the DICOM. Since you’re dealing with RTSTRUCT files, the main modality of your studies is likely MR or CT. Both of those are fine for creating a session, but just RTSTRUCT is not. The prearchive sees a “session” of just RTSTRUCT files (yes, even if the MR or CT already exist in the archive), and errors out. This workflow is fine for the case where the studies have not yet been uploaded to XNAT (i.e. the answer to factor 1 is NO), since you can send the whole session at once. However, it sounds like in your case the sessions already exist in XNAT, and you would want to add RTSTRUCT files to them. It might be possible to send the whole session again, including the RTSTRUCT, with the prearchive option for the project set to the most aggressive option (auto-archive and overwrite files), but this is rather inefficient and a bit hacky. (I’m also not sure it would work)
Now, we need to detour a little bit. RTSTRUCT files are completely valid DICOM series, so XNAT normally includes them as “scans” in your session. So, if you upload a study with 9 MR series and 1 RTSTRUCT series, XNAT will create an MR session with 10 scans (9 MR, and 1 RTSTRUCT). Here, I mean “upload” through one of the standard mechanisms (C-STORE, REST, Upload Application, Compressed Uploader). However, this is *not* how the OHIF-viewer plugin for XNAT works. That plugin has an added datatype for “ROI Collections”. When you use the OHIF viewer (in XNAT) to create a new RTSTRUCT file, the plugin will store the file in a new “ROI Collection” assessor for the session. Likewise, the viewer reads contours/segmentations from ROI Collections and not XNAT scans. So, the question of how to upload it becomes: what’s it for?
If you want it to be a standard XNAT scan (for searching, viewing in the scan table, etc.), the only thing that comes to mind is scripting the upload with REST, or the hack I mentioned earlier. However, this is not sending the file to the prearchive and letting XNAT handle a merge. Instead, this would be explicitly creating a new scan under the pre-existing session and then adding the file as a resource. I don’t know if XNATpy has support for that or not, but it’s not terribly difficult if just accessing the REST API directly.
If you want it to be an ROI collection for viewing in the OHIF viewer, you already found your answer. It’s likely possible to do this only through the REST API, but ICR wrote that ROIUploadAssistant tool for precisely this case (I believe). I haven’t used it myself, but I imagine that tool will be much easier than using the REST API directly. However, it sounds like you’re needing to do this in a scripted way, so hopefully the team from ICR might be able to tell you how that tool works to do a similar thing in XNATpy / REST.
This was a bit of a brain dump, so I hope it makes sense.
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/5c6c312e-dbd9-4dbc-886a-e81e71edfa05%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/5c6c312e-dbd9-4dbc-886a-e81e71edfa05%40googlegroups.com.
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/dd59c896-a9a9-4d4b-b8e7-ee5463f59204%40googlegroups.com.
* External Email - Caution * |