Git Product home page Git Product logo

gatecontrib's Introduction

GateContrib

Warning - This is a user-oriented, collaborative repository of Gate examples. The OpenGate collaboration is not responsible of any contents.

PLEASE INSTALL GIT-LFS FIRST: this is required !
This repository contains data (binary files), stored with git-lfs extension. For most modern Linux distributions there is a standard package for this, e.g. for Ubuntu/Debian do: apt install git-lfs. (If your OS does not have a standard package for git-lfs, then follow the installation instructions on the git-lfs GitHub page.) With git-lfs successfully installed, clone the GateContrib repository with the command git lfs clone https://github.com/OpenGATE/GateContrib.git. If you omit the lfs from the git clone command then the large binary files may not be downloaded correctly.

Gate, based on Geant4 library, allows to perform various Monte-Carlo simulations in the field of medical physics. Gate can be used in numerous ways and for a lot of different applications. This repository contains Gate simulation examples, mostly provided by users, in order to help sharing knowledge.


How to contribute ?

  • Prepare your example as a pull-request. Clone this repository in your github account, commit your example in your cloned repository, then ask us to integrate your proposal via the "New pull request" button.
  • Your simulation must be in a separate folder. You can put it in the folder imaging or dosimetry or misc.
  • Example must contains:
    • a readme.md file that describe the example, the authors, the date and Gate version
    • 3 folders mac/ data/ output/. The first will contains all macros (.mac files), the second all data files needed as input for the simulations. Results should be written in the output/ folder.
    • Simulation should be run by a command such as Gate mac/main.mac
  • It is also possible to contribute via analysis tools. If you developed a killer python script or C++ code useful for Gate simulation, feel free to share it here !

http://www.opengatecollaboration.org

References collaboration papers:


If you encounter some problem while pulling:
The repository was rebased in October 2020. So you can face to pulling problems. You can try one of this solution:

  • If you do not have any modification in your local folder, you can remove and clone again the repository
  • If you do not want to remove your local folder, you can try git reset --hard origin/master to force the pull
  • For expert, you can try to rebase your local commits with the current master branch

In any case, if you have some troubles, do not hesitate to send an issue via Github, we can help you.

gatecontrib's People

Contributors

albertine avatar andiresch avatar anetxe avatar arobert01 avatar bishopwolf avatar blurredchoise avatar brenthuisman avatar cajgfinger avatar canonnervio avatar cmouton avatar crauzerus avatar dhaberl avatar djboersma avatar dsarrut avatar fsmekens avatar grevillotl avatar jstrydhorst avatar jsuhard avatar julienbert avatar kochebina avatar m-dupont avatar marielestockhoff avatar mbferruz avatar mojca avatar patayg avatar sj202988 avatar supernabla avatar tbaudier avatar thomasdeschler avatar uhqd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gatecontrib's Issues

Actor type: ComptonCameraActor doesn't exist!

Somehow the code in "Compton" isn't working because of this. I am using vGate v8.2. It's seems the problem in my vGate?
/gate/actor/addActor ComptonCameraActor [Actor Name]
Thank you

Screenshot at 2020-02-15 13-02-16

COMMAND NOT FOUND

Hello,
I am new learner of geant4 GATE. I just started to follow the GATE users Guide V8.0. The PET example therein is what i am trying to replicate as a first time learner but got this error messages at the Fifth Stage of command:

#Fifth step: Setting-up the digitizer

/gate/digitizer/Singles/insert adder
/gate/digitizer/Singles/insert readout
/gate/digitizer/Singles/readout/setDepth 1

E N E R G Y B L U R R I N G

#/gate/digitizer/Singles/insert blurring
/gate/digitizer/Singles/blurring/setResolution 0.19
/gate/digitizer/Singles/blurring/setEnergyOfReference 511. keV

E N E R G Y W I N D O W

/gate/digitizer/Singles/insert thresholder
/gate/digitizer/Singles/thresholder/setThreshold 350. keV
/gate/digitizer/Singles/insert upholder
/gate/digitizer/Singles/upholder/setUphold 650. keV

ERROR MESSAGES

ERROR: G4VisCommandsViewerZoom::SetNewValue: no current viewer.
ERROR: G4VisCommandsViewerPan::SetNewValue: no current viewer.
ERROR: G4VisCommandsViewerZoom::SetNewValue: no current viewer.
ERROR: G4VisCommandsViewerPan::SetNewValue: no current viewer.
***** COMMAND NOT FOUND </gate/digitizer/Singles/insert adder> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (100)
Error code : 100
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

***** COMMAND NOT FOUND </control/execute mac/geometry.mac> *****

***** Batch is interrupted!! *****

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : UIMAN0123
issued by : G4UImanager::ApplyCommand
Command aborted (100)
Error code : 100
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

[Core-0] End of macro mac/main.mac

Please help me out, the above command was written in geometry.mac file of the mac folder.
Thanks in anticipation

failed to load external entity "./Materials.xml"

please help me for this error.(when I run molecular-therapy-I131 example:)

[Core-0] Starting macro main.mac
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.
[Physic-0] The following Geant4's physic-list is enabled :emstandard_opt3
[Core-0] Initialization of geometry

WARNING ### setSkipEqualMaterials at false !! The Geant4 method is not safe since the release 9.5 - Need to be fixed

WARNING ### setSkipEqualMaterials at false !! The Geant4 method is not safe since the release 9.5 - Need to be fixed

min max 0 18496 material: Air, visible false, rgba(0,0,0)
min max 18497 27749 material: AirBodyInterface, visible true, rgba(0.8,0,0)
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.
min max 27750 37409 material: SoftTissue, visible true, rgba(0,0.8,0)
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.
min max 37410 65535 material: Bones, visible true, rgba(0,0,0.8)
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.
[Core-0] Initialization of physics
[Core-0] Initialization of actors
GateSourceVoxelInterfileReader.cc (l.25): GateSourceVoxelInterfileReader is obsolete, use GateSourceVoxelImageReader instead!

use ct dicom in gate for dosimetry and rt simulation

Hi everyone
I want use 90 slice of ct dicom(head) in gate as a phantom for dosimetry like example 2 but i dont now how use them
is there any way to convert these 90 dicom into 1 dicom for attaching actor?cuz I want gate simulate head of patient
or is thee any way or command to use all dicom and attach dose actor to them for dosimetry?
Thanks for Your help

No reading from CT output file

Dear all,
Previously I used OpenGATE which was ten years ago.

recently I relaunch it and tried to modify the code since version is much different.

However, in my CT output data, while read it via MATLAB, there is no reading inside at all.

Even I used example code from this website, same problem occurs.

I used it one ubuntu virtual box Gate v9.3

Can anyone help me? I have been stuck for 2 month.... Appreciate :)

Gamma Camera Simulation Output Data

Hello Dear Experts
I have simulate a gamma camera but i am unable to analyse the output data (Spectra of a radionuclide, Counts per second in a given peak of spectra).
Please help me for the same.

Thanks in advance

About usage of LUTDavisModel

Hi, recently I want to do some optical simulation about the scintillation photon of CsI(Tl) crystal. I want to use the LUTDavisModel, and I notice that in the example you use LSO crystal. Also I notice that Davis University provides a Matlab application to generate LUT data. In the application I saw place to customize crystal with emission spectrum and refractive index spectrum. This raise the question that does the LUTDavisModel data inside Geant4 applies to crystal other than LSO, like CsI(Tl)? Do I need to generate data with the Matlab tool and use that instead?

/dosimetry/Radioteraphy/example2 issue with lfs

Hello everyone,

I meet the same question with the closed issue /dosimetry/Radioteraphy/example2 issue with GateVImageVolume.cc #29.

I tried installing LFS and clonethe GateContrib repository with the command git lfs clone https://github.com/OpenGATE/GateContrib.git

Everything seems to be successfull, but when i tried to run the exemple two again, it prompt the same error as before. I tried ls -l in the file data, and patient-2mm.raw file always has a size of only 132 bytes like before.

How can I solve this question?

Thank you in advance.

Problem with Gate installation on Linux

I installed Gate with: sudo snap install gate
After that I am able to open the program, but if I try to execute a macro, I always get the following error:
I/O error : Permission denied
I/O error : Permission denied
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 tried to open the program as sudo, but than he doesn't even find my macro anymore. I had this problem on two different computers now. Any ideas, what could fix the problem? I am totally new to this kind of simulating and programing, so maybe it's a stupid question.
Thank you!

Opening mhd/raw output files

What software should be used for opening .mhd/.raw output files?
I've tried multiple softwares but none of them showed desired results. I've tested it with output files from dosimetry examples.

I would like to see 3D images like in the picture below:

mp1617-fig-0003-m

Issue with GateVImageVolume.cc (l.734)

I've got the following error when running Gate:

GateVImageVolume.cc (l.734): I find R=251 in the image, while range start at 250
These two numbers always differ by one.

[ziyanche@comic2 Test_0_2]$ Gate main_D690.mac -a [SimuId,1]
[G4] 
[G4] **************************************************************
[G4]  Geant4 version Name: geant4-10-07-patch-03    (19-November-2021)
[G4]                        Copyright : Geant4 Collaboration
[G4]                       References : NIM A 506 (2003), 250-303
[G4]                                  : IEEE-TNS 53 (2006), 270-278
[G4]                                  : NIM A 835 (2016), 186-225
[G4]                              WWW : http://geant4.org/
[G4] **************************************************************
[G4] 
[Core-0] Initialization of geometry
[Core-0] Initialization of physics
[Core-0] Initialization of actors
[Core-0] 
[Core-0] *************************************************
[Core-0]  GATE version 9.1 (2021)
[Core-0]  Copyright : OpenGATE Collaboration
[Core-0]  Reference : Phys. Med. Biol. 49 (2004) 4543-4561
[Core-0]  Reference : Phys. Med. Biol. 56 (2011) 881-901
[Core-0]  Reference : Med. Phys. 41(6)    (2014)
[Core-0]  http://www.opengatecollaboration.org        
[Core-0] *************************************************
[Core-0] 
[Core-0] You are using Geant4 version 10.7.3
/control/alias SimuId 1
[Core-0] Starting macro main_D690.mac

GATE object:        'systems/cylindricalPET'
Components:

GATE object:        'systems/cylindricalPET/base'
Attached to volume: cylindricalPET
Nb of children:       1

	GATE object:        'systems/cylindricalPET/rsector'
	Attached to volume: rsector
	Nb of children:       1

		GATE object:        'systems/cylindricalPET/module'
		Attached to volume: module
		Nb of children:       1

			GATE object:        'systems/cylindricalPET/submodule'
			Attached to volume: ---
			Nb of children:       1

				GATE object:        'systems/cylindricalPET/crystal'
				Attached to volume: crystal
				Nb of children:       4

					GATE object:        'systems/cylindricalPET/layer0'
					Attached to volume: ---
					Nb of children:       0

					GATE object:        'systems/cylindricalPET/layer1'
					Attached to volume: ---
					Nb of children:       0

					GATE object:        'systems/cylindricalPET/layer2'
					Attached to volume: ---
					Nb of children:       0

					GATE object:        'systems/cylindricalPET/layer3'
					Attached to volume: ---
					Nb of children:       0
geometrical design type: 1
ring diameter: 81.02 cm 
rsector axial pitch: 0 fm 
rsector azimuthal pitch: 5.625 degree
rsector tangential size: 3.996 cm 
rsector axial size: 15.696 cm 
module axial size: 3.924 cm 
module tangential size: 3.996 cm 
module axial pitch: 3.924 cm 
module tangential pitch: 0 fm 
submodule axial size: 3.924 cm 
submodule tangential size: 3.996 cm 
submodule axial pitch: 0 fm 
submodule tangential pitch: 0 fm 
crystal radial size: 2.5 cm 
crystal axial size: 6.54 mm 
crystal tangential size: 4.44 mm 
crystal axial pitch: 6.54 mm 
crystal tangential pitch: 4.44 mm 
Axial nb of rsectors: 1
Azimuthal nb of rsectors: 64
Axial nb of modules: 4
Tangential nb of modules: 1
Axial nb of submodules: 1
Tangential nb of submodules: 1
Axial nb of crystals: 6
Tangential nb of crystals: 9
Radial nb of layers: 0
[Physic-0] The following Geant4's physic-list is enabled :emlivermore


List of Enabled processes:




List of initialized processes:


[Core-0] Initialization of geometry
 Header read from       'AtnGate1.h33'
 Data file name         'AtnGate1.bin'
 Nb of planes:           64
 Nb of pixels per plane: 64 64
 Pixel size:             1 1
 Slice thickness:        1
 Matrix size:            64 64
 Data type:              FLOAT
 Bytes per pixel:        4
 Data byte order:        LITTLEENDIAN
 Machine byte order:     LITTLEENDIAN

GateVImageVolume.cc (l.734):  I find R=251 in the image, while range start at 250

Thank you in advance.

ComptonCamera : sequenceCoincidence's time is negative

The output of a Compton camera outputs in four forms: Hits,Singles,Coincidence,and sequenceCoincidence. When we convert the root format of these four outputs to text format, there are a lot of negative Numbers in the time information in the text document. There should be no problem with format conversion. I can't understand why the time information is negative. I hope you can give me some guidance. Thanks!!

why is LUTDavisModel changed?

hi, I'm trying to do some optical simulation with Gate and want to find some examples. I tries to run LUTDavisModel example and it fails and says

The optical surface 'RoughTeflon_LUT' could not be created!
The optical surface 'RoughTeflon_LUT' could not be created!
The optical surface 'Detector_LUT' could not be created!
The optical surface 'Detector_LUT' could not be created!

after a while I noticed that @kochebina had changed Surface.xml and it seemed to me caused that problem. I notice that there are two ways of optical surface definition in Gate: the LUTDavis one and the UNIFIED one. It seems to me the change looks like an UNIFIED one, while the example is about the LUTDavis Model. Could you explain why that change is made? I uses Gate 9.3 from vGate.

/dosimetry/Radioteraphy/example2 issue with GateVImageVolume.cc

I've got the following error when running example 2:

[Core-0] Initialization of geometry
MetaImage: M_ReadElementsData: data not read completely
   ideal = 3524472 : actual = 132
GateVImageVolume.cc (l.386): The image contains HU indices out of range of the HU range found in /home/user/Gate/examples/example2/data/patient-HU2mat.txt
HU    min, max: -1, 3001
Image min, max: 0, 31337
Abort.

Sistem configuration:
Ubuntu 18.04
gcc 7.4
root version 6.08 (also tried with 6.16 and 6.18)
Geant 4.10.03

Thank you in advance.

Missing phantom.mhd in /dosimetry/Radiotherapy/example10/data

Hello,

I'm working on my Bachelor's final project and I needed exemple of dose evaluation with TLE and seTLE. I noticed that in the example of my interest the file .mhd of the phantom thorax is missing. Can anyone fix this as soon as possible?

Thank you in advance,

Nicola Rizzi

Problem with imaging/PhantomSource/Voxelized_Phantom_Source/brain_phantom.i33

Hi,
I am trying to perform the voxelized phantom source example. Nevertheless, it seems that I have a problem with git lfs and I do not know how to solve it. I tried the "git lfs clone" command after having git lfs installed with the whole GateContrib but it does not download the correct file. Because of that i have this problem running the .mac file:

GateVImageVolume.cc (l.739): I find R= 0 in the image, while range stop at -1

PS: just when i was writing this I thought I downloaded the correct file. Now I have a brain_phantom.i33 with a size of 16.4MB (instead of the one with a size of kB that I had before). Now I have a similar error but with different values:

GateVImageVolume.cc (l.739): I find R=257 in the image, while range stop at 256

Does anyone encounter this problem in the past?

Thanks in advance for your time.

Alejandro

LFS data

Follow PR #48 (@dsarrut @SimonRit )

I open an issue to discuss about LFS data.
I gave up the PR to focus on rebase instead of revert.

I push the rebase of @jmletang 's commit but still some data are not correctly followed. Find the list bellow. It's .png files and Materials.db files.
For png files I will convert them to LFS. Does for Materials.db need to be LFS too because they are text files?

As we already rebase once I will find all blamed commit and rebase them to have a clean repository.

the cylinders scale in VirtualVolume79.mac file

why in VirtualVolume79.mac file in the example's folder , the height and radius of cylinders which phase space informations added to them, is in scale of nm? how did they write in scale of nm? by which proportion?

20190731_184323

Problem with vpgtle data

It seems there are two problems in the vpgtle (https://github.com/OpenGATE/GateContrib/tree/master/imaging/vpgtle) examples:

  • For stage1 and stage2, the patient.raw is corrupted: the size of the raw in MB does not correspond to the supposed size calculated from the mhd and does not correspond to any data type. A solution is to copy the data from that folder: https://github.com/OpenGATE/GateContrib/tree/master/dosimetry/dosimetry/protontherapy/data
  • For stage2, the source.raw cannot be open with Mac. It's a 4D image. On Mac there is an error when we open this image in Gate or in vv. The errors do not occur with Linux OS.

need simple phase space source example

The brachytherapy example (under "dosimetry/dosimetry") is a quite complicated example for a phase space source. It would be nice to provide a simpler one.

imageCT input data

Hi, I am doing a dual layer CT simulation using Gate. I want to extract imageCT for each detector layer, however there is no command as /gate/output/imageCT/setInputDataName or like this to define the input data for image CT. I did it in digitizer for hits and singles in a Root file, but I need imageCT output of both layers. Please advise!

Single output for several runs

Hi,

I am trying to get a "dose by regions" output, for a CT simulation. But in the end I get only one output, which is overwritten every time the phantom rotates for a new acquisition. I have seen that there was a bug with "setOverWriteFilesFlag" in combination with "enableNumberOfHits", but does anyone know if there is also a bug combining "setOverWriteFilesFlag" with dose by regions?

By the way: defining "setOverWriteFilesFlag false" and "enableDose true" does give me different outputs for each acquisition.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.