[Gate-users] Ring repeater - request for clarification
Paul Betteridge
paul.betteridge at adaptiximaging.com
Wed Sep 2 11:56:56 CEST 2015
Hi,
Anders Garpebring sent a query to this list last week about the ring
repeater, and I have spent a little time investigating why it seemed to
work for me and not for him. The behaviour I found is unexpected (at
least to me), and I'd appreciate if someone could comment on it.
The rotation axis for the ring repeater is specified by the setPoint1
and setPoint2 commands. I have tried to use it to specify both the
direction and the position of the axis, like this:
/gate/Name_Volume/ring/setPoint1 0. 1. 20. mm
/gate/Name_Volume/ring/setPoint2 0. 0. 20. mm
which corresponds to the User Guide:
http://wiki.opengatecollaboration.org/index.php/Users_Guide_V7.1:Defining_a_geometry#Repeating_a_volume
This seems to work, and it behaves as I expect. But if you change the
unit from "mm" to "m", it doesn't work any more.
Now in fact, the behaviour of the setPoint1 and setPoint2 commmands
defined in the GateAngularRepeaterMessenger class doesn't specify a unit
to be read with the 3 numbers. This is the code:
https://github.com/OpenGATE/Gate/blob/develop/source/geometry/src/GateAngularRepeaterMessenger.cc#L35
which can be compared with the code for the linear repeater, which does
have a unit:
https://github.com/OpenGATE/Gate/blob/develop/source/geometry/src/GateLinearRepeaterMessenger.cc#L29
So, the actual behaviour of the ring repeater seems to be that you can
use setPoint1 and setPoint2 to specify the direction _and position_ of
the rotation axis in _millimetres_.
I have also noticed that GateAngularRepeater::DescribeMyself() seems to
assume distances in cm. See:
https://github.com/OpenGATE/Gate/blob/develop/source/geometry/src/GateAngularRepeater.cc#L131
But that code doesn't actually seem to be connected up to the /describe
option for the ring repeater - I haven't tracked down what is wrong.
So my questions are:
* is the behaviour that setPoint1 and setPoint2 don't read in a unit
deliberate or accidental?
* is the way that both Anders and myself have tried to define rotation
about a point acceptable?
(I would imagine so, since the calculation is delegated to
HepGeom::Rotate3D()).
* if the existing behaviour of the repeater is accidental, is anyone
interested in trying to fix it?
I'd hesitate to fix the code myself, because I suspect there may be
other consequences I can't see, but I would be happy to make the
documentation reflect reality.
Thanks,
Paul
--
Paul Betteridge
Adaptix Imaging
paul.betteridge at adaptiximaging.com
More information about the Gate-users
mailing list