Is it possible to mirror a rotation around the axis in a simple way (not making negative specific elements of the matrix) for a transform node?
For example the code:
vtkMRMLLinearTransformNode* gantryToFixedReferenceTransformNode =
this->GetTransformNodeBetween(Gantry, FixedReference);
vtkTransform* gantryToFixedReferenceTransform = vtkTransform::SafeDownCast(gantryToFixedReferenceTransformNode->GetTransformToParent());
gantryToFixedReferenceTransform->Identity();
gantryToFixedReferenceTransform->RotateY(beamNode->GetGantryAngle());
gantryToFixedReferenceTransform->Modified();
... some other code ...
gantryToFixedReferenceTransform->MirrorY(); // mirror the rotation
gantryToFixedReferenceTransform->Modified();
Without mirror (not very good):
With mirror (much better):