Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fix patient support rotation angle to fixed reference #255

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

MichaelColonel
Copy link
Collaborator

How to test:

  1. Load https://github.com/SlicerRt/SlicerRtData/tree/master/xio-4.64-phantom-prostate-beams-allnonzero from SlicerRtData. That dataset has predefined nonzero angles of beam orientation: gantry, couch, collimator.

  2. Check that dose distribution lays within beam's model borders.

  3. In "Beams" module check that beam orientation parameters are as follows:
    Gantry angle = 20 deg;
    Collimator angle = 350 deg;
    Couch angle = 300 deg.

  4. In "Room's Eye View" module, load Varian machine and set required parameters for the machine sliders:
    Gantry angle = 20 deg;
    Collimator angle = 350 deg;
    Patient support rotation = -60 deg. (since slider range is from -180 up to 180 deg)

  5. Go back to the "Beams" module and check that beam orientation parameters are the same:
    Gantry angle = 20 deg;
    Collimator angle = 350 deg;
    Couch angle = 300 deg.

@MichaelColonel
Copy link
Collaborator Author

That bug was fixed in #236 commit, but appeared once again when IEC logic had been reworked. I don't know how that has happened, but it should work again.

@@ -397,7 +397,7 @@ void vtkSlicerBeamsModuleLogic::UpdateIECTransformsFromBeam(vtkMRMLRTBeamNode* b
// Set beam angles to IEC logic
this->IECLogic->UpdateGantryToFixedReferenceTransform(beamNode->GetGantryAngle());
this->IECLogic->UpdateCollimatorToGantryTransform(beamNode->GetCollimatorAngle());
this->IECLogic->UpdatePatientSupportRotationToFixedReferenceTransform(beamNode->GetCouchAngle());
this->IECLogic->UpdatePatientSupportRotationToFixedReferenceTransform(-1. * beamNode->GetCouchAngle());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If signs are flipped here, then the comment

  // Set the inverse of the couch angle as now what moves is the room (treatment machine) around the patient,
  // so the patient support table top (couch) always stays stationary in RAS.

should be moved from the other files to this one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

How to test:

1. Load https://github.com/SlicerRt/SlicerRtData/tree/master/xio-4.64-phantom-prostate-beams-allnonzero
from SlicerRtData. That dataset has predefined nonzero angles of beam orientation: gantry, couch, collimator.

2. Check in dose distribution lays within beam's model borders.

3. In "Beams" module check that beam orientation parameters are as follows:
  Gantry angle = 20 deg;
  Collimator angle = 350 deg;
  Couch angle = 300 deg.

4. In "Room's Eye View" module, load Varian machine and set required parameters for the machine sliders:
  Gantry angle = 20 deg;
  Collimator angle = 350 deg;
  Patient support rotation = -60 deg. (since slider range is from -180 up to 180 deg)

5. Go back to the "Beams" module and check that beam orientation parameters are the same:
  Gantry angle = 20 deg;
  Collimator angle = 350 deg;
  Couch angle = 300 deg.
@cpinter
Copy link
Member

cpinter commented Oct 15, 2024

Thank you very much! Since the two of you seem to agree that this works, I'm doing the merge (no time at all this week unfortunately).

@cpinter cpinter merged commit ee4f9dc into SlicerRt:master Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants