macapype.nodes.register.IterREGBET

class macapype.nodes.register.IterREGBET(command=None, terminal_output=None, **inputs)[source]

Description: Iterative registration of the in-file to the ref file ( registered brain mask of the ref image is used at each iteration). To use when the input brain mask is not optimal (eg. an output of FSL BET). Will output a better brain mask of the in-file.

Inputs:

Mandatory:

inw_file

Moving Whole-head image

inb_file

Moving brain image

refb_file

Fixed reference brain image

Optional:

xp

Prefix for the registration outputs (“in_FLIRT-to_ref” if not specified)

bs

Suffix for the brain files (“in_IRbrain” & “in_IRbrain_mask” if not specified)

dof

FLIRT degrees of freedom (6=rigid body, 7=scale, 12=affine (default)). Use dof 6 for intra-subject, 12 for inter-subject registration

cost

FLIRT cost {mutualinfo,corratio,normcorr,normmi,leastsq, labeldiff,bbr} (default is normmi)

n

n = the number of FLIRT iterations (>=2, default=2)

m

At each new iteration, either use:

  • the reference brain mask, m=ref (default)

  • the union of the reference and input brain masks, m=union (use if your input brain is too small)

  • the intersection of the reference and input brain masks, m=inter (use if your input brain is too big)

  • a mix between union & intersection, m=mix (give it a try!)

refw_file

Do a whole-head non-linear registration (using FNIRT) during last iteration (provide reference whole-head image)

k

Will keep temporary files

p

Prefix for running FSL functions (can be a path or just a prefix)

Outputs:

brain_file

brain from IterREGBET.sh

brain_mask_file

masked brain from IterREGBET.sh

warp_file

warped image from IterREGBET.sh

transfo_file

transfo_file

inv_transfo_file

inv_transfo_file

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.register.IterREGBETInputSpec

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.register.IterREGBETOutputSpec

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