[Gate-users] Using parameters for mac files
BAKER, Mark (THE CLATTERBRIDGE CANCER CENTRE NHS FOUNDATION TRUST)
mark.baker23 at nhs.net
Thu Mar 17 13:11:07 CET 2022
Hi all
I am trying to run some parameters into my Gate simulation, but it doesn't seem to be working and Gate sticks at the PreInit stage (although the CPU does ramp up to 100%). I am running multiple instances of Gate (up to 8 simultanouely), so it is laborious to go into each of the macs every time I want to change a parameter, so I was hoping this would help. My project is hoping to calculate dose distributions from PET scans using CT scans as the geometry. Previously it was working fine until I tried to add the parameters.
The relevant parts of my code are below (there is obviously a lot more so I've attached the files also in case anyone wants to look deeper, some bits commented out during the debugging)
In the main1.mac, I have changed the geometry to
/gate/world/daughters/name patientCT
/gate/world/daughters/insert ImageNestedParametrisedVolume
/gate/patientCT/geometry/setImage {CTData}
The main1.mac calls sourceF18.mac as its source, which contains the link to the PET data. The relevant part is
/gate/source/addSource patientPET voxel
/gate/source/patientPET/imageReader/readFile {PETData}
I also change the number of primaries on the fly, so I set that to the following in main1.mac
/gate/application/setTotalNumberOfPrimaries {NoOfPrimaries}
I've a got a script to run the multiple instances of Gate, alongside a lot of housework for moving files and merging them etc. I have checked the input to the parameters, and as far as I can tell, they are fine.
I call Gate using the following
Gate mac/main1.mac [CTData,$CTDataFile] [NoOfPrimaries,$NumberPrimaries] [PETData,$PTDataFile] &
where the user could select the following information, for example,
$CTDataFile is data/dcm/CT/br38f.mha
$PTDataFile is data/dcm/PT/brainmaskPET.mha
$NumberPrimaries is 1000
If I go back to my main1.mac etc. and manually change the parameters to the data above and change my run.sh script to Gate mac/main1.mac & it works perfectly, so presumably I am doing something wrong with passing the parameters through.
I'd appreciate it if anyone had any thoughts on this?
Thank you
Mark Baker
Principal Clinical Scientist (Interim)
Imaging Physics (Ionising)
The Clatterbridge Cancer Centre NHS Foundation Trust
(he, him)
CCCW Tel: 0151 556 5030
CCCL Tel: 0151 318 8438
Email: mark.baker23 at nhs.net<mailto:mark.baker23 at nhs.net>
Microsoft Teams (click here)<https://teams.microsoft.com/l/chat/0/0?users=mark.baker23@nhs.net>
Honorary Lecturer, Dept. of Physics
University of Liverpool
[CCC email footer April 2021]
************************************************************************************** ******************************
This message may contain confidential information. If you are not the intended recipient please:
i) inform the sender that you have received the message in error before deleting it; and
ii) do not disclose, copy or distribute information in this e-mail or take any action in relation to its content (to do so is strictly prohibited and may be unlawful).
Thank you for your co-operation.
NHSmail is the secure email, collaboration and directory service available for all NHS staff in England. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.
For more information and to find out how you can switch visit Joining NHSmail - NHSmail Support<https://support.nhs.net/article-categories/joining-nhsmail/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220317/c46f703b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 13494 bytes
Desc: image003.jpg
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220317/c46f703b/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main1.mac
Type: application/octet-stream
Size: 2986 bytes
Desc: main1.mac
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220317/c46f703b/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: detect1.mac
Type: application/octet-stream
Size: 2422 bytes
Desc: detect1.mac
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220317/c46f703b/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run.sh
Type: application/octet-stream
Size: 6999 bytes
Desc: run.sh
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220317/c46f703b/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sourceF18.mac
Type: application/octet-stream
Size: 1172 bytes
Desc: sourceF18.mac
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20220317/c46f703b/attachment-0007.obj>
More information about the Gate-users
mailing list