<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">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.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">After digging a bit in the code, I found that the ASCII reader defined in
<span>general/include/GateImageT.icc</span> requires a header:<span></span><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div> is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read ####################################<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read #<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read Matrix<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read Size=<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read values ...<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read #<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read Resol<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read =<br>
G4ThreeVector resol;<br>
is >> resol;<br>
//GateDebugMessage("Image",8,"Resol = " << resol << Gateendl);<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read #<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read VoxelSize<br>
is >> s ;// GateDebugMessage("Image",8,s<< Gateendl); // read =<br>
G4ThreeVector voxsize;<br>
is >> voxsize;<br>
//GateDebugMessage("Image",8,"VoxelSize = " << voxsize << Gateendl);<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read #<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read nbVal<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read =<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read value<br>
is >> s ; //GateDebugMessage("Image",8,s<< Gateendl); // read ####################################<br>
<br>
</div>
<br>
<p></p>
So I added the following header to the ASCII file I had been using with Gate 7.1.<br>
<br>
<div>####################################<br>
#<br>
#Matrix<br>
#Size=<br>
#values...<br>
#<br>
#Resol<br>
#=<br>
96 120 128<br>
#<br>
VoxelSize<br>
=<br>
2.0 2.0 2.0<br>
#<br>
nbVal<br>
=<br>
value<br>
####################################</div>
<br>
<br>
The voxel reader now seems to read my voxelized source correctly<br>
<br>
<div> Voxel reader ----------> image<br>
number of voxels : 1474560<br>
total activity (Bq) : 1.060e+08<br>
position (mm) : 0.000e+00 0.000e+00 0.000e+00<br>
voxel size (mm) : 2.000e+00 2.000e+00 2.000e+00</div>
<br>
<br>
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.<br>
<br>
Best,<br>
<br>
Thomas<br>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Gate-users <gate-users-bounces@lists.opengatecollaboration.org> on behalf of gate-users-request@lists.opengatecollaboration.org <gate-users-request@lists.opengatecollaboration.org><br>
<b>Sent:</b> Saturday, May 12, 2018 6:00 AM<br>
<b>To:</b> gate-users@lists.opengatecollaboration.org<br>
<b>Subject:</b> Gate-users Digest, Vol 144, Issue 17</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Send Gate-users mailing list submissions to<br>
gate-users@lists.opengatecollaboration.org<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" id="LPlnk369318" class="OWAAutoLink" previewremoved="true">
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
gate-users-request@lists.opengatecollaboration.org<br>
<br>
You can reach the person managing the list at<br>
gate-users-owner@lists.opengatecollaboration.org<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Gate-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Defining voxelized source for Gate v8.2 (Thomas Funck)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 11 May 2018 19:22:53 +0000<br>
From: Thomas Funck <thomas.funck@mail.mcgill.ca><br>
To: "gate-users@lists.opengatecollaboration.org"<br>
<gate-users@lists.opengatecollaboration.org><br>
Subject: [Gate-users] Defining voxelized source for Gate v8.2<br>
Message-ID:<br>
<YTXPR01MB0480F88FB7B365671583D4A4A69F0@YTXPR01MB0480.CANPRD01.PROD.OUTLOOK.COM><br>
<br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi,<br>
<br>
<br>
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 :<br>
<br>
<br>
Voxel reader ----------> image<br>
number of voxels : 0<br>
total activity (Bq) : 0.000e+00<br>
position (mm) : 0.000e+00 0.000e+00 0.000e+00<br>
voxel size (mm) : 0.000e+00 0.000e+00 0.000e+00<br>
<br>
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?<br>
<br>
<br>
Thanks in advance for any help!<br>
<br>
<br>
Thomas<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20180511/5c739fbb/attachment-0001.html" id="LPlnk265941" class="OWAAutoLink" previewremoved="true">http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20180511/5c739fbb/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Gate-users mailing list<br>
Gate-users@lists.opengatecollaboration.org<br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" id="LPlnk846498" class="OWAAutoLink" previewremoved="true">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
<br>
------------------------------<br>
<br>
End of Gate-users Digest, Vol 144, Issue 17<br>
*******************************************<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>