Maybe there is something wrong with the master volume. Try to seg labelmap geometry using an “Annotation ROI” as explained here. If you still have issues the best would be if you could share the RTSTRUCT so that we can investigate.
Moreover it seems like a systematic issue, as if the contours are not saved the way we have seen from the planning systems we encountered (which is most of them, as SlicerRT is used since 2012 and this is the first time I’m seeing something like this - similarly to the fact that each structure is in its own structure set object, which is also unusual).
The contours themselves seem to be alright to me, see
Maybe it’s as easy as an inverse direction of defining the contours as usual. Maybe @Sunderlandkyl can take a look into it (once he’s back from vacation).
I’ve checked the data set and the problem is that each contour is listed 5 times (see [3006,0050] ContourData fields in the metadata browser). Although each duplicate contour refers to a different image series (via ContourImageSequence), I’m not sure if it is valid to dump all these duplicate contours in one sequence, as there is no way a third-party software could know how it is supposed to interpret these duplicate contours.
Maybe @Sunderlandkyl can implement a workaround in Slicer that will deal with this very unusual and potentially invalid data representation. In the meantime, you might check with your software provider if they have a new version of their software where this issue is fixed; or maybe you can make some configuration or workflow changes that would prevent exporting of the same contour several times within the same ContourSequence.
@lassoan@cpinter
The software provider is Dosisoft, the planning system that exported the RTStructs is planetDose. This is a standard exportation of an already defined segmentation used for dosimetry. The repetitions is because we require one segmentation per time point (5). So you can just take the first one on each structure which is the most relevant. I don’t know a simple workaround to handle this case. But anyways, Slicer shall be able to detect the repeated structures and ask to import them all or just one, in each RTSTRUCT file. In any case, I will ask Dosisoft if there is a way to export only one segment per structure.
I’m not sure if it is valid to dump all these duplicate contours in one sequence
Valid, but semantically unclear. Separate ROI for each timepoint would be a better choice.
So you can just take the first one on each structure which is the most relevant.
Unfortunately it’s not that simple. At a given Z coordinate, you may have a single contour, or multiple contours. If it is a single contour, how does one know it belongs to the first, or the second, or the nth version of the structure? If the Referenced SOP Instance UID were used correctly, one could potentially analyze the referenced images and figure this out. But the in the RTSTRUCT you have shared, the multiple contours at a given Z coordinate reference the same CT slice.
But trying to convert to Segments raises an error:
Thanks anyway, I think I am closer to the truth now.
Edit: Deleting the previous segmentation and creating a new empty one solved the problem!
That plastimatch line is indeed the solution, would be nice to have it in Slicer by default!
I agree, I checked the DICOM standard and it is not explicitly forbidden to insert redundant/contradicting contours. Nevertheless, I’m quite sure that this dumping of contours from various sequences into a single structure can only be interpreted by dosisoft’s own software. There is no way other software could know that if the contour refers to different images then they should be interpreted as separate contours.
In case of this specific data set, all the repeated contours are exactly the same, so by Plastimatch computing of the union it produces correct results. But of course this will break as soon as the contours are not the same in all repetitions.
To not pollute our DICOM importers with various vendor-specific workarounds, we usually address this kind of DICOM content issues by adding new rules to Slicer’s DICOM patcher module. So, if dosisoft is not willing to change their ways then we can add a new DICOM patcher rule (split segments if an RTSTRUCT produced by dosisoft refer multiple image series in the same structure).
@Alex_Vergara Please report this issue to dosisoft. They are probably aware that they have cut some corners but they should also know that it is hurting their users.
Hello, I have the same issue with my data. Is it possible to make a video and share it? I really couldn’t solve the problem. I have the complete RTstruct data (with several annotations for Lung, Heart, etc.). I can visualize it in the DICOM database of the slicer, but that’s all. I cannot open it and use it for segmentation. Any idea? or Recommendation?
Hi Lassoan, Thanks for the quick reply. It says that " Electa`s XiO® proton therapy treatment". The software is XiO when we check RTSTRUCT data via MatLab. I can visualize the RTSTRUCT file via MITK software, but not the 3D slicer.
It seems like I have solved the issue. It seems like I was missing with SlicerRT Extension. After I added the extension, it started working like a charm (attached).