[Gate-users] Autorotation axis issue
Steven Marsh
steven.marsh at canterbury.ac.nz
Wed Apr 29 23:04:30 CEST 2020
Hi Etienne
Thanks for your response - it was much appreciated and very helpful.
I now have a working multi-head spect camera which was made possible thanks to your feedback. I was suspicious that the initial rotation was causing the issue and it was great that you confirmed this for me. The implementation you suggested was made difficult due to the specthead having many components specified within – this in itself was not an issue as I could equally specify those dimensions correctly – however one of the components required a trpd shape to be specified. For this shape it was not possible to specify the shape correctly without rotating (a limitation in the available specifiers – I could be wrong here but it proved problematic.
In the end I translated my original spect head (actually the one specified in the gate examples folder) in the z-direction and then autorotated around the y-axis. This seems to be working perfectly so long as I don’t later find any issues with this as a coordinate system.
Cheers
Steve
-----Original Message-----
From: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> On Behalf Of gate-users-request at lists.opengatecollaboration.org
Sent: Tuesday, 28 April 2020 1:52 PM
To: gate-users at lists.opengatecollaboration.org
Subject: Gate-users Digest, Vol 167, Issue 42
Send Gate-users mailing list submissions to
gate-users at lists.opengatecollaboration.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
or, via email, send a message with subject or body 'help' to
gate-users-request at lists.opengatecollaboration.org
You can reach the person managing the list at
gate-users-owner at lists.opengatecollaboration.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Gate-users digest..."
Today's Topics:
1. Job offer @ IBA (Lydia Maigne)
2. Autorotation axis issue. (Etienne Auger)
3. Error: one of the matrix dimensions is zero! (Miriam Dixon)
----------------------------------------------------------------------
Message: 1
Date: Mon, 27 Apr 2020 14:58:05 +0200
From: Lydia Maigne <lydia.maigne at clermont.in2p3.fr>
To: gate-users at lists.opengatecollaboration.org
Subject: [Gate-users] Job offer @ IBA
Message-ID: <08166864-6D05-4037-BA72-082E7EC593EC at clermont.in2p3.fr>
Content-Type: text/plain; charset="utf-8"
Dear users,
Please take notice of the position opening for a (Monte Carlo) computational physicist at IBA Dosimetry GmbH or forward it to anyone interested.
https://www.iba-careers.com/?page=job&job_id=20056&lang=en&r=?page%3Dcareer%26lang%3Den <https://www.iba-careers.com/?page=job&job_id=20056&lang=en&r=?page=career&lang=en>
Best regards
Lydia
*************************************************************
Lydia Maigne, PhD
Laboratoire de Physique de Clermont
UMR 6533 CNRS/IN2P3 - Université Clermont Auvergne
Campus Universitaire des Cézeaux
4, avenue Blaise Pascal
TSA 60026
CS 60026
63178 - Aubière Cedex
FRANCE
Tel: (33) (0) 4 73 40 51 23
email: Lydia.Maigne at clermont.in2p3.fr
Website: http://see.lpc.uca.fr
*************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200427/85deb288/attachment-0001.html>
------------------------------
Message: 2
Date: Mon, 27 Apr 2020 14:57:34 +0000
From: Etienne Auger <Etienne.Auger at USherbrooke.ca>
To: "gate-users at lists.opengatecollaboration.org"
<gate-users at lists.opengatecollaboration.org>
Subject: [Gate-users] Autorotation axis issue.
Message-ID:
<YQXPR01MB2808A03F1938806A35D505B583AF0 at YQXPR01MB2808.CANPRD01.PROD.OUTLOOK.COM>
Content-Type: text/plain; charset="iso-8859-1"
Hello Steve,
I think you may want to simplify your code and autorotation will do what you desire. I commented the lines that I think are unnecessary or even detrimental to your problem. Feel free to delete them in your code once you are convinced :
# SPECT Head: main volume, everything is included in SPECThead # the name MUST be SPECThead - one of available systems is table 1.1 /gate/world/daughters/name SPECThead /gate/world/daughters/insert box /gate/SPECThead/geometry/setZLength 57.6 cm # swapped value with X /gate/SPECThead/geometry/setYLength 44.6 cm /gate/SPECThead/geometry/setXLength 18 cm # swapped value with Z
/gate/SPECThead/placement/setTranslation 60. 0. 0. cm # added arbitrary translation
# /gate/SPECThead/placement/setRotationAxis 1 0 0 # detrimental # /gate/SPECThead/placement/setRotationAngle -90 deg # detrimental /gate/SPECThead/vis/setColor white /gate/SPECThead/setMaterial Air /gate/SPECThead/vis/forceWireframe
# Replicate SPECThead to get a multi-headed system /gate/SPECThead/repeaters/insert ring # /gate/SPECThead/ring/setPoint1 0 0 0 # unnecessary # /gate/SPECThead/ring/setPoint2 0 0 1 # unnecessary /gate/SPECThead/ring/enableAutoRotation
/gate/SPECThead/ring/setAngularSpan 360. deg /gate/SPECThead/ring/setRepeatNumber 4
The idea is to first define your SPECThead as you want it to appear on the first of the four positions. For that, I swapped the X and Z dimensions of your SPECThead in order to better represent the usual geometry of a SPECT camera. This, I think, takes care of what you tried to do with your first rotation about X axis (which should have been around Y axis really I think). Then, I added an arbitrary 60 cm translation, which I'm guessing you must specify somewhere else in your code, but did not provide in the sample code (change it according to your specs). It is important to translate the SPECThead before applying a ring repeater on it. And then, the magic of autorotation takes care of repeating the first unit around with always the same face of your SPECThead facing the center of the scanner, as you wanted (no need to specify setPoint1 and setPoint2 as the axis of rotation is already by default the Z axis).
In the hope of having well understood your question and having answered it accordingly,
Étienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200427/2e14b5d8/attachment-0001.html>
------------------------------
Message: 3
Date: Tue, 28 Apr 2020 14:10:44 +1200
From: Miriam Dixon <miriam.gatemc at gmail.com>
To: gate-users at lists.opengatecollaboration.org
Subject: [Gate-users] Error: one of the matrix dimensions is zero!
Message-ID:
<CAKQywEXWSfd9UfGXZg7oSW9it8ZFS+_xaBv+gsosqbW-7LGaKQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi Gate Users,
I am trying to incorporate an XCAT phantom into my SPECT simulation. I have converted the .bin XCAT file to interfile format using (X)MedCon. However, when GATE reads the header there is a problem. The header states there are
500 images, 256 pixels by 256 pixels, but the output when the simulation is run says the number of planes is 0, with 256 x 256 pixels per plane. I then get the following:
Header read from 'data/test_atn.h33'
Data file name 'm000-out_test_atn_1.i33'
Nb of planes: 0
Nb of pixels per plane: 256 256
Pixel size: 1 1
Slice thickness: 0
Matrix size: 256 256
Data type: UNSIGNED INTEGER
Bytes per pixel: 4
Data byte order: LITTLEENDIAN
Machine byte order: LITTLEENDIAN
[G4-cerr]
[G4-cerr] Error: one of the matrix dimensions is zero!
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : NoHeaderInformation
issued by : GateInterfileHeader.cc:ReadData call GateInterfileHeader::ReadHeader first!
*** Fatal Exception *** core dump ***
[G4-cerr] **** Track information is not available at this moment [G4-cerr] **** Step information is not available at this moment [G4-cerr]
-------- EEEE -------- G4Exception-END --------- EEEE -------
Is this due to the file converting incorrectly? If so, do you have a suggestion on how to convert it correctly? And if not, do you have a suggestion of what I can try to correct this error?
I have included more information from the header below, if that is of use.
Cheers,
Miriam
!INTERFILE :=
!imaging modality := nucmed
!originating system := (X)MedCon
!version of keys := 3.3
date of keys := 1996:09:24
conversion program := (X)MedCon
program author := Erik Nolf
program version := 0.14.1
program date := 2015:12:26
;
!GENERAL DATA :=
original institution := NucMed
!data offset in bytes := 0
!name of data file := m000-out_test_atn_1.i33 patient name := Unknown !patient ID := Unknown patient dob := 0000:00:00 patient sex := Unknown !study ID := Unknown exam type := Unknown data compression := none data encode := none organ := Unknown isotope := Unknown dose := 0 NUD/Patient Weight [kg] := 0.00 NUD/imaging modality := NM NUD/activity := 0 NUD/activity start time := 00:00:00 NUD/isotope half life [hours] := 0.000000 ; !GENERAL IMAGE DATA := !type of data := Static !total number of images := 500 study date := 0000:00:00 study time := 00:00:00 imagedata byte order := LITTLEENDIAN process label := Unknown ; number of energy windows := 1 ; energy window [1] := energy window lower level [1] := energy window upper level [1] := flood corrected := N decay corrected := N ; !STATIC STUDY (General) := number of images/energy window := 500 ; !Static Study (each frame) := !image number := 1 !matrix size [1] := 256 !matrix size [2] := 256 !number format := unsigned integer !number of bytes per pixel := 4 scaling factor (mm/pixel) [1] := +1.000000e+00 scaling factor (mm/pixel) [2] := +1.000000e+00 image duration (sec) := 0.000000e+00 image start time := 00:00:00 label := Unknown !maximum pixel count := +0.000000e+00 !minimum pixel count := +0.000000e+00 total counts := 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20200428/685e25ea/attachment.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
------------------------------
End of Gate-users Digest, Vol 167, Issue 42
*******************************************
More information about the Gate-users
mailing list