Skip to content

Commit

Permalink
Merge branch 'develop' into zhenjie
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit committed Feb 7, 2018
2 parents 6dedb3c + 9d7748f commit 13c9714
Show file tree
Hide file tree
Showing 1,954 changed files with 14,569 additions and 97,136 deletions.
20 changes: 18 additions & 2 deletions AUTHORS
@@ -1,38 +1,54 @@
#Contributors to the source code (since 2012)
#Contributors to the source code
Arbor Nicolas
Benoit Didier
Bert Julien
Boersma David
Cajgfinger Thomas
Cassol-Brunner Franca
Chamberland Marc
Comtat Claude
Cuplov Vesna
Dedes George
Deschler Thomas
Dubois Albertine
Frisson Thibault
Fuchs Hermann
Garcia Marie-Paule
Germano Russo
Gil Alex Vergara
Grevillot Loic
Groiselle Corinne
Gueth Pierre
Guez David
Huisman Brent
Jan Sebastien
Joshi Kiran
Lazaro Delphine
Lemarechal Yannick
Letang Jean-Michel
Leung Edwin
Lönn Gustaf
Maigne Lydia
Martinez Imma
Miklavec Mojca
Mouton Claire
Patay Gergely
Perez Hector
Rehfeld Niklas
Rey Martin
Rit Simon
Romero Edward
Santin Giovanni
Sarrut David
Simon Luc
Smekens Francois
Staelens Steven
Strul Daniel
Strydhorst Jared
Stute Simon
Suhard Jerome
Suhard Jérôme
Tachereau Richard
van der Laan D.J.
Vieira Jean Marc
Vila Marc
Volgyes David
57 changes: 32 additions & 25 deletions CMakeLists.txt
@@ -1,5 +1,6 @@
#=========================================================
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
CMAKE_POLICY(SET CMP0025 NEW)

#=========================================================
PROJECT(Gate)
Expand Down Expand Up @@ -44,14 +45,14 @@ ENDIF()

#=========================================================
# Refuse to build with MT geant4, allow dev override
OPTION(GATE_ALLOW_MT_GEANT4 "Allow multithreaded geant4 (for MT Gate development)" OFF)
IF(Geant4_multithreaded_FOUND)
IF(GATE_ALLOW_MT_GEANT4)
MESSAGE(WARNING "GATE does not yet work correctly with multithreaded Geant4, proceed with caution...")
ELSE()
MESSAGE(FATAL_ERROR "GATE should be compiled with a non-multithreaded installation of Geant4")
ENDIF()
ENDIF()
#OPTION(GATE_ALLOW_MT_GEANT4 "Allow multithreaded geant4 (for MT Gate development)" OFF)
#IF(Geant4_multithreaded_FOUND)
#IF(GATE_ALLOW_MT_GEANT4)
#MESSAGE(WARNING "GATE does not yet work correctly with multithreaded Geant4, proceed with caution...")
#ELSE()
#MESSAGE(FATAL_ERROR "GATE should be compiled with a non-multithreaded installation of Geant4")
#ENDIF()
#ENDIF()

# Check if OpenGL headers are still available
IF(Geant4_qt_FOUND OR Geant4_vis_opengl_x11_FOUND)
Expand All @@ -70,8 +71,8 @@ STRING(REGEX REPLACE "(.*)[.](.*)[.](.*)" "\\3" G4VERSION_PATCH ${Geant4_VERSION
#MESSAGE(${G4VERSION_MAJOR})
#MESSAGE(${G4VERSION_MINOR})
#MESSAGE(${G4VERSION_PATCH})
IF(NOT ${G4VERSION_MAJOR}.${G4VERSION_MINOR} EQUAL 10.1 AND NOT ${G4VERSION_MAJOR}.${G4VERSION_MINOR} EQUAL 10.2)
MESSAGE("Warning! GATE version 7.2 is not validated for Geant4 ${G4VERSION_MAJOR}.${G4VERSION_MINOR} distribution. Please use Geant4 10.1 or 10.2 distribution instead.")
IF(NOT ${G4VERSION_MAJOR}.${G4VERSION_MINOR} EQUAL 10.2 AND NOT ${G4VERSION_MAJOR}.${G4VERSION_MINOR} EQUAL 10.3)
MESSAGE("Warning! GATE version 8.0 is not validated for Geant4 ${G4VERSION_MAJOR}.${G4VERSION_MINOR} distribution. Please use Geant4 10.2 or 10.3 distribution instead.")
ENDIF()

#=========================================================
Expand All @@ -80,17 +81,18 @@ SET(GATE_USE_ROOT ON)
SET(GATE_ANALYSIS_USE_GENERAL ON)
SET(GATE_ANALYSIS_USE_FILE ON)

OPTION(GATE_USE_STDC11 "Use the c++11 standard in the compilation" OFF)
OPTION(GATE_USE_OPTICAL "Gate use optical photon" OFF)
OPTION(GATE_USE_XRAYLIB "Option for XRAYLIB use" OFF)
OPTION(GATE_USE_DAVIS "Gate use Davis LUT model" OFF)
OPTION(GATE_USE_LMF "Gate use LMF" OFF)
OPTION(GATE_USE_ECAT7 "Gate use ECAT7" OFF)
OPTION(GATE_USE_SYSTEM_CLHEP "If 'ON', Gate does not use the standard CLHEP of GEANT4. Use OFF if you compile G4 with embedded CLHEP" OFF)
OPTION(GATE_USE_GPU "Gate use GPU (voxelized src and tracking), need CUDA " OFF)
OPTION(GATE_USE_GPU "Gate use GPU (voxelized source and tracking), need CUDA " OFF)

#=========================================================
# RTK / ITK
option(GATE_USE_RTK "Use the Reconstruction Toolkit (RTK, requires also ITK)" OFF)
option(GATE_USE_ITK "Use the Insight Toolkit (ITK, required by RTK)" OFF)
option(GATE_USE_ITK "Use the Insight Toolkit (ITK, required by RTK, DICOM reader and thermal therapy capability)" OFF)

#=========================================================
# ROOT
Expand Down Expand Up @@ -126,6 +128,12 @@ IF(GATE_USE_XRAYLIB)
ENDIF()
ENDIF(GATE_USE_XRAYLIB)

#=========================================================
# Option for Davis model
IF(GATE_USE_DAVIS)
MESSAGE("Warning! You have to install a manually modified version of Geant4 to use the Davis LUT model. Please refer to http://wiki.opengatecollaboration.org/index.php/Enabling_LUT_Davis_Model for detailed step-by-step compiling instructions")
ENDIF(GATE_USE_DAVIS)

#=========================================================
# Option for Clhep use
IF(GATE_USE_SYSTEM_CLHEP)
Expand Down Expand Up @@ -220,7 +228,7 @@ IF(GATE_USE_RTK)
INCLUDE(${RTK_USE_FILE})
STRING(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
ELSEIF(GATE_USE_ITK)
FIND_PACKAGE(ITK REQUIRED)
FIND_PACKAGE(ITK 4.9 REQUIRED)
INCLUDE(${ITK_USE_FILE})
STRING(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
ELSE()
Expand All @@ -237,7 +245,7 @@ ENDIF()
#=========================================================
# Add the executable, and link it to the Geant4/ROOT/CLHEP/ITK libraries
IF(GATE_USE_GPU AND CUDA_FOUND)
SET(CUDA_NVCC_FLAGS "-gencode arch=compute_20,code=sm_20;-gencode arch=compute_30,code=sm_30;-use_fast_math;-w;--ptxas-options=-v")
SET(CUDA_NVCC_FLAGS "-gencode arch=compute_20,code=sm_20;-gencode arch=compute_20,code=sm_21;-gencode arch=compute_30,code=sm_30;-gencode arch=compute_32,code=sm_32;-gencode arch=compute_35,code=sm_35;-gencode arch=compute_37,code=sm_37;-gencode arch=compute_50,code=sm_50;-gencode arch=compute_52,code=sm_52;-gencode arch=compute_53,code=sm_53;-gencode arch=compute_60,code=sm_60;-gencode arch=compute_61,code=sm_61;-use_fast_math;-w;--ptxas-options=-v")
CUDA_ADD_EXECUTABLE(Gate Gate.cc ${sources} ${sourcesGPU} ${headers})
ELSE(GATE_USE_GPU AND CUDA_FOUND)
ADD_EXECUTABLE(Gate Gate.cc ${sources} ${headers})
Expand All @@ -250,28 +258,27 @@ INSTALL(TARGETS Gate DESTINATION bin)

#=========================================================
option(GATE_DOWNLOAD_BENCHMARKS_DATA "Download the missing binary data to run gate benchmarks" OFF)
option(GATE_DOWNLOAD_EXAMPLES_DATA "Download the missing binary data to run gate examples" OFF)
#option(GATE_DOWNLOAD_EXAMPLES_DATA "Download the missing binary data to run gate examples" OFF)
IF(GATE_DOWNLOAD_BENCHMARKS_DATA OR GATE_DOWNLOAD_EXAMPLES_DATA)
INCLUDE(cmake-modules/GateExternalData.cmake)
ENDIF(GATE_DOWNLOAD_BENCHMARKS_DATA OR GATE_DOWNLOAD_EXAMPLES_DATA)
IF(GATE_DOWNLOAD_BENCHMARKS_DATA)
ADD_SUBDIRECTORY(benchmarks)
ExternalData_add_target(GateBenchmarkData)
ENDIF(GATE_DOWNLOAD_BENCHMARKS_DATA)
IF(GATE_DOWNLOAD_EXAMPLES_DATA)
ADD_SUBDIRECTORY(examples)
ExternalData_add_target(GateExampleData)
ENDIF(GATE_DOWNLOAD_EXAMPLES_DATA)
#IF(GATE_DOWNLOAD_EXAMPLES_DATA)
#ADD_SUBDIRECTORY(examples)
#ExternalData_add_target(GateExampleData)
#ENDIF(GATE_DOWNLOAD_EXAMPLES_DATA)
#=========================================================


#=========================================================
# We remove the warning option "shadow", because there are tons of
# such warning related to clhep/g4 system of units.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-shadow")
IF(GATE_USE_STDC11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF(GATE_USE_STDC11)
# such warning related to clhep/g4 system of units. Additionally,
# we force the c++11 std. This is mandatory for Geant4 >= 10.2.
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-shadow")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#=========================================================

#=========================================================
Expand Down
8 changes: 5 additions & 3 deletions Gate.cc
Expand Up @@ -159,7 +159,7 @@ void welcome()
{
GateMessage("Core", 0, G4endl);
GateMessage("Core", 0, "**********************************************************************" << G4endl);
GateMessage("Core", 0, " GATE version name: gate_v7.2 " << G4endl);
GateMessage("Core", 0, " GATE version name: gate_v8.0 " << G4endl);
GateMessage("Core", 0, " Copyright : OpenGATE Collaboration " << G4endl);
GateMessage("Core", 0, " Reference : Phys. Med. Biol. 49 (2004) 4543-4561 " << G4endl);
GateMessage("Core", 0, " Reference : Phys. Med. Biol. 56 (2011) 881-901 " << G4endl);
Expand Down Expand Up @@ -252,7 +252,7 @@ int main( int argc, char* argv[] )
printHelpAndQuit("Gate command line help" );
break;
case 'v':
std::cout << "Gate version is 7.2" << std::endl;
std::cout << "Gate version is 8.0" << std::endl;
exit(0);
break;
case 'a':
Expand Down Expand Up @@ -428,13 +428,15 @@ int main( int argc, char* argv[] )

delete sourceMgr;
delete appMgr;
delete UImanager;
delete randomEngine;
delete controlMessenger;
#ifdef G4ANALYSIS_USE_ROOT
delete myRecords;
#endif
delete verbosity;


delete runManager;

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions GateConfiguration.h.in
Expand Up @@ -15,6 +15,7 @@
#cmakedefine GATE_USE_GEANT4_UIVIS @GATE_USE_GEANT4_UIVIS@
#cmakedefine GATE_USE_RTK @GATE_USE_RTK@
#cmakedefine GATE_USE_ITK @GATE_USE_ITK@
#cmakedefine GATE_USE_DAVIS @GATE_USE_DAVIS@

#ifdef GATE_USE_ROOT
#define G4ANALYSIS_USE_ROOT 1
Expand Down
165 changes: 165 additions & 0 deletions LICENSE.md
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

0 comments on commit 13c9714

Please sign in to comment.