[Gate-users] Σχετ: Σχετ: Metaimage (.mhd/.raw) as voxilized source

Konstantinos P. Chatzipapas, MSc konhat88 at yahoo.gr
Thu Jul 27 10:41:26 CEST 2017


Dear Niels,
You must accept that GATE is not perfect. Usually some commands have bugs. Or maybe is better to say that they are special (because someone else has write the C++ code). I would suggest to you to recreate the example that you are based on and change your image-file format to what is used in the example.
Moreover, the source command still uses that command interfile, which does not exists in phantom commands anymore. So, try to stay with the interfile, for the source. 

And also try to use GATE, with the things that you know they work, and then, make changes on them and check if you have better or worse results.
To conclude with the important staff. Use .mhd as phantom format (for speed), and change it to interfile .h33 for your source format. Initialize command is correct.
Kind regards,Konstantinos ----------------------------------------------------- Konstantinos Chatzipapas
    Medical Physicist, MSc
       University of Patras
    web page: Physics Magazine 

    Στις 11:08 π.μ. Πέμπτη, 27 Ιουλίου 2017, ο/η Niels van der Werf <nrvdwerf at gmail.com> έγραψε:
 

 Hello,
Thank you for your quick reply!
The value 1.781E-08 is actually from an example. In this example the interfile is used as the source (with the attached .img file). When I run the original code (so with the E-8 value) no error is presented and I get a beautiful dose distribution in my mouse.
The initialize command is given as shown below, where for completeness I have pasted my main.mac:
/control/execute  mac/verbose.mac
#=====================================================# GEOMETRY#=====================================================/control/execute  mac/geometry.mac
#=====================================================# PHYSICS#=====================================================
/control/execute  mac/physic.mac
#=====================================================# DETECTORS#=====================================================
/control/execute  mac/actor.mac
#=====================================================# INITIALISATION#=====================================================
/gate/run/initialize
#=====================================================# SOURCE :#=====================================================
/control/execute    mac/source18F.mac#/control/execute   mac/source64Cu.mac#/control/execute   mac/source124I.mac#/control/execute   mac/source166Ho.mac#/control/execute mac/sourceNEW.mac
#=====================================================# VISUALISATION#=====================================================/vis/disable#/control/execute  mac/visu.mac
#=====================================================# RANDOM#=====================================================/gate/random/setEngineName MersenneTwister/gate/random/setEngineSeed 765764636453
#=====================================================# START#=====================================================

/gate/application/noGlobalOutput#/gate/application/setTotalNumberOfPrimaries 2000000/gate/application/setTotalNumberOfPrimaries 20000/gate/application/start

exit
I will now look into your proposed page of the user guide. However, I still don’t know how to go from the interfile insert (from the example) to the meta image insert. Do you have any idea how to do this?
Thanks again!
Best,Niels



Op 27 jul. 2017, om 09:52 heeft Konstantinos P. Chatzipapas, MSc <konhat88 at yahoo.gr> het volgende geschreven:
Hello,
You have one error and I have one guess for your problem. 
The error that you have made is that GATE does not accept the value: 1.781E-08. It can only accept values in this format: 0.000001 and probably not smaller.Moreover in the new guide that arb command is not proposed. In contrast, it has this type of commands:
http://wiki.opengatecollaboration.org/index.php/Users_Guide_V8.0:Source#Defining_the_type_of_source ###################### Mode 1: Discrete Spectrum ###################
/gate/source/addsource spectrumLine gps
/gate/source/spectrumLine/gps/particle gamma
/gate/source/spectrumLine/gps/energytype UserSpectrum
/gate/source/spectrumLine/gps/setSpectrumFile ../data/DiscreteSpectrum.txt
/gate/source/spectrumLine/setIntensity 1
 #################### Mode 1: Discrete Spectrum ####################etc.

About the guess, I would like to ask you, where in your code is the command:/gate/run/initialize

Kind regards,Konstantinos ----------------------------------------------------- Konstantinos Chatzipapas
    Medical Physicist, MSc
       University of Patras
    web page: Physics Magazine 

    Στις 10:28 π.μ. Πέμπτη, 27 Ιουλίου 2017, ο/η Niels van der Werf <nrvdwerf at gmail.com> έγραψε:
 

 Hello all,

A couple of days ago I asked a question about voxilized phantoms. I am now one step further in my search. The voxilized phantom is accepted by GATE as an input. However, I cannot get it working as a voxilized source. On the wiki page an example is given for an interfile, but not for a meta image.

My code is as follows (the main change in comparison with the wiki page is in the image declaration after /gate/source/positron/reader/insert):

/gate/source/addSource                                         positron voxel
#/gate/source/positron/reader/insert                             interfile
/gate/source/positron/reader/insert                             image
  
/gate/source/positron/imageReader/translator/insert                      range 
/gate/source/positron/imageReader/rangeTranslator/readTable          data/range_source.dat 
/gate/source/positron/imageReader/rangeTranslator/describe          1
 
# THE FOLLOWING LINE ALLOWS YOU TO INSERT THE IMAGE DATA USING THE APPROPRIATE EXTENSION FILE
/gate/source/positron/imageReader/readFile                                  data/mouse_200microns_134x501x127.mhd
/gate/source/positron/imageReader/verbose                                    1
/gate/source/positron/setPosition                                    -13.4 -50.1 -12.7 mm 

/gate/source/positron/gps/particle                                 e+
/gate/source/positron/gps/angtype                                 iso
/gate/source/positron/gps/energytype                             Arb
#/gate/source/positron/setIntensity                             9.673E-01

/gate/source/positron/gps/histname                             arb

# Warning : probability density (or point wise) and not bin values
/gate/source/positron/gps/histpoint  0.0001    1.781E-08
/gate/source/positron/gps/histpoint  0.00011    4.220E-08
Etc etc etc.

When I run this code, I get no errors, but also no sources. Can anyone see what I’m doing incorrectly?

Thanks for your help in advance!

Best,
Niels van der Werf
_______________________________________________
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/20170727/95263a78/attachment-0001.html>


More information about the Gate-users mailing list