macapype.nodes.correct_bias.T1xT2BiasFieldCorrection¶
- class macapype.nodes.correct_bias.T1xT2BiasFieldCorrection(command=None, terminal_output=None, **inputs)[source]¶
- Description: Bias field correction using T1w & T2w images.
Provides an attempt of brain extration if wanted.
Inputs:
Mandatory:
- t1_file
Whole-head T1w image
- t2_file
Whole-head T2w image (use -aT2 if T2w image is not in the T1w space)
Optional:
- os
Suffix for the bias field corrected images (default is “_debiased”)
- aT2
Will coregrister T2w to T1w using flirt. Output will have the suffix provided. Will only work for spatially close images.
- opt_as
Suffix for T2w to T1w registration (“-in-T1w” if not specified)
- s
size of gauss kernel in mm when performing mean filtering (default=4)argstr=”-s %d”, mandatory=False)
- b
Brain mask file. Will also output bias corrected brain files with the format “output_prefix_brain.nii.gz”
- bet
Will try to “smart” BET the anat files to get a brain mask: n = the number of iterations BET will be run to find center of gravity (default=0, will not BET if option -b has been specified).
- bs
Suffix for the BET masked images (default is “_BET”)
- f
- -f options of BET: fractional intensity threshold (0->1); default=0.5; smaller values give larger brain outline
estimates
- g
- -g options of BET: vertical gradient in fractional intensity threshold
(-1->1); default=0; positive values give larger brain outline at bottom, smaller at top
- k
Will keep temporary files
- p
Prefix for running FSL functions (can be a path or just a prefix)
Outputs:
- t1_debiased_file
debiased T1
- t2_debiased_file
debiased T2
- t2_coreg_file
T2 on T1
- t1_debiased_brain_file
debiased bet T1
- t2_debiased_brain_file
debiased bet T2
- debiased_mask_file
debiased bet mask
- Attributes
always_run
Should the interface be always run even if the inputs were not changed? Only applies to interfaces being run within a workflow context.
can_resume
Defines if the interface can reuse partial results after interruption.
cmd
sets base command, immutable
cmdline
command plus any arguments (args)
- terminal_output
version
interfaces should implement a version property
Methods
aggregate_outputs
([runtime, needed_outputs])Collate expected outputs and apply output traits validation.
help
([returnhelp])Prints class help
input_spec
alias of
macapype.nodes.correct_bias.T1xT2BiasFieldCorrectionInputSpec
load_inputs_from_json
(json_file[, overwrite])A convenient way to load pre-set inputs from a JSON file.
output_spec
alias of
macapype.nodes.correct_bias.T1xT2BiasFieldCorrectionOutputSpec
run
([cwd, ignore_exception])Execute this interface.
save_inputs_to_json
(json_file)A convenient way to save current inputs to a JSON file.
set_default_terminal_output
(output_type)Set the default terminal output for CommandLine Interfaces.
raise_exception
version_from_command
- __init__(command=None, terminal_output=None, **inputs)¶
Subclasses must implement __init__
Methods
__init__
([command, terminal_output])Subclasses must implement __init__
aggregate_outputs
([runtime, needed_outputs])Collate expected outputs and apply output traits validation.
help
([returnhelp])Prints class help
load_inputs_from_json
(json_file[, overwrite])A convenient way to load pre-set inputs from a JSON file.
raise_exception
(runtime)run
([cwd, ignore_exception])Execute this interface.
save_inputs_to_json
(json_file)A convenient way to save current inputs to a JSON file.
set_default_terminal_output
(output_type)Set the default terminal output for CommandLine Interfaces.
version_from_command
([flag, cmd])Attributes
always_run
Should the interface be always run even if the inputs were not changed? Only applies to interfaces being run within a workflow context.
can_resume
Defines if the interface can reuse partial results after interruption.
cmd
sets base command, immutable
cmdline
command plus any arguments (args) validates arguments and generates command line
package_directory
references_
resource_monitor
terminal_output
version
interfaces should implement a version property