<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi all, <div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Thank you.</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Ashok<br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 14, 2019, at 2:19 PM, Maxime Chauvin <<a href="mailto:maxime.chauvin@inserm.fr" class="">maxime.chauvin@inserm.fr</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="auto" class="">Dear Sveta,<div dir="auto" class=""><br class=""></div><div dir="auto" class="">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.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">If you need more information on how to get GateContrib properly don't hesitate to ask.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Best regards,</div><div dir="auto" class="">Maxime Chauvin</div><div dir="auto" class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">Le 14 août 2019 8:50 PM, "Svetlana G. Shasharina" <<a href="mailto:sveta@txcorp.com" class="">sveta@txcorp.com</a>> a écrit :<br type="attribution" class=""><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><p class="">Hi Matthew,</p><p class="">I copied Materials.xml into PET directory.  <br class="">
    </p><p class="">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. <br class="">
    </p><p class="">But I succeeded in just adding an STL phantom and now can see it!
      <br class="">
    </p><p class="">Thank you,</p><p class="">Sveta<br class="">
    </p><p class=""><br class="">
    </p><p class=""><br class="">
    </p>
    <div class="">On 8/14/19 12:12 PM, Matthew Strugari
      wrote:<br class="">
    </div>
    <blockquote class="">
      
      
      
      <div class=""><p class="">Hi Svetlana,</p><div class=""> <br class="webkit-block-placeholder"></div><p class="">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.</p><div class=""> <br class="webkit-block-placeholder"></div><p class="">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?</p><div class=""> <br class="webkit-block-placeholder"></div><p class="">Cheers,</p><p class="">Matthew</p><div class=""> <br class="webkit-block-placeholder"></div><div class=""> <br class="webkit-block-placeholder"></div>
        <div style="border:none;border-top:solid #b5c4df 1pt;padding:3pt 0cm 0cm 0cm" class=""><p class=""><b class=""><span style="font-size: 12pt;" class="">From: </span></b><span style="font-size: 12pt;" class="">"Svetlana G.
              Shasharina" <a href="mailto:sveta@txcorp.com" class=""><sveta@txcorp.com></a><br class="">
              <b class="">Date: </b>Wednesday, August 14, 2019 at 1:20 PM<br class="">
              <b class="">To: </b>Matthew Strugari
              <a href="mailto:matthew.strugari@dal.ca" class=""><matthew.strugari@dal.ca></a><br class="">
              <b class="">Cc: </b><a href="mailto:gate-users@lists.opengatecollaboration.org" class="">"gate-users@lists.opengatecollaboration.org"</a>
              <a href="mailto:gate-users@lists.opengatecollaboration.org" class=""><gate-users@lists.opengatecollaboration.org></a>, Peter
              Neilson <a href="mailto:neilson@txcorp.com" class=""><neilson@txcorp.com></a><br class="">
              <b class="">Subject: </b>Re: [Gate-users] STL file for detector</span></p>
        </div>
        <div class=""><div class=""> <br class="webkit-block-placeholder"></div>
        </div><p class="">Hi everybody,</p><p class="">I tried to run the kidney example under:</p><p class="">GateContrib-master/misc/geometry_STL/kidneys and got the
          following error:</p><p class="">Core-0] Initialization of geometry<br class="">
          [G4-cerr] STL file corrupted: number of facets do not
          correspond to file size.<br class="">
          ^Z<br class="">
          [2]+  Stopped                 Gate mac/main.mac</p><p class="">I am getting the same message for the Suzanne example.</p><p class="">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:</p><p class="">#       LSO layer<br class="">
          /gate/crystal/daughters/name                  LSO<br class="">
          #/gate/crystal/daughters/insert                box<br class="">
          /gate/crystal/daughters/insert                tessellated<br class="">
          /gate/LSO/placement/setTranslation            -0.75 0.0 0.0 cm<br class="">
          /gate/LSO/geometry/setPathToSTLFile            lsobox.stl<br class="">
          #/gate/LSO/geometry/setXLength                 15 mm<br class="">
          #/gate/LSO/geometry/setYLength                 3.0 mm<br class="">
          #/gate/LSO/geometry/setZLength                 3.8 mm<br class="">
          /gate/LSO/setMaterial                         LSO<br class="">
          /gate/LSO/vis/setColor                        red</p><p class="">This example does not run anymore (it does when it uses the
          original box) and I am getting:</p><p class="">I/O warning : failed to load external entity
          "./Materials.xml"<br class="">
          I/O warning: Discard the previous warning if your simulation
          doesn't transport OPTICAL PHOTONS.
          <br class="">
          Otherwise, please copy the ./Materials.xml file from the
          gate-source directory in the directory where you run your main
          macro.<br class="">
          I/O warning : failed to load external entity "./Materials.xml"<br class="">
          I/O warning: Discard the previous warning if your simulation
          doesn't transport OPTICAL PHOTONS.
          <br class="">
          Otherwise, please copy the ./Materials.xml file from the
          gate-source directory in the directory where you run your main
          macro.<br class="">
          I/O warning : failed to load external entity "./Materials.xml"<br class="">
          I/O warning: Discard the previous warning if your simulation
          doesn't transport OPTICAL PHOTONS.
          <br class="">
          Otherwise, please copy the ./Materials.xml file from the
          gate-source directory in the directory where you run your main
          macro.<br class="">
          I/O warning : failed to load external entity "./Materials.xml"<br class="">
          I/O warning: Discard the previous warning if your simulation
          doesn't transport OPTICAL PHOTONS.
          <br class="">
          Otherwise, please copy the ./Materials.xml file from the
          gate-source directory in the directory where you run your main
          macro.<br class="">
          <br class="">
           *** Break *** illegal instruction<br class="">
          [/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug
          info)<br class="">
          [<unknown binary>] (no debug info)<br class="">
          [/opt/contrib-appleclang/gate-8.2/bin/Gate]
          GateSystemComponent::SetCreator(GateVVolume*) (no debug info)<br class="">
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIcommand::DoIt(G4String) (no debug info)<br class="">
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UImanager::ApplyCommand(char const*) (no debug info)<br class="">
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIbatch::ExecCommand(G4String const&) (no debug info)<br class="">
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIbatch::SessionStart() (no debug info)<br class="">
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UImanager::ExecuteMacroFile(char const*) (no debug info)<br class="">
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIcontrolMessenger::SetNewValue(G4UIcommand*, G4String) (no
          debug info)<br class="">
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UIcommand::DoIt(G4String) (no debug info)<br class="">
[/opt/contrib-appleclang/geant4-sersh/lib/libG4intercoms.dylib]
          G4UImanager::ApplyCommand(char const*) (no debug info)<br class="">
          [/opt/contrib-appleclang/gate-8.2/bin/Gate] main (no debug
          info)<br class="">
          [/usr/lib/system/libdyld.dylib] start (no debug info)<br class="">
          [<unknown binary>] (no debug info)<br class="">
          [LSO::IsValidAttachmentRequest]:<br class="">
              The volume creator ('?sveta@bladerunner/.../PET$ </p><p class="">Does anybody have a working example with STL geometry?</p><p class="">Thank you,</p><p class="">Svetlana</p>
        <div class=""><p class="">On 8/8/19 5:09 PM, Matthew Strugari
            wrote:</p>
        </div>
        <blockquote style="margin-top:5pt;margin-bottom:5pt" class="">
          <div class=""><p class="">Hi Svetlana, </p>
            <div class=""><div class=""> <br class="webkit-block-placeholder"></div>
            </div>
            <div class=""><p class="">Take a look at the section <span style="font-size:13.5pt" class="">How to build a "tessellated"
                  volume on the wiki page </span><a href="http://wiki.opengatecollaboration.org/index.php/Users_Guide:Defining_a_geometry" class="">http://wiki.opengatecollaboration.org/index.php/Users_Guide:Defining_a_geometry</a>.
                The sample code is from the GateContrib GitHub
                repository as outlined on the wiki.<br class="">
                <br class="">
                Cheers,</p>
            </div>
            <div class=""><p class="">Matthew</p>
            </div>
            <div class=""><div class=""> <br class="webkit-block-placeholder"></div>
            </div>
            <div class=""><p class="">--</p>
            </div>
            <div class=""><p class="">Matthew Strugari</p>
            </div>
            <div class=""><p class="">Biomedical Translational Imaging
                Centre - BIOTIC,</p>
            </div>
            <div class=""><p class="">5890 University Ave, </p>
            </div>
            <div class=""><p class="">Halifax, NS, B3K 6R8</p>
              <div class=""><div class=""> <br class="webkit-block-placeholder"></div>
              </div>
              <div class=""><p style="margin-bottom:12pt" class=""><br class="">
                  On Aug 8, 2019, at 6:28 PM, Svetlana G. Shasharina
                  <<a href="mailto:sveta@txcorp.com" class="">sveta@txcorp.com</a>>
                  wrote:</p>
              </div>
              <blockquote style="margin-top:5pt;margin-bottom:5pt" class="">
                <div class=""><p class="">Hello,<br class="">
                    <br class="">
                    Is there a way to use an STL file for the detector
                    geometry?<br class="">
                    <br class="">
                    Thank you,<br class="">
                    <br class="">
                    Sveta<br class="">
                    <br class="">
                    -- <br class="">
                    Svetlana Shasharina                            | <a href="mailto:sveta@txcorp.com" class="">
                      sveta@txcorp.com</a><br class="">
                    Vice-President of Computational Infrastructure |
                    Tech-X Corporation<br class="">
                    <br class="">
                    _______________________________________________<br class="">
                    Gate-users mailing list<br class="">
                    <a href="mailto:Gate-users@lists.opengatecollaboration.org" class="">Gate-users@lists.opengatecollaboration.org</a><br class="">
                    <a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" class="">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a></p>
                </div>
              </blockquote>
            </div>
          </div>
        </blockquote>
        <pre class="">-- </pre>
        <pre class="">Svetlana Shasharina                            | <a href="mailto:sveta@txcorp.com" class="">sveta@txcorp.com</a></pre>
        <pre class="">Vice-President of Computational Infrastructure | Tech-X Corporation  </pre>
      </div>
    </blockquote>
    <pre class="">-- 
Svetlana Shasharina                            | <a href="mailto:sveta@txcorp.com" class="">sveta@txcorp.com</a>
Vice-President of Computational Infrastructure | Tech-X Corporation  </pre>
  </div>
</blockquote></div><br class=""></div>_______________________________________________<br class="">Gate-users mailing list<br class=""><a href="mailto:Gate-users@lists.opengatecollaboration.org" class="">Gate-users@lists.opengatecollaboration.org</a><br class="">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</div></blockquote></div><br class=""></div></div></body></html>