[Gate-users] How to compile a new geometry class?
David Sarrut
David.Sarrut at creatis.insa-lyon.fr
Thu Jun 1 10:38:59 CEST 2017
Hello,
if you envisaged to add some specific volume to Gate, here are some hints:
- You should create a class that derive from GateVVolume
<https://github.com/OpenGATE/Gate/blob/develop/source/geometry/src/GateVVolume.cc>
- Take for example an GateBox
<https://github.com/OpenGATE/Gate/blob/develop/source/geometry/src/GateBox.cc>
(or
other) as template, copy the 4 files GateBox.cc/hh +
GateBoxMessenger.cc/hh, of course change the class & file name
- Take care to the two macros: FCT_FOR_AUTO_CREATOR_VOLUME
and MAKE_AUTO_CREATOR_VOLUME in the hh file, those "magic" lines will allow
for your new volume to be automatically
compiled and recognised
- When adding files for the first time, run cmake before make.
- I highly highly highly recommend to start any modification from a new git
branch (derived from the develop <https://github.com/OpenGATE/Gate> branch)
When you are happy with the result, feel free to propose a pull-request so
that your new volume could be integrated in the next version and useful for
others
HTH,
David
On Thu, Jun 1, 2017 at 10:27 AM, Andrew Nixon <Andrew.Nixon at uhb.nhs.uk>
wrote:
> Hi Andreas,
>
> Just to add a third option to your list: if you have a CAD model of your
> collimator you can import it directly into Gate as a tessellated solid via
> an .STL file.
>
> Thanks,
>
> Andrew.
>
> Andrew Nixon
> Medical Physics - Clinical Scientist
>
>
> Internal: 15068
> Email: Andrew.Nixon at uhb.nhs.uk
> Web: http://www.uhb.nhs.uk
>
>
> Medical Physics - University Hospitals Birmingham NHS Foundation Trust
>
> Birmingham, B15 2TH
>
>
>
> -----Original Message-----
> From: Gate-users [mailto:gate-users-bounces at lists.opengatecollaboration.
> org] On Behalf Of Andreas Menzel
> Sent: 01 June 2017 08:40
> To: Gate-users at lists.opengatecollaboration.org
> Subject: [Gate-users] How to compile a new geometry class?
>
> Dear Gate community,
>
> probably this has been asked before, but it seems I cannot use the mailing
> list's archive.
>
> So, can someone please tell me where to find instructions on how to
> compile a newly added class in Gate? I don't seem to find it in the online
> documentation, either.
>
> To be specific, I am supposed to do a simulation which contains a rather
> complex collimator. As the Gate scripting language does not seem to support
> what I am trying to do, I decided to use two different ways and try out
> which one works better: The first one is to use Geant4's boolean solids and
> do subtractions of geometry primitives. The second would be to load a GDML
> file containing the geometry which also can be done in Geant4. I only
> started the first one and I wrote a Gate geometry class and a messenger
> connected to it as well as the necessary header files.
>
> Now, is there some template makefile / CMakeLists.txt I could use to
> actually compile these and test them? Or do I just put the sources into the
> location of the other Gate sources and re-make the whole thing so that the
> new files are compiled?
>
> Thanks for your help!
>
> Andreas Menzel
>
> --
> Dr. Andreas Menzel
>
> Crystal Photonics GmbH
> Albert Einstein Straße 16
> D - 12489 Berlin
> Germany
>
> FAX.: +49 (0) 30 34669299
>
> am at crystal-photonics.com
> www.crystal-photonics.com
> -------------------------
> Geschäftsführer: Klaus Schwenkenbecher
> Amtsgericht Berlin-Charlottenburg HRB 99822B
> Steuer-Nr.: 37/109/21041
> VAT-No.: DE 814612031
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>
--
David Sarrut, Phd
Directeur de recherche CNRS
CREATIS, UMR CNRS 5220, Inserm U1206
Centre de lutte contre le cancer Léon Bérard
28 rue Laënnec, 69373 Lyon cedex 08
Tel : 04 78 78 51 51 / 06 74 72 05 42
http://www.creatis.insa-lyon.fr/~dsarrut
_________________________________
"2 + 2 = 5, for extremely large values of 2"
_________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20170601/c449c929/attachment.html>
More information about the Gate-users
mailing list