[Gate-users] STL file for detector
Matthew Strugari
matthew.strugari at dal.ca
Wed Aug 14 20:49:59 CEST 2019
Hi again Sveta,
I created the lsobox with the Blender software just to verify your geometry. Your units appear to be in um rather than mm as previously mentioned. Nonetheless, Gate fails to execute the macro file past these lines when using the STL files:
# A T T A C H S Y S T E M
/gate/systems/cylindricalPET/rsector/attach head
/gate/systems/cylindricalPET/module/attach block
/gate/systems/cylindricalPET/crystal/attach crystal
/gate/systems/cylindricalPET/layer0/attach LSOcrystal
/gate/systems/cylindricalPET/layer1/attach BGO
I was able to visualize the geometry without the SegFault after removing those lines. I am unsure if this a bug in the cylindricalPET system so I am hoping someone else can give some input on this. Perhaps the commands to attach the system haved changed (?) but I am really only familiar with the SPECThead system.
I hope this helps.
Matthew
From: Gate-users <gate-users-bounces at lists.opengatecollaboration.org> on behalf of Matthew Strugari <matthew.strugari at dal.ca>
Date: Wednesday, August 14, 2019 at 3:12 PM
To: "Svetlana G. Shasharina" <sveta at txcorp.com>
Cc: "gate-users at lists.opengatecollaboration.org" <gate-users at lists.opengatecollaboration.org>
Subject: Re: [Gate-users] STL file for detector
Hi Svetlana,
I cannot speak to the examples without testing them myself. However, when using your STL files, the first warning suggests that the Materials.xml file is not located in the folder where you are executing “Gate PET_CYlindricalPet_System.mac”. You can copy the .xml files into your directory or use softlinks to reference the location of the .xml files in order to avoid different versions of the materials/surface files should you make any edits.
When loading your STL files, I also receive the SegFault but I suspect that the problem is due to your STL files. When I load the lsobox STL files into Slicer 3D, the long axis has a length of 0.15 mm rather than the desired 15 mm. What program did you use to create your STL files and have you verified their dimensions and orientations for loading directly into Gate?
Cheers,
Matthew
From: "Svetlana G. Shasharina" <sveta at txcorp.com>
Date: Wednesday, August 14, 2019 at 1:20 PM
To: Matthew Strugari <matthew.strugari at dal.ca>
Cc: "gate-users at lists.opengatecollaboration.org" <gate-users at lists.opengatecollaboration.org>, Peter Neilson <neilson at txcorp.com>
Subject: Re: [Gate-users] STL file for detector
Hi everybody,
I tried to run the kidney example under:
GateContrib-master/misc/geometry_STL/kidneys and got the following error:
Core-0] Initialization of geometry
[G4-cerr] STL file corrupted: number of facets do not correspond to file size.
^Z
[2]+ Stopped Gate mac/main.mac
I am getting the same message for the Suzanne example.
Next I tried to use STL files (binary and asci STLs attached) instead of the "LSO" box in GateContrib-master/imaging/PET/PET_CylindricalPET_System.mac by doing the following editing:
# LSO layer
/gate/crystal/daughters/name LSO
#/gate/crystal/daughters/insert box
/gate/crystal/daughters/insert tessellated
/gate/LSO/placement/setTranslation -0.75 0.0 0.0 cm
/gate/LSO/geometry/setPathToSTLFile lsobox.stl
#/gate/LSO/geometry/setXLength 15 mm
#/gate/LSO/geometry/setYLength 3.0 mm
#/gate/LSO/geometry/setZLength 3.8 mm
/gate/LSO/setMaterial LSO
/gate/LSO/vis/setColor red
This example does not run anymore (it does when it uses the original box) and I am getting:
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.
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.
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.
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.
*** Break *** illegal instruction
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[<unknown binary>] (no debug info)
[/opt/contrib-appleclang/gate-8.2/bin/Gate] GateSystemComponent::SetCreator(GateVVolume*) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] G4UIcommand::DoIt(G4String) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] G4UImanager::ApplyCommand(char const*) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] G4UIbatch::ExecCommand(G4String const&) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] G4UIbatch::SessionStart() (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] G4UImanager::ExecuteMacroFile(char const*) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] G4UIcommand::DoIt(G4String) (no debug info)
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib] G4UImanager::ApplyCommand(char const*) (no debug info)
[/opt/contrib-appleclang/gate-8.2/bin/Gate] main (no debug info)
[/usr/lib/system/libdyld.dylib] start (no debug info)
[<unknown binary>] (no debug info)
[LSO::IsValidAttachmentRequest]:
The volume creator ('?sveta at bladerunner/.../PET$
Does anybody have a working example with STL geometry?
Thank you,
Svetlana
On 8/8/19 5:09 PM, Matthew Strugari wrote:
Hi Svetlana,
Take a look at the section How to build a "tessellated" volume on the wiki page http://wiki.opengatecollaboration.org/index.php/Users_Guide:Defining_a_geometry. The sample code is from the GateContrib GitHub repository as outlined on the wiki.
Cheers,
Matthew
--
Matthew Strugari
Biomedical Translational Imaging Centre - BIOTIC,
5890 University Ave,
Halifax, NS, B3K 6R8
On Aug 8, 2019, at 6:28 PM, Svetlana G. Shasharina <sveta at txcorp.com<mailto:sveta at txcorp.com>> wrote:
Hello,
Is there a way to use an STL file for the detector geometry?
Thank you,
Sveta
--
Svetlana Shasharina | sveta at txcorp.com<mailto:sveta at txcorp.com>
Vice-President of Computational Infrastructure | Tech-X Corporation
_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org>
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
--
Svetlana Shasharina | sveta at txcorp.com<mailto:sveta at txcorp.com>
Vice-President of Computational Infrastructure | Tech-X Corporation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190814/a94285c3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lsobox_blender.stl
Type: application/octet-stream
Size: 684 bytes
Desc: lsobox_blender.stl
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190814/a94285c3/attachment-0001.obj>
More information about the Gate-users
mailing list