[Gate-users] define a source in a non-regular STL geometry?

Ashok Tiwari tiwarias at yahoo.com
Wed Aug 14 21:38:39 CEST 2019


Hi all, 

I have a non-regular STL geometry of the phantom and would like to fill it with the background source for the simulation. Could you please tell me whether there is a way to do it? Any help would be hugely appreciated.

Thank you.

Regards,
Ashok

> On Aug 14, 2019, at 2:19 PM, Maxime Chauvin <maxime.chauvin at inserm.fr> wrote:
> 
> Dear Sveta,
> 
> your version of the STL file you try to use is likely bad. Maybe you 'simply' downloaded GateContrib from GitHub instead of installing git-lfs and using git-lfs pull to get the GateContrib files.
> 
> If you need more information on how to get GateContrib properly don't hesitate to ask.
> 
> Best regards,
> Maxime Chauvin
> 
> 
> Le 14 août 2019 8:50 PM, "Svetlana G. Shasharina" <sveta at txcorp.com> a écrit :
> Hi Matthew,
> 
> I copied Materials.xml into PET directory.  
> 
> Nice catch about the units in our STL file!  We use meters when create STL...  So I did 2 things wrong here: I should have had 0.015 for m and since GATE expects mm, I should use dimensions 15x3x3.8.  I recreated the STL file and still get the seg fault in this example. 
> 
> But I succeeded in just adding an STL phantom and now can see it! 
> 
> Thank you,
> 
> Sveta
> 
> 
> 
> 
> 
> On 8/14/19 12:12 PM, Matthew Strugari wrote:
> 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> <mailto:sveta at txcorp.com>
> Date: Wednesday, August 14, 2019 at 1:20 PM
> To: Matthew Strugari <matthew.strugari at dal.ca> <mailto:matthew.strugari at dal.ca>
> Cc: "gate-users at lists.opengatecollaboration.org" <mailto:gate-users at lists.opengatecollaboration.org> <gate-users at lists.opengatecollaboration.org> <mailto:gate-users at lists.opengatecollaboration.org>, Peter Neilson <neilson at txcorp.com> <mailto: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 <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 <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  
> -- 
> 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
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20190814/20b6786a/attachment.html>


More information about the Gate-users mailing list