<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi everyone<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I had some offline comments regarding this fix, which is essentially to re-order the columns in the patient_HU2Mat.dat file such that it starts with the material in the first and then the range (which isn’t the
order in the readthedocs). This has fixed this specific error, but now I get an alternative error whereby I get the repeating message “I find H=-XX in the image, while Hounsfield range stop at -1025”, with XX being a range of numbers between -1024 and up to
at least 180 and probably higher (I only eyeballed the list). Eventually, it reaches the end and complains that the maximum bad fraction is greater than 0 from 45m voxels.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I suspect that I have broken something whilst trying to fix the initial error, so I’m going to retrace my steps and make sure that my HU2Mat files are correct etc. but if anyone has any input or thinks this second
error might be an unrelated issue, please let me know.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thank you<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><b><span style="color:#006871;mso-fareast-language:EN-GB">Mark Baker<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">Senior Clinical Scientist<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">Imaging Physics (Ionising)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">The Clatterbridge Cancer Centre NHS Foundation Trust<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="color:#006871;mso-fareast-language:EN-GB"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">CCCW Tel: 0151 556 5030
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">CCCL Tel: 0151 318 8438<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">Email:
</span><span style="color:#4472C4;mso-fareast-language:EN-GB"><a href="mailto:mark.baker23@nhs.net"><span style="color:#4472C4">mark.baker23@nhs.net</span></a></span><span style="color:#006871;mso-fareast-language:EN-GB">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#4472C4;mso-fareast-language:EN-GB"><a href="https://teams.microsoft.com/l/chat/0/0?users=mark.baker23@nhs.net"><span style="color:#4472C4">Microsoft Teams (click here)</span></a><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Gate-users <gate-users-bounces@lists.opengatecollaboration.org>
<b>On Behalf Of </b>BAKER, Mark (THE CLATTERBRIDGE CANCER CENTRE NHS FOUNDATION TRUST)<br>
<b>Sent:</b> 11 November 2021 11:33<br>
<b>To:</b> gate-users@lists.opengatecollaboration.org<br>
<b>Subject:</b> [Gate-users] Could not find definition of material in material files<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi everyone. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hopefully this is a really easy fix and I’m just being dumb, but I can’t seem to solve me issue. I’m trying to import a DICOM image of a typical NEMA phantom to play with in Gate, and when I run my macro, I get the following error (at the
bottom of the page for space reasons). I’ve based most of my macro off the examples in the readthedocs. My initial thoughts were maybe that some of the locations of the files was incorrect, but moving them around file structure hasn’t helped.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I think the relevant part of my main.mac is: <o:p></o:p></p>
<p class="MsoPlainText">#patient image from voxel CT phantom (import image and convert HU to materials)
<o:p></o:p></p>
<p class="MsoPlainText">/gate/world/daughters/name patientCT <o:p></o:p></p>
<p class="MsoPlainText">/gate/world/daughters/insert ImageNestedParametrisedVolume
<o:p></o:p></p>
<p class="MsoPlainText">/gate/patientCT/geometry/setImage data/dcm/CTDataset/Series_3_CT_WB_3.0_B30f_Inst1.dcm<o:p></o:p></p>
<p class="MsoPlainText">/gate/patientCT/geometry/setRangeToMaterialFile data/patient_HU2Mat.dat
<o:p></o:p></p>
<p class="MsoPlainText">/gate/patientCT/geometry/setHUToMaterialFile data/patient_HU2Mat.dat<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Patient_HU2Mat.dat is only a couple of lines and is very similar to the example in the readthedocs, just adjusted for my CT of the NEMA phantom. I’ve tried different values for CT numbers, and it adjusts the error message accordingly (so
I’m pretty confident that it is this file or part of the mac that is the issue). Air, Water and PMMA are definitely in GateMaterials.db file.<o:p></o:p></p>
<p class="MsoNormal">3<o:p></o:p></p>
<p class="MsoNormal">-1024 -51 Air<o:p></o:p></p>
<p class="MsoNormal">-50 50 Water<o:p></o:p></p>
<p class="MsoNormal">51 1338 PMMA <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Error message:<o:p></o:p></p>
<p class="MsoNormal"><span style="color:black">[Core-0] *************************************************
</span><span style="font-size:12.0pt;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Core-0] <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Core-0] You are using Geant4 version 10.6.1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Core-0] Starting macro mac/main.mac<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">I/O warning : failed to load external entity "./Materials.xml"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">I/O warning: Discard the previous warning if your simulation doesn't transport OPTICAL PHOTONS.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">Otherwise, please copy the ./Materials.xml file from the gate-source directory in the directory where you run your main macro.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Physic-0] The following Geant4's physic-list is enabled :emStandard_opt4<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Core-0] Initialization of geometry<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] Matrix Size= (500,500,348)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] HalfSize= (250,250,174)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] Resol= (512,512,174)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] VoxelSize= (0.976563,0.976563,2)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] Origin= (-250,-464,-981.5)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] planeSize= 262144<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] lineSize= 512<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] nbOfValues= 45613056<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] PixelSize= 4<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">[Image-1] dataSize = 45613056<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">GateMaterialDatabase.cc (l.174): GateMaterialDatabase: could not find the definition for material '-51' in material files<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you very any light you can shed on this.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="color:#006871;mso-fareast-language:EN-GB">Mark Baker<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">Clinical Scientist<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">Imaging Physics (Ionising)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">The Clatterbridge Cancer Centre NHS Foundation Trust<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="color:#006871;mso-fareast-language:EN-GB"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">CCCW Tel: 0151 556 5030
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">CCCL Tel: 0151 318 8438<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB">Email:
</span><span style="color:#4472C4;mso-fareast-language:EN-GB"><a href="mailto:mark.baker23@nhs.net"><span style="color:#4472C4">mark.baker23@nhs.net</span></a></span><span style="color:#006871;mso-fareast-language:EN-GB">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#4472C4;mso-fareast-language:EN-GB"><a href="https://teams.microsoft.com/l/chat/0/0?users=mark.baker23@nhs.net"><span style="color:#4472C4">Microsoft Teams (click here)</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"> <span style="color:#006871"><o:p></o:p></span></span></p>
<p class="MsoNormal"><i><span style="color:#006871;mso-fareast-language:EN-GB">Honorary Lecturer, Dept. of Physics<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span style="color:#006871;mso-fareast-language:EN-GB">University of Liverpool<o:p></o:p></span></i></p>
<p class="MsoNormal"><span style="color:#006871;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><img border="0" width="624" height="163" style="width:6.5in;height:1.6979in" id="Picture_x0020_3" src="cid:image001.jpg@01D7D70B.04FA65D0" alt="CCC email footer April 2021"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"><br>
</span><span style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:EN-GB"><br>
************************************************************************************** ******************************<br>
<br>
This message may contain confidential information. If you are not the intended recipient please:<br>
i) inform the sender that you have received the message in error before deleting it; and
<br>
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).
<br>
Thank you for your co-operation.<br>
<br>
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.<br>
<br>
For more information and to find out how you can switch visit <a href="https://support.nhs.net/article-categories/joining-nhsmail/">
Joining NHSmail – NHSmail Support</a></span><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p> <o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%;margin-left:.45pt;margin-right:.45pt">
<tbody>
<tr style="height:10.5pt;height:px">
<td style="background:#910A19;padding:5.25pt 1.5pt 5.25pt 1.5pt;height:10.5pt">
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.7pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"> <o:p></o:p></span></p>
</td>
<td width="100%" style="width:100.0%;background:#FDF2F4;padding:0cm 3.75pt 0cm 6.25pt;height:10.5pt">
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.7pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:#212121">This message originated from outside of NHSmail. Please do not click links or open attachments unless you recognise the sender and know the content is safe.
</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
</div>
<br>
<font face="Courier New" color="Black" size="2"><br>
************************************************************************************** ******************************<br>
<br>
This message may contain confidential information. If you are not the intended recipient please:<br>
i) inform the sender that you have received the message in error before deleting it; and
<br>
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).
<br>
Thank you for your co-operation.<br>
<br>
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.<br>
<br>
For more information and to find out how you can switch visit <a href="https://support.nhs.net/article-categories/joining-nhsmail/">
Joining NHSmail – NHSmail Support</a><br>
<br>
</font>
</body>
</html>