[Gate-users] Could not find definition of material in material files

BAKER, Mark (THE CLATTERBRIDGE CANCER CENTRE NHS FOUNDATION TRUST) mark.baker23 at nhs.net
Thu Nov 11 16:10:50 CET 2021


Hi everyone

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.

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.

Thank you

Mark Baker
Senior Clinical Scientist
Imaging Physics (Ionising)
The Clatterbridge Cancer Centre NHS Foundation Trust

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>

From: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> On Behalf Of BAKER, Mark (THE CLATTERBRIDGE CANCER CENTRE NHS FOUNDATION TRUST)
Sent: 11 November 2021 11:33
To: gate-users at lists.opengatecollaboration.org
Subject: [Gate-users] Could not find definition of material in material files

Hi everyone.

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.

I think the relevant part of my main.mac is:

#patient image from voxel CT phantom (import image and convert HU to materials)

/gate/world/daughters/name patientCT

/gate/world/daughters/insert ImageNestedParametrisedVolume

/gate/patientCT/geometry/setImage data/dcm/CTDataset/Series_3_CT_WB_3.0_B30f_Inst1.dcm

/gate/patientCT/geometry/setRangeToMaterialFile data/patient_HU2Mat.dat

/gate/patientCT/geometry/setHUToMaterialFile data/patient_HU2Mat.dat

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.
3
-1024 -51 Air
-50 50 Water
51 1338 PMMA

Error message:
[Core-0] *************************************************
[Core-0]
[Core-0] You are using Geant4 version 10.6.1
[Core-0] Starting macro mac/main.mac
I/O warning : failed to load external entity "./Materials.xml"
I/O warning: Discard the previous warning if your simulation doesn't transport OPTICAL PHOTONS.
Otherwise, please copy the ./Materials.xml file from the gate-source directory in the directory where you run your main macro.
[Physic-0] The following Geant4's physic-list is enabled :emStandard_opt4
[Core-0] Initialization of geometry
[Image-1]  Matrix Size= (500,500,348)
[Image-1]  HalfSize= (250,250,174)
[Image-1]  Resol= (512,512,174)
[Image-1]  VoxelSize= (0.976563,0.976563,2)
[Image-1]  Origin= (-250,-464,-981.5)
[Image-1]  planeSize= 262144
[Image-1]  lineSize= 512
[Image-1]  nbOfValues= 45613056
[Image-1]  PixelSize= 4
[Image-1]  dataSize = 45613056
GateMaterialDatabase.cc (l.174): GateMaterialDatabase: could not find the definition for material '-51' in material files

Thank you very any light you can shed on this.

Mark Baker
Clinical Scientist
Imaging Physics (Ionising)
The Clatterbridge Cancer Centre NHS Foundation Trust

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/>



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.



************************************************************************************** ******************************

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/20211111/dce0f09a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 13494 bytes
Desc: image001.jpg
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20211111/dce0f09a/attachment-0001.jpg>


More information about the Gate-users mailing list