Example 3: Use non-default options#

Turbo has myriad of different options, and each of these can be set to what user wants. For more info about different option choices, see Options.

To set custom options, first use set_turbo_options. This creates a struct with necessary fields with default values that you can modify.

my_turbo_options = set_turbo_options();

For example, the next following lines:

  • disable parallelisation

  • skip brain cropping step

  • skip MAGIA processing step

my_turbo_options.use_parfor   = 0;              % Default = 1
my_turbo_options.crop_brains  = 0;              % Default = 1
my_turbo_options.run_magia    = 0;              % Default = 1

And to run turbo with these settings:

run_totalbody_turbo('123456_rest', turbo_options = custom_turbo_options)

All options structs can be modified and used similarly.

Giving incomplete option structs#

You can also create options structs with just the option(s) you want and Turbo merges this struct to the default values generated during run, prioritizing the user input. For example, to change used input function, you can do the following:

% Use non motion corrected input function for modelling.
my_modelling_options = struct(input_type = 'IDIFaorta_no_mc')

run_totalbody_turbo('123456_rest', modelling_options = my_modelling_options)

Now during execution, default modeling options are created and used, except for input_type.

This can be done for each of the four options structs turbo_options, modelling_options, magia_options.

For study_specs Turbo attempts to collect missing study_specs values from aivo databse, json-file or dicom-files in that order. If all fails, error is thrown and user needs to specify the values.