<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D">Hi!</span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D"> </span></p>
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D">Sorry for my ignorance: what are “backscatter
effects at the water-air interface", how should those effects look like in the VV images that you sent in the first mail in this thread? What physics cuts (range, energy, stepsize) are you using, and what is the configuration of "stepHitType" in the dose actor
(mid, pre, post, random)?</span></div>
<div><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D"><br>
</span></div>
<div><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D">To me it looks like you provide "<span>buildAndDumpLabeledImage</span>"
with the same (output) filename as the input image, so maybe you don't see any output because instead of producing a new file it overwrote the input file?</span></div>
<div><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D"><br>
</span></div>
<div><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D">In the first mail in this thread, the
text output about the three materials ("worldDefaultAir", "Air" and "Water") seems to be printed by the main "GateDetectorConstruction" class, not by the class that directly manages voxelized images. This printout is produced by looping over "the material
database", which is a dictionary-like object that contains all materials that have been defined or looked up during the simulation run (and the input for that table might come from the collection of Geant4/NIST materials and/or from text files such as "GateMaterials.db").
Some grepping in the code shows that the constructor of the base class for image volumes (including the <span>ImageNestedParametrisedVolume</span> class) initially sets the material of the volume to "Air", and by doing that, "Air" lands in the material database.
Afterwards the derived class may define materials different from "Air" in the entire volume ("Water" and "worldDefaultAir" in your case), but once "Air" is in the database it stays there until the simulation run ends, even if it's not actually used anymore.</span></div>
<div><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D"><br>
</span></div>
<div><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D">(Now why are "Air" and "worldDefaultAir"
actually referring to different materials, with e.g. slightly different ionization potential, instead of just two different names for the same materials? That's a topic for a new discussion. This mail was supposed to be a short response and it got way longer
than I intended...)<br>
</span></div>
<p></p>
<p><br>
</p>
<div><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D">HTH,</span></div>
<div><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;
mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:
"Times New Roman";mso-bidi-theme-font:minor-bidi;color:#1F497D">David B.</span><br>
</div>
<p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Gate-users <gate-users-bounces@lists.opengatecollaboration.org> im Auftrag von Matthew Strugari <matthew.strugari@dal.ca><br>
<b>Gesendet:</b> Montag, 2. März 2020 18:54:45<br>
<b>An:</b> David Boersma; David.Sarrut@creatis.insa-lyon.fr<br>
<b>Cc:</b> gate-users@lists.opengatecollaboration.org<br>
<b>Betreff:</b> Re: [Gate-users] Potential bug in units to materials conversion</font>
<div> </div>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi David,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
No luck with "buildAndDumpLabeledImage". I implemented as <br>
</div>
<blockquote style="margin-top: 0px; margin-bottom: 0px;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
/gate/phantom/geometry/buildAndDumpLabeledImage data/Cropped_kidneyContour_binary.mhd<br>
</div>
</blockquote>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
but there was no associated output.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I assume this is the correct usage as suggested by the --qt viewer.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Matthew<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> David Sarrut <David.Sarrut@creatis.insa-lyon.fr><br>
<b>Sent:</b> March 2, 2020 11:56 AM<br>
<b>To:</b> Matthew Strugari <matthew.strugari@dal.ca>; David Boersma <david.boersma@medaustron.at><br>
<b>Subject:</b> Re: [Gate-users] Potential bug in units to materials conversion</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi Matthew, <br>
</div>
<div><br>
</div>
<div>quick idea: try "buildAndDumpLabeledImage" to see what happens ... <br>
</div>
<div><br>
</div>
<div>DavidB : any idea ? <br>
</div>
<div><br>
</div>
<div>Thanks, <br>
</div>
<div>David<br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Mon, Mar 2, 2020 at 4:33 PM Matthew Strugari <<a href="mailto:matthew.strugari@dal.ca">matthew.strugari@dal.ca</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi everyone,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
As a followup to my previous email, it appears that the bug affects voxelized simulation results. After allowing the simulation to run to completion, the dose distribution due to 40 million Y-90 primaries does not show any back-scatter effects at the air-water
interface. I have attached an image which highlights a couple regions showing the extension of dose into "air". The dose decreases smoothly with distance from the source despite crossing the boundary.
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I use the following lines to define my voxelized phantom:<br>
</div>
<blockquote style="margin-top:0px; margin-bottom:0px">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>/gate/world/daughters/name phantom<br>
</span>
<div>/gate/world/daughters/insert ImageNestedParametrisedVolume<br>
</div>
<div>/gate/phantom/geometry/setImage data/Cropped_kidneyContour_binary.mhd<br>
</div>
<div>/gate/phantom/geometry/TranslateTheImageAtThisIsoCenter 0 0 0 mm<br>
</div>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>/gate/phantom/geometry/setRangeToMaterialFile data/KidneyAttenuationRange.dat</span></div>
</blockquote>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
<span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I have also changed the attenuation range to overlap with values near 0 and 1 in case of any floating point errors to no avail. If anyone sees any mistakes in my phantom definition or has encountered similar issues, please let me know. I am not sure what to
do about this.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Matthew<br>
</div>
<div>
<div id="x_gmail-m_-5033725829893929921appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block; width:98%">
<div id="x_gmail-m_-5033725829893929921divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Gate-users <<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a>>
on behalf of Matthew Strugari <<a href="mailto:matthew.strugari@dal.ca" target="_blank">matthew.strugari@dal.ca</a>><br>
<b>Sent:</b> February 28, 2020 12:43 PM<br>
<b>To:</b> <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">
gate-users@lists.opengatecollaboration.org</a> <<a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a>><br>
<b>Subject:</b> [Gate-users] Potential bug in units to materials conversion</font>
<div> </div>
</div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Dear gate-users,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
There appears to be an issue when defining the associated material for each voxel in an image. I have loaded a binary image with the units to materials conversion defined in a AttenuationRange.dat file:</div>
<blockquote style="margin-top:0px; margin-bottom:0px">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>2<br>
</span>
<div>0 0 worldDefaultAir<br>
</div>
<span>1 1 Water</span></div>
</blockquote>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>I have also set the world material as worldDefaultAir resulting in a total of two defined materials throughout my entire simulation. When executing my macro, there is a message stating that 3 materials are in the image:</span></div>
<blockquote style="margin-top:0px; margin-bottom:0px">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><span>[Volume-1] Number of different materials in the image data/Cropped_contour_binary.mhd : 3<br>
</span>
<div>[Physic-1] <br>
</div>
<div>[Physic-1] ----------------------------------------------------------<br>
</div>
<div>[Physic-1] Ionization potential <br>
</div>
<div>[Physic-1] - worldDefaultAir defaut value: I = 85.7031 eV <br>
</div>
<div>[Physic-1] - Air defaut value: I = 85.6694 eV <br>
</div>
<div>[Physic-1] - Water defaut value: I = 68.9984 eV <br>
</div>
<span>[Physic-1] ----------------------------------------------------------</span><br>
</span></div>
</blockquote>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span></span>Has anyone else noticed this issue? I don't know if it's possible to verify what voxels are assigned to what material. It would be nice to see the total number of voxels assigned to a given material at run time.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Best,<br>
</div>
<div id="x_gmail-m_-5033725829893929921x_Signature">
<div id="x_gmail-m_-5033725829893929921x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top:0px; margin-bottom:0px"><span style="font-family:Calibri,Helvetica,sans-serif">Matthew</span></p>
<span style="font-family:Calibri,Helvetica,sans-serif"></span>
<p style="margin-top:0px; margin-bottom:0px"></p>
<span style="font-family:Calibri,Helvetica,sans-serif"></span>
<p style="margin-top:0px; margin-bottom:0px"><span style="font-size:10.5pt; color:black; font-family:Calibri,Helvetica,sans-serif"><br>
</span></p>
<span style="font-family:Calibri,Helvetica,sans-serif"></span>
<p style="margin-top:0px; margin-bottom:0px"><span style="font-size:10.5pt; color:black; font-family:Calibri,Helvetica,sans-serif">--</span></p>
<span style="font-family:Calibri,Helvetica,sans-serif"></span>
<p style="margin-top:0px; margin-bottom:0px"><span style="font-size:10.5pt; color:black; font-family:Calibri,Helvetica,sans-serif">Matthew Strugari</span><span style="font-size:10.5pt; color:black"></span></p>
<span style="font-family:Calibri,Helvetica,sans-serif"></span><span style="font-size:10.5pt; color:black" lang="EN-US"><span style="font-family:Calibri,Helvetica,sans-serif">Biomedical Translational Imaging Centre -
</span><span style="background-color:rgb(255,255,255); color:black; font-family:Calibri,Helvetica,sans-serif">BIOTIC</span><span style="font-family:Calibri,Helvetica,sans-serif">,</span><br>
<span style="font-family:Calibri,Helvetica,sans-serif">5890 University Ave, </span><br>
<span style="font-family:Calibri,Helvetica,sans-serif">Halifax, NS, B3K 6R8</span></span><br>
<p style="margin-top:0px; margin-bottom:0px"></p>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<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></blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">David Sarrut, Phd<br>
Directeur de recherche CNRS<br>
CREATIS, UMR CNRS 5220, Inserm U1206
<div>Centre de lutte contre le cancer Léon Bérard<br>
28 rue Laënnec, 69373 Lyon cedex 08<br>
Tel : 04 78 78 51 51 / 06 74 72 05 42<br>
<a href="http://www.creatis.insa-lyon.fr/~dsarrut" target="_blank">http://www.creatis.insa-lyon.fr/~dsarrut</a><br>
_________________________________</div>
<div> "2 + 2 = 5, for extremely large values of 2"<br>
_________________________________</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>