<div dir="ltr"><div><div>Hello Matthew (and all), <br><br></div>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. <br><br></div>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 <b>front</b> is previously declare and is simply an Air filled volume at the head of my SPECT device. <br><br>## Collimator<br><br>/gate/front/daughters/name collimator<br>/gate/front/daughters/insert box<br>/gate/collimator/geometry/setXLength 44. mm<br>/gate/collimator/geometry/setYLength 44. mm<br>/gate/collimator/geometry/setZLength 11.14 mm<br>/gate/collimator/placement/setTranslation 0. 0. 0. mm<br>/gate/collimator/setMaterial Air<br><br># Square of tungsten with correct thickness at the wider base (crystal side) <br>/gate/collimator/daughters/name base<br>/gate/collimator/daughters/insert box<br>/gate/base/geometry/setXLength 44. mm<br>/gate/base/geometry/setYLength 44. mm<br>/gate/base/geometry/setZLength 1. mm<br>/gate/base/placement/setTranslation 0. 0. 5.07 mm<br>/gate/base/setMaterial Tungsten<br><br># Cone of tungsten for collimation<br>/gate/collimator/daughters/name Tcone<br>/gate/collimator/daughters/insert cone<br>/gate/Tcone/geometry/setRmin1 2 mm<br>/gate/Tcone/geometry/setRmax1 3 mm<br>/gate/Tcone/geometry/setRmin2 21 mm<br>/gate/Tcone/geometry/setRmax2 22 mm<br>/gate/Tcone/geometry/setHeight 10.14 mm<br>/gate/Tcone/placement/setTranslation 0. 0. -1. mm<br><div>/gate/Tcone/setMaterial Tungsten</div><div><br></div><div># This is our solution!<br></div>/gate/collimator/placement/setRotationAxis 1 0 0<br>/gate/collimator/placement/setRotationAngle 90 deg<div><div><img src="cid:ii_k0j7iiks0" alt="image.png" style="margin-right: 0px;" width="331" height="202"></div><div><br></div><div>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? <br></div><div><br></div><div>Chris<br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 13, 2019 at 7:02 PM Matthew Strugari <<a href="mailto:matthew.strugari@dal.ca">matthew.strugari@dal.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Chris,<br>
<br>
Have you tried specifying the rotation axis and angle with numerical values?<br>
<br>
/gate/Tcone/placement/setRotationAxis 1 0 0<br>
/gate/Tcone/placement/setRotationAngle 90 deg<br>
<br>
Cheers,<br>
Matthew<br>
<br>
> On Sep 13, 2019, at 7:10 AM, Christopher Watanabe <<a href="mailto:chris.r.watanabe@gmail.com" target="_blank">chris.r.watanabe@gmail.com</a>> wrote:<br>
> <br>
> Hi everyone, <br>
> <br>
> 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) <br>
> <br>
> The code I have now is:<br>
> <br>
> ## Volume at the front of the spect device for the collimator<br>
> <br>
> /gate/front/daughters/name collimator<br>
> /gate/front/daughters/insert box<br>
> /gate/collimator/geometry/setXLength 44. mm<br>
> /gate/collimator/geometry/setYLength 11.14 mm<br>
> /gate/collimator/geometry/setZLength 44. mm<br>
> /gate/collimator/placement/setTranslation 0. -0.2 0. mm<br>
> /gate/collimator/setMaterial Air<br>
> <br>
> # Square of tungsten with correct thickness at the wider base (crystal side) <br>
> /gate/collimator/daughters/name base<br>
> /gate/collimator/daughters/insert box<br>
> /gate/base/geometry/setXLength 44. mm<br>
> /gate/base/geometry/setYLength 1 mm<br>
> /gate/base/geometry/setZLength 44. mm<br>
> /gate/base/placement/setTranslation 0. -0.2 0. mm<br>
> /gate/base/setMaterial Tungsten<br>
> <br>
> # Cone of tungsten for collimation<br>
> /gate/collimator/daughters/name Tcone<br>
> /gate/collimator/daughters/insert cone<br>
> /gate/Tcone/geometry/setRmin1 0 mm<br>
> /gate/Tcone/geometry/setRmax1 3 mm<br>
> /gate/Tcone/geometry/setRmin2 0 mm<br>
> /gate/Tcone/geometry/setRmax2 25 mm<br>
> /gate/Tcone/geometry/setHeight 11.14 mm<br>
> /gate/Tcone/placement/setTranslation 0. -0.2 0. mm<br>
> /gate/Tcone/setMaterial Tungsten<br>
> <br>
> # Cone of Air within the cone of tungsten<br>
> /gate/Tcone/daughters/name hole2<br>
> /gate/Tcone/daughters/insert cone<br>
> /gate/hole2/geometry/setRmin1 0 mm<br>
> /gate/hole2/geometry/setRmax1 2 mm<br>
> /gate/hole2/geometry/setRmin2 0 mm<br>
> /gate/hole2/geometry/setRmax2 24 mm<br>
> /gate/hole2/geometry/setHeight 11.14 mm<br>
> /gate/hole2/placement/setTranslation 0. -0.2 0. mm<br>
> <br>
> 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:<br>
> <br>
> <image.png><br>
> 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...<br>
> <br>
> Things I've tried: <br>
> /gate/Tcone/placement/alignToY - This command just centers it along the y axis. Doesn't change the primary axis. <br>
> /gate/Tcone/placement/setRotationAxis + /gate/Tcone/placement/setRotationAngle - Also doesn't yield any helpful changes.<br>
> <br>
> I'd appreciate any help! <br>
> <br>
> Cheers!<br>
> <br>
> Chris<br>
> <br>
> _______________________________________________<br>
> Gate-users mailing list<br>
> <a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br>
> <a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
</blockquote></div>