-
Notifications
You must be signed in to change notification settings - Fork 16
Getting started
Table of Contents
If you are using MATLAB, simply run the .mltbx file. All necessary folders will be automatically added to the MATLAB path. In Octave (and optionally in MATLAB) to install OMEGA, extract the contents of the zip-file (if you downloaded the release) and put the OMEGA-folder and all its subfolders to MATLAB/Octave path. When using git clone, similarly add the folders to the path. Finally, in all cases, run install_mex
.
Whether installed as a package or as a collection of individual files, the install_mex
function needs to be run first. This will automatically attempt to build all required mex-files. Some of them might fail to build (e.g. ROOT will always fail on Windows). You can view the build logs with install_mex(1)
. If OpenCL headers/ROOT/ArrayFire are in non-standard locations and not on path, you can specify their paths with install_mex(0, OpenCL_include_path, OpenCL_lib_path, AF_PATH, ROOT_PATH)
. OpenCL_include_path
should be the folder where cl.h
is located, OpenCL_lib_path
the folder where OpenCL.lib/libOpenCL.so
(Windows/Linux) is located, AF_PATH
the path to ArrayFire installation location and ROOT_PATH
to ROOT installation location.
Most OMEGA features are built around m-file scripts referred to as "main-files". In these main files, a struct variable, called options
, is filled and contains all the parameters that are needed for any of the operations selected. PET and CT have quite different main-file compositions due to different properties of these imaging modalities. CT, for example, has much less adjustable parameters due to lack of corrections. Reconstruction parameters, however, are unchanged between different modalities. It is not necessary to use these main-files and not every variable present in the main-files is necessary. Many of the included functions can be used without the options
struct, but some core functions, such as loading GATE data, require its use. In MATLAB you can run individual section easily when using the GUI, but in Octave you will need to run the entire m-file or select the required text to be run (due to the large size of the m-files, this is not recommended). Due to this, there are parameters that allow only the load of PET data (options.only_sinos
) when the file is run, or only performing the image reconstruction (options.only_reconstructions
).
Most of the functions included are simple m-files, however, some of the more demanding work is done in MEX/OCT-files. These include, for example, sinogram creation and image reconstruction/system matrix creation.
GATE users should use the gate_main.m
file to reconstruct GATE PET data. For other PET data, the file you should start with is main_PET.m
. For computing the forward and/or backward projections use forward_backward_projections_example.m
. For custom (gradient-based) priors, use custom_prior_test_main.m
. A more simplified main-file for GATE data (simple OSEM reconstruction) is available in gate_main_simple.m
. Inveon users should use Inveon_PET_main.m
while Biograph mCT data can be used with Biograph_mCT_main.m
and Biograph Vision with Biograph_Vision_main.m
.
A GATE example with GATE macros is available in exampleGATE-folder. Simply run the GATE macros as a GATE simulation (GATE material database needs to be in the same folder) and then run the gate_main_example-file to reconstruct the data. By default, ASCII data is used in the reconstruction. This example is based on both benchPET and the cylindrical PET example found from https://opengate.readthedocs.io/en/latest/defining_a_system_scanner_ct_pet_spect_optical.html#cylindricalpet
exampleGATE also contains macros for normalization.
When using GATE data, all the output files of the specified format will be read in the specified folder. E.g. if you select ASCII data, all .dat-files with Coincidences in the file name will be loaded from the specified folder, with LMF all .ccs files and with ROOT all .root files.
Example MAT-files for non-GATE situation (created from GATE data) can be found from: . These files are based on the above GATE-example. Raw data obtained from the GATE macros mentioned above (not normalization) can be found from:
Example Inveon data is available from: or . The Inveon_PET_main.m
file can be used automatically for this data.
Several different example scripts for CT data are provided, for different kind of CT-scanners. These include preclinical CT and µCT scanners as well as GATE simulated (imageCT) data. When using CT data, the direction of rotation should be from top to bottom or from bottom to top. If you have data that is rotated from left to right/right to left, you should transpose (permute) it and adjust the xSize
and ySize
variables according to the final transposed dimensions. Currently also only cone/fan beam CT scanners with flat panel detectors are inherently supported. You can use also other type of scanners, but then you have to input the detector/source coordinates yourself (see e.g. Custom detector coordinates and/or list mode reconstruction).
For GATE data, use gate_CT_main.m
. An example of µCT (using either or ) is provided with the walnut_CT_main.m
. A 2D (sinogram) example is shown in walnut2D_CT_main.m
(uses ). Lastly, an example script using preclinical Inveon CT is in Inveon_CT_main.m
(uses ). In all cases, the examples include both how to do built-in reconstruction or how to use the forward/backward projection class for your own custom algorithms.
For a short PET tutorial in image reconstruction in OMEGA see Tutorial. For CT imaging, see CT tutorial.
For help on using the individual main-files or the various functions see Function help
If you want to extract GATE PET scatter, randoms and/or trues data to MATLAB see Extracting GATE scatter, randoms and trues data
For recommendations and things to watch out, see Useful information
Currently it is recommended to ask questions in GitHub discussions.
However, if you prefer using e-mail for contact, use the following address:
- Home
- Installation help
- Getting started
- PET Tutorials
- CT Tutorials
- Useful information
- Function help
- Visualization
- Using GATE PET data
- Using GATE CT data
- Extracting GATE scatter, randoms and trues data
- Computing the forward and/or backward projections
- Using non-cylindrical PET scanners
- Custom detector coordinates and/or list mode reconstruction
- Using TOF data
- Extracting the system matrix
- Using Inveon PET data
- Using Inveon CT data
- Using Biograph PET data
- Using custom gradient-based priors
- Adding custom built-in algorithms
- Toolbox overview
- Contributing code to OMEGA
- Contact