[Gate-users] Change orientation of cone volume

Christopher Watanabe chris.r.watanabe at gmail.com
Sat Sep 14 09:09:34 CEST 2019


Hello Matthew (and all),

First, I did try to setRotationAngle / Axis with specific values as Matthew
indicated in the last post. However, this did not change the primary axis
of the cone.

Second, the problem I think has to do with the cone being the daughter of
another volume. So, to get the cone to rotate, you have to rotate the
parent! See the code below, I first declare the parent "collimator" with
dimensions to fit the wrongly oriented cone. Then rotate the parent (and
therefore all children) to be in the correct orientation. The volume *front*
is previously declare and is simply an Air filled volume at the head of my
SPECT device.

## Collimator

/gate/front/daughters/name collimator
/gate/front/daughters/insert box
/gate/collimator/geometry/setXLength            44. mm
/gate/collimator/geometry/setYLength            44. mm
/gate/collimator/geometry/setZLength            11.14 mm
/gate/collimator/placement/setTranslation       0. 0. 0. mm
/gate/collimator/setMaterial                    Air

# Square of tungsten with correct thickness at the wider base (crystal
side)
/gate/collimator/daughters/name              base
/gate/collimator/daughters/insert            box
/gate/base/geometry/setXLength     44. mm
/gate/base/geometry/setYLength       44. mm
/gate/base/geometry/setZLength     1. mm
/gate/base/placement/setTranslation 0. 0. 5.07 mm
/gate/base/setMaterial Tungsten

# Cone of tungsten for collimation
/gate/collimator/daughters/name        Tcone
/gate/collimator/daughters/insert      cone
/gate/Tcone/geometry/setRmin1   2 mm
/gate/Tcone/geometry/setRmax1   3 mm
/gate/Tcone/geometry/setRmin2   21 mm
/gate/Tcone/geometry/setRmax2   22 mm
/gate/Tcone/geometry/setHeight   10.14 mm
/gate/Tcone/placement/setTranslation       0. 0. -1. mm
/gate/Tcone/setMaterial       Tungsten

# This is our solution!
/gate/collimator/placement/setRotationAxis    1 0 0
/gate/collimator/placement/setRotationAngle   90 deg
[image: image.png]

Follow up question: Above I declare a "base", which is this square plate at
the base of the pinhole collimator. This means that particles have to
penetrate that base plate to get to the crystal. If I declare a cone of air
as a daughter of the colllimator, does it displace the base plate where
they intersect?

Chris


On Fri, Sep 13, 2019 at 7:02 PM Matthew Strugari <matthew.strugari at dal.ca>
wrote:

> Hi Chris,
>
> Have you tried specifying the rotation axis and angle with numerical
> values?
>
> /gate/Tcone/placement/setRotationAxis 1 0 0
> /gate/Tcone/placement/setRotationAngle 90 deg
>
> Cheers,
> Matthew
>
> > On Sep 13, 2019, at 7:10 AM, Christopher Watanabe <
> chris.r.watanabe at gmail.com> wrote:
> >
> > Hi everyone,
> >
> > I'm trying to create a pinhole collimater. So far, I have everything set
> up well, but the orientation is wrong with the preexisting orientation of
> the camera. (i.e. the primary axis of the pinhole should be the normal of
> the pixel grid)
> >
> > The code I have now is:
> >
> > ## Volume at the front of the spect device for the collimator
> >
> > /gate/front/daughters/name collimator
> > /gate/front/daughters/insert box
> > /gate/collimator/geometry/setXLength            44. mm
> > /gate/collimator/geometry/setYLength            11.14 mm
> > /gate/collimator/geometry/setZLength            44. mm
> > /gate/collimator/placement/setTranslation       0. -0.2 0. mm
> > /gate/collimator/setMaterial                    Air
> >
> > # Square of tungsten with correct thickness at the wider base (crystal
> side)
> > /gate/collimator/daughters/name              base
> > /gate/collimator/daughters/insert            box
> > /gate/base/geometry/setXLength     44. mm
> > /gate/base/geometry/setYLength       1 mm
> > /gate/base/geometry/setZLength     44. mm
> > /gate/base/placement/setTranslation 0. -0.2 0. mm
> > /gate/base/setMaterial Tungsten
> >
> > # Cone of tungsten for collimation
> > /gate/collimator/daughters/name        Tcone
> > /gate/collimator/daughters/insert      cone
> > /gate/Tcone/geometry/setRmin1   0 mm
> > /gate/Tcone/geometry/setRmax1   3 mm
> > /gate/Tcone/geometry/setRmin2   0 mm
> > /gate/Tcone/geometry/setRmax2   25 mm
> > /gate/Tcone/geometry/setHeight   11.14 mm
> > /gate/Tcone/placement/setTranslation       0. -0.2 0. mm
> > /gate/Tcone/setMaterial         Tungsten
> >
> > # Cone of Air within the cone of tungsten
> > /gate/Tcone/daughters/name        hole2
> > /gate/Tcone/daughters/insert     cone
> > /gate/hole2/geometry/setRmin1         0 mm
> > /gate/hole2/geometry/setRmax1         2 mm
> > /gate/hole2/geometry/setRmin2         0 mm
> > /gate/hole2/geometry/setRmax2         24 mm
> > /gate/hole2/geometry/setHeight 11.14 mm
> > /gate/hole2/placement/setTranslation       0. -0.2 0. mm
> >
> > So, basically, the hollow tungsten cone should be within the air volume
> allocate for the collimator. The primary axis of the cone is along the z
> direction though, so I get the following visualization:
> >
> > <image.png>
> > As you can see, the solid red cone (pinhole) is oriented along the
> z-axis, whereas the rest of the SPECT device is oriented along the y axis...
> >
> > Things I've tried:
> > /gate/Tcone/placement/alignToY - This command just centers it along the
> y axis. Doesn't change the primary axis.
> > /gate/Tcone/placement/setRotationAxis +
> /gate/Tcone/placement/setRotationAngle - Also doesn't yield any helpful
> changes.
> >
> > I'd appreciate any help!
> >
> > Cheers!
> >
> > Chris
> >
> > _______________________________________________
> > Gate-users mailing list
> > Gate-users at lists.opengatecollaboration.org
> > http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190914/98fcb38f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 12662 bytes
Desc: not available
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190914/98fcb38f/attachment-0001.png>


More information about the Gate-users mailing list