Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/medical/DICOM/README.md is written in an unsupported language. File is not indexed.

0001 /\page Examples_DICOM Category "medical/DICOM"
0002 
0003 # Geant4 DICOM Examples
0004 
0005 The DICOM applications were originally developed by the Geant4 users: \n
0006 Louis Archambault,(1)Luc Beaulieu, (2)Vincent Hubert-Tremblay.
0007 
0008 - (1) Centre Hospitalier Universitaire de Quebec (CHUQ),   \n
0009 Hotel-Dieu de Quebec, departement de Radio-oncologie  \n
0010 11 cote du palais. Quebec, QC, Canada, G1R 2J6        \n
0011 tel (418) 525-4444 #6720                              \n
0012 fax (418) 691 5268                                    \n
0013 web : thomson.phy.ulaval.ca/phys_med                  \n
0014 
0015 - (2) Universite Laval, Quebec (QC) Canada
0016 
0017 It has since been deeply reviewed by Pedro Arce in December 2007. \n
0018 Very small changes by Stephane Chauvie in January 2008. \n
0019 Stephane Chauvie, Oct 2009: changed Physics list; changes in DICOM read.  \n
0020 Stephane Chauvie and Andrea Armando; June 2010 adapted for reading  whatever DICOM file \n
0021 Jonathan Madsen, Nov 2013: updated DICOM to utilize multithreading now available in Geant4.10 \n
0022 
0023 ## Introduction
0024 
0025 This example consists of the following applications:
0026 
0027 - \ref ExampleDICOM1
0028 - \ref ExampleDICOM2
0029 
0030 with two libraries that implement capabilities common to both applications:
0031 
0032 - G4DicomCore: providing the core Geant4 application structure.
0033 - G4DicomReader: **Optional** utility library to read DICOM files and RT structure in DICOM format, as well as RT plans.
0034   It uses the [DCMTK library](http://dicom.offis.de/dcmtk.php.en), which must be installed if you wish to use this capability.
0035   - Requires DCMTK 3.6.1 or newer, with the `dcmrt` package available.
0036 
0037 Both application can optionally use the DICOM Digital Head developed by S. Guatelli (susanna@uow.edu.au) and V. Giacometti.
0038 This digital model is documented in: Giacometti, V., Guatelli, S., Bazalova-Carter, M., Rosenfeld, A.B., Schulte, R.W.,
0039 "Development of a high resolution voxelised head phantom for medical physics applications", (2017) Physica Medica, 33, pp. 182-188.
0040 
0041 ## Compiling the libraries and applications
0042 
0043 A standard Geant4 example `CMakeLists.txt` is provided, and thus the project may be configured and built using:
0044 
0045 ```
0046 $ cmake -DCMAKE_PREFIX_PATH=/path/to/geant4-install -S. -Bbuild
0047 $ cmake --build ./build
0048 ```
0049 
0050 Note that this assumes you run `cmake` in the top level `DICOM` directory.
0051 
0052 To build the applications and libraries with support for reading DICOM files using DCMTK, run `cmake` as
0053 
0054 ```
0055 $ cmake \
0056   -DCMAKE_PREFIX_PATH=/path/to/geant4-install \
0057   -DG4DICOM_USE_DCMTK=ON \
0058   -S. -Bbuild 
0059 $ cmake --build ./build
0060 ```
0061 
0062 This requires that you have DCMTK v3.6.1 or newer with the `dcmrt` package installed. If CMake has problems
0063 located the install of DCMTK, add its install path to the `CMAKE_PREFIX_PATH` argument, e.g.
0064 
0065 ```
0066 $ cmake \
0067   -DCMAKE_PREFIX_PATH="/path/to/geant4-install;/path/to/dcmtk-install" \
0068   -DG4DICOM_USE_DCMTK=ON \
0069   -S. -Bbuild 
0070 $ cmake --build ./build
0071 ```
0072 
0073 To enable use of the DICOM Digital Head model, run cmake as:
0074 
0075 ```
0076 $ cmake \
0077   -DCMAKE_PREFIX_PATH=/path/to/geant4-install \
0078   -DG4DICOM_USE_HEAD=ON \
0079   -S. -Bbuild 
0080 $ cmake --build ./build
0081 ```
0082 
0083 This requires a working network connection in order to download the model from the Geant4 website.
0084 
0085 
0086 ## Running the applications
0087 
0088 Both applications can have their runtime behaviour configured using a series on environment variables:
0089 
0090 - `DICOM_CHANGE_MATERIAL_DENSITY`
0091   - set to the minimum density difference before making a separate material
0092   - e.g. if DenseBone is from > 1.496 to <= 1.654 and `DICOM_CHANGE_MATERIAL_DENSITY=0.079`
0093       then DenseBone would be separated into DenseBone > 1.496 to <= 1.575 and DenseBone > 1.575 to <= 1.654
0094 - `DICOM_PARTIAL_PARAM`
0095   - set to 1 to build the partial build instead of regular or nested construction (see section 9)
0096 - `DICOM_NESTED_PARAM`
0097   - set to 1 to build the nested construction (see section 9; overridden by `DICOM_PARTIAL_PARAM`)
0098 - `DICOM_NTHREADS`
0099   - To set the number of threads (only when Geant4 itself has been built with multithreading capability)
0100   - Needs to be set to the number of desired threads, e.g. `DICOM_NTHREADS=8` (default is 4 threads)
0101 - `DICOM_USE_HEAD`
0102   - set to 1 (export DICOM_USE_HEAD=1) to use the digital head phantom documented in Giacometti, V., Guatelli, S., Bazalova-Carter, M., Rosenfeld, A.B., Schulte, R.W.,
0103     "Development of a high resolution voxelised head phantom for medical physics applications", (2017) Physica Medica, 33, pp. 182-188. 
0104     To use this option, the DICOM library needs to be downloaded. This is distributed with the other Geant4 data files on the Geant4 Download site.
0105     For convenience of use, it is suggested to have the DICOM library directory in the DICOM Geant4 extended example or in the directory containing the DICOM executable.
0106     When using this option,
0107     1) export DICOM_USE_HEAD=1
0108     2) export DICOM_PATH=path/to/DICOM1.1/DICOM_HEAD - to use the full DICOM HEAD project 
0109        or
0110        export DICOM_PATH=path/to/DICOM1.1/DICOM_HEAD_TEST - to use 4 DICOM files of the DICOM HEAD project. This option is useful for testing purposes.
0111     3) THE DICOM_HEAD uses the OLD version of the Metadata files (see point 4a)
0112     Note 1: The Conversion of Hounsfield numbers to materials (point 5) is not used. The material is associated to the voxel in the Detector Construction 
0113             without using the calibration curve.This happens because the DICOM project has already been segmented and cleaned from artefacts (see publication).
0114 
0115 Detailed information on the capabilities of, and how to run, the `DICOM1` and `DICOM2` applications
0116 are available in the [DICOM1 README](DICOM1/README) and [DICOM2 README](DICOM2/README) respectively.