How to make RTBeamNode or VolumeNode sensitive to patient support rotation from UI?

When i change patient support rotation angle in “Beams” module or “Room’s Eye View” it changes the position of patient support but CT volume node is still on the same place. How to make a volume node or rt beam sensitive to that rotation from UI not using “Transform” module?

That is required for correct MLC opening calculation and RTImage calculation.

Screen shot example: Patient Support is rotated, but CT series data are still on the same place.

This is a known issue that patient support rotation does not affect moving the patient as it should. This is one of the many things that would need to be improved around beams and plans in SlicerRT. Treatment planning features are still quite rudimentary due to the lack of funds to continue development. We are in the process of writing a grant just for this, but that is a lengthy process, so if you prefer not to wait, then you may consider contributing.

There is no rush, but that’s a must have feature in my case. I’m ready to help in this issue.

I have tried myself but i haven’t found how to get a proper transformation node between Patient Support or Table Top to RAS in IECTransformLogic.

You can get the transformation using

vtkSlicerIECTransformLogic::GetTransformBetween(vtkSlicerIECTransformLogic::PatientSupport, vtkSlicerIECTransformLogic::RAS, outputTransform)

It should also be possible to define the patient for the plan, and have the whole patient (CT, segmentation, fiducials, all of that) transformed accordingly when the patient support is moved. However, that is a larger task to do it properly, in a future-proof way.

I managed to solve this problem partially, at least now with rotation of patient support the patient CT and segmentation rotated as well.

Another issue is a camera control to fix slice views on table top position.

You bcan use Volume Reslice Driver module (in SlicerIGT extension) to move slice views by transforms. You can combine transforms and as the transforms change, the slice views are updated in real-time.

Thank you for suggestion of using IGT extension.

As another approach it is possible to create a reverse transforms from IEC, e.g. everything (table support, gantry, etc) rotates and translates around still CT data?

Yes, and actually this is what I imagine to be a proper fix for considering the patient support transform. What this would imply is that the reference in terms of IEC will be the patient support and not the world (FixedReference / RAS). However, this would take time to implement in a proper and maintainable manner, which requires funding (see my first comment).

I understood that, and that is good to know that reverse transforms is a proper way.

I don’t know if it helps, but you can compute inverse transform (and compute relative transform between any two coordinate systems) using “Transform processor” module in SlicerIGT extension. The computed transform is updated in real-time when any of the input transforms are changed.

I have made a dynamic IEC hierarchy matrix transformation calculation, and i can make a PR if this is interesting.

Transformation for Collimator to Patient looks like:

Collimator -> Gantry -> fixedReference -> patientSupport -> tableTopEccentric -> tableTop -> Patient (RAS)

  1. Works with “Beams” and “External Beam Plan” modules
  2. Doesn’t break compatibility with “Room’s Eye View” module

Gantry and patient support angles:
image

RTBeamNode transformation:

Image example:

2 Likes

Looks very nice. Please submit a pull request so the implementation can be reviewed and integrated.

1 Like

Pull request that partially fix that issue: https://github.com/SlicerRt/SlicerRT/pull/133

1 Like