There is a single spot check in _planProtonLayer. For the RTplan exported from RayStation, it will run into error when the plan have two spots at the same position. There is no time sequence in the RTplan, so the startime and irradiationDuration is None.
Hello,
It’s indeed not possible to load the exact same spot twice unless there’s a difference in timing. Could you clarify the reasoning behind the approach you’re using in RayStation and what data is stored in your plan? I assume that in the case of repainting, having the same spot multiple times should be allowed, but there needs to be a way to distinguish between them.
We could then implement a fix in OpenTPS to enable the loading of repainting plans.
There are two scenarios in treatment planning that adopted repainting. One is for the motion management and the other is due to the maximum MU/spot limit of the machine. Because of the maximum MU/spot limit of the machine, when the MU/spot exceed the limit, the spot will be split into multiple spots to ensure that it is deliverable. The spot split algorithm in RayStation tends to equally distributed the MU of the spots, which would result in exact same spots. Usually the spots were not delivered at the same time, after delivered one spot, it will move to the next spot.
A quick workaround for now would be to locally modify your OpenTPS version to allow importing plans with duplicate spots by removing the lines that check whether a spot already exists. I haven’t tested this myself, but it should in principle allow you to load your plan.
For a proper solution, we’ll open an internal issue and consider addressing it during our next development camp (planned for summer).
Thank you for the response. I have modified the duplicate spot check, and it worked.