macapype.nodes.prepare.CropVolume

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

Description: Crop image(s) based on a brain extraction. Multiple images can be cropped at once. Will crop each volume preceeded by the -i option

Inputs:

Mandatory:

i_file

Volume to crop (you can specify as many -in as you want)

b_file

Brain image or brain mask, in the same space as the in-file(s)

Optional:

o
Prefix for the cropped image(s) (Must provide as many prefixes

as input images with -o, default is the base name of each input image).

s

Suffix for the cropped image(s) (default is “_cropped”)

c
c is the space between the brain and the limits of the crop box expressed in percentage of the brain size (eg.

if the brain size is 200 voxels in one dimension and c=10: the sides of the brain in this dimension will be 20 voxels away from the borders of the resulting crop box in this dimension). Default: c=10

p

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

Outputs:

cropped_file:

cropped image from CropVolume.sh

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.prepare.CropVolumeInputSpec

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.prepare.CropVolumeOutputSpec

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