[Gate-users] SOLVED: Defining voxelized source for Gate v8.2
Thomas Funck
thomas.funck at mail.mcgill.ca
Sat May 12 19:54:38 CEST 2018
I think I found a solution the problem I identified in my last email. Maybe this is something everyone knows and that I simply missed in the user docs, but, in case it is not, here is the solution I found.
After digging a bit in the code, I found that the ASCII reader defined in general/include/GateImageT.icc requires a header:
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read ####################################
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read #
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read Matrix
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read Size=
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read values ...
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read #
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read Resol
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read =
G4ThreeVector resol;
is >> resol;
//GateDebugMessage("Image",8,"Resol = " << resol << Gateendl);
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read #
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read VoxelSize
is >> s ;// GateDebugMessage("Image",8,s<< Gateendl); // read =
G4ThreeVector voxsize;
is >> voxsize;
//GateDebugMessage("Image",8,"VoxelSize = " << voxsize << Gateendl);
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read #
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read nbVal
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read =
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read value
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read ####################################
So I added the following header to the ASCII file I had been using with Gate 7.1.
####################################
#
#Matrix
#Size=
#values...
#
#Resol
#=
96 120 128
#
VoxelSize
=
2.0 2.0 2.0
#
nbVal
=
value
####################################
The voxel reader now seems to read my voxelized source correctly
Voxel reader ----------> image
number of voxels : 1474560
total activity (Bq) : 1.060e+08
position (mm) : 0.000e+00 0.000e+00 0.000e+00
voxel size (mm) : 2.000e+00 2.000e+00 2.000e+00
Also important to note is that (I think) the reader assumes a X,Y,Z dimension order because the dimension ordering used by the G4ThreeVector. Please correct me if I am mistaken as I am not familiar with the details of Gate implementation.
Best,
Thomas
________________________________
From: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> on behalf of gate-users-request at lists.opengatecollaboration.org <gate-users-request at lists.opengatecollaboration.org>
Sent: Saturday, May 12, 2018 6:00 AM
To: gate-users at lists.opengatecollaboration.org
Subject: Gate-users Digest, Vol 144, Issue 17
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. Defining voxelized source for Gate v8.2 (Thomas Funck)
----------------------------------------------------------------------
Message: 1
Date: Fri, 11 May 2018 19:22:53 +0000
From: Thomas Funck <thomas.funck at mail.mcgill.ca>
To: "gate-users at lists.opengatecollaboration.org"
<gate-users at lists.opengatecollaboration.org>
Subject: [Gate-users] Defining voxelized source for Gate v8.2
Message-ID:
<YTXPR01MB0480F88FB7B365671583D4A4A69F0 at YTXPR01MB0480.CANPRD01.PROD.OUTLOOK.COM>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
I'm having problems getting Gate to read ASCII/Analyze/Interfile voxelized sources. The problem is that the "number of voxels" in the "Voxel reader" is 0 :
Voxel reader ----------> image
number of voxels : 0
total activity (Bq) : 0.000e+00
position (mm) : 0.000e+00 0.000e+00 0.000e+00
voxel size (mm) : 0.000e+00 0.000e+00 0.000e+00
I've been using the same voxelized source in ASCII with Gate 7.1 with no problems. So my question is, why does my source work in Gate v.7.1, but not in Gate v8.2?
Thanks in advance for any help!
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20180511/5c739fbb/attachment-0001.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 144, Issue 17
*******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20180512/3e0f2df3/attachment.html>
More information about the Gate-users
mailing list