Options#
Turbo has a large amount of parameters that each can be set individually. These are split to 3 separate categories:
Turbo specific parameters: Used to control behavior of the program.
Modelling parameters: Used to control what model is used and with what parameters.
Magia options: Used to control Magia.
These parameter options can be fetched from the dicom data or set to some default value. User can however change these as they see fit.
Using non-default options#
To change default options see Example 3: Use non-default options.
Controlling the flow of program#
These options are Turbo specific. The full list of possible options are below. All of these options are given in a struct named turbo_options
. Here they are sectioned for easier reading.
Warning
Complete this list later.
Note
If function parameter says ‘options’, this means Matlab name-value argument, see more at https://se.mathworks.com/help/matlab/matlab_prog/validate-name-value-arguments.html.
- set_turbo_options(options)#
Creates a struct containing settings for TURBO with default values.
- Parameters:
frametimes (
Nx2 array, default : []
) – Frametimes of the scan.tracer (
char array, default : ''
) – Used tracer
- Returns:
turbo_options – Struct containing all parameters controlling turbo. These values are set to default. You can modify these by altering the field values.
- Return type:
struct
Notes
There are also separate parameter structs study_info, modelling_options and magia_options that need to be initialized separately.
Below are the comprehensive list of all generic options for turbo controls and explanations how to use them.
Turbo options#
Option parameter |
Explanation |
---|---|
use_parfor |
|
Controls whether certain functions in Turbo are run in parallel. These are ROI extraction and ROI modelling.
|
|
greedy_threads |
|
Controls the number of threads are used for greedy-coregistration. If |
|
run_preprocessing |
|
Skipping this step saves time and computation if it is already done.
|
|
use_highres_segmentation |
|
If you don’t have a GPU, best quality segmentation can take several hours.
|
|
roinames |
|
List of roinames. By default taken from label .txt file supplied. |
|
use_elastic_mc |
|
Motion correction is done using greedy coregistration. This step may take some time. This value also defines if the motion corrected version of the image is used later in the modelling.
|
|
use_ct_coreg |
|
CT is coregistered to PET image using greedy coregisration. |
|
elastic_mc_start_frame |
|
Frames from
|
|
rigid_mc_start_frame |
|
Frames from
|
|
run_qc |
|
Creates images and graphs to quickly glance over if motion correction was successful.
|
|
extract_TACs |
|
This has to be done before running modelling.
|
|
extract_IDIFaorta_input |
|
This has to be done before running modelling. Used PET file depends on
|
|
run_heart_mc |
|
Run rigid motion correction for heart and get automatic input from this motion corrected heart.
|
|
run_modelling |
|
Runs modelling for all selected ROIs. Also runs voxel level modelling, if
|
|
crop_brains |
|
This has to be done before running Magia.
|
|
run_magia |
|
|
|
compress_niftis |
|
|
|
ref_frame |
|
Determines the frame used for motion correction. Other frames are aligned to match this frame. Different defaults are used for different tracers:
|
|
verbose |
|
Level of printing info to console.
|
|
rethrow_error |
|
|
|
run_dicom_conversion_only |
|
|
|
run_segmentation only |
|
|
Modelling options#
Modelling options are similar to turbo_options
, but control only things related to modelling. Modelling is only run if turbo_options.run_modelling = 1
.
- set_modelling_options()#
Creates a default modelling options struct for run_totalbody_turbo. TODO add comments for each parameter.
- Parameters:
tracer (
char array
) – Tracer determines used model (to some extent).frametimes (
Nx2 double array
) – Frametimes used in the study.
- Returns:
modelling_options – Modelling options struct for run_totalbody_turbo that contains default options.
- Return type:
struct
Option parameter |
Explanation |
---|---|
ROImodel |
|
Model used for modelling. Possible values are:
|
|
n_iter |
|
Iteration count for nonlinear fitting done for fit_h2o. Used only for H2O studies. |
|
VOXmodel |
|
Model used for voxel level modelling. Models are:
|
|
lb |
(1,4) or (1,6) |
Used only for H2O studies. Lower bounds for fitting. From left to right, these values correspond to K1, k1/k2, Va. The units of the bounds are:
|
|
ub |
(1,4) or (1,6) |
Used only for H2O studies. Upper bounds for fitting. From left to right, these values correspond to K1, k1/k2, Va. The units of the bounds are:
|
|
roi_fit_lengths |
( |
Drop data after this timepoint, separate values for each ROI. Value at
|
|
roi_start_times |
( |
Drop data before this timepoint. Separate start time for each ROI. This is only for FDG!. Value at
|
|
roi_end_times |
( |
Drop data after this timepoint. Separate end time for each ROI. This is only for FDG!. Value at
|
|
run_vox_modelling |
|
Controls whether the voxel level modelling is run or not.
|
|
use_tpclib |
|
Determines if the used modelling library is tpcclib instead of Matlab library.
|
|
input_type |
|
Determines what input function is used when doing modelling. Possible values are:
|
|
processed_roi_idx |
( |
Array of the ROI indices that will be processed. For example processed_roi_idx = [1, 2, 90, 5] runs the modelling for spleen, right kidney, brain and liver (from the roinames.txt list). To run all ROIs this value can be set to [1:123] or ‘all’. |
|
filter_size |
|
Filter size in millimetres. The smooth is applied to the dynamic image before calculating parametric images. If this value is set to NaN no smoothing is done. |
|
vox_start_time |
|
Drop data before this timepoint. Works the same way as roi_start_times, but this is specific to voxel modeling only. This is only for FDG! |
|
vox_end_time |
|
Drop data after this timepoint. Works the same way as roi_end_times, but this is specific to voxel modeling only. This is only for FDG! |
|
vox_fit_length |
|
Drop data after this timepoint. Works the same way as roi_fit_lengths option, but this is specific to voxel modeling only. This is only for H2O! |
|
fit_va |
|
Affects only when
|
|
calculate_R2_img |
|
Also saves R^2 parametric image to see which areas are well fitted. This is only for H2O! |
|
magia_cut_time |
|
Data is used up to this timepoint, by default all data is used. |
|
fit_length_timeunit |
|
Sets the units of
|
|
start_end_timeunit |
|
Sets the units of
|
|
clustered_rois |
( |
A list of ROIs that will be clustered from parametric image. Results are gathered separately from these clustered ROIs. |
Magia options#
Option parameter |
Explanation |
---|---|
model |
|
By default, uses the same model as ROI model for the totalbody modelling. Possible values are:
|
|
cpi |
|
|
|
rc |
|
Determines if data based ROI-correction if used.
|
|
cut_time |
|
|
|
roi_type |
|
Determines what ROIs are used. Possible values are:
|
|
norm_method |
|
Determines what spatial normalisation is used. Possible values are:
|
|
mni_roi_mask_dir |
|
Path where the MNI ROI masks are. These are supplied with Turbo and this value should not be changed unless you know what you are doing. |
|
template |
|
Template brain nifti file used for coregistration. These are supplied with Turbo and this value should not be changed unless you know what you are doing. |
|
input_type |
|
Input function type. Possible values are:
|
|
fwhm_roi |
|
Kernel size for enlargening ROIs. |
|
fwhm_pre |
|
Smooth kernel size before voxel-level modelling. Units are millimetres. |
|
fwhm_post |
|
Smooth kernel size before spm analysis. Units are millimetres. |
|
mc_ref_frame |
|
Reference frame for motion correction. |
|
mc_fwhm |
|
SPM motion correction smooth parameter. Units are millimetres. |
|
mc_rtm |
|
Defines whether the motion-correction should be done in two steps. |
|
dc |
|
|
|
mc_excluded_frames |
|
These frames are excluded from the motion correction because early frames might have low signal in brain due to lack of tracer. Format is |
|
gu |
|
Defines whether Magia should automatically convert the Ki values (from Patlak) or FUR-values into glucose uptake -estimates.
|