xcp_d.interfaces.restingstate.ReHoNamePatch
- class xcp_d.interfaces.restingstate.ReHoNamePatch(from_file=None, resource_monitor=None, **inputs)[source]
Wrapped executable:
3dReHo
.Compute ReHo for a given neighbourhood, based on a local neighborhood of that voxel.
For complete details, see the 3dReHo Documentation.
Examples
>>> from nipype.interfaces import afni >>> reho = afni.ReHo() >>> reho.inputs.in_file = 'functional.nii' >>> reho.inputs.out_file = 'reho.nii.gz' >>> reho.inputs.neighborhood = 'vertices' >>> reho.cmdline '3dReHo -prefix reho.nii.gz -inset functional.nii -nneigh 27' >>> res = reho.run()
- Mandatory Inputs:
in_file (a pathlike object or string representing an existing file) – Input dataset. Maps to a command-line argument:
-inset %s
(position: 1).- Optional Inputs:
args (a string) – Additional parameters to the command. Maps to a command-line argument:
%s
.chi_sq (a boolean) – Output the Friedman chi-squared value in addition to the Kendall’s W. This option is currently compatible only with the AFNI (BRIK/HEAD) output type; the chi-squared value will be the second sub-brick of the output dataset. Maps to a command-line argument:
-chi_sq
.ellipsoid (a tuple of the form: (a float, a float, a float)) – Tuple indicating the x, y, and z radius of an ellipsoid defining the neighbourhood of each voxel. The ‘hood is then made according to the following relation: \((i/A)^2 + (j/B)^2 + (k/C)^2 \le 1.\) which will have approx. \(V=4 \pi \, A B C/3\). The impetus for this freedom was for use with data having anisotropic voxel edge lengths. Maps to a command-line argument:
-neigh_X %s -neigh_Y %s -neigh_Z %s
. Mutually exclusive with inputs:sphere
,neighborhood
.environ (a dictionary with keys which are a bytes or None or a value of class ‘str’ and with values which are a bytes or None or a value of class ‘str’) – Environment variables. (Nipype default value:
{}
)label_set (a pathlike object or string representing an existing file) – A set of ROIs, each labelled with distinct integers. ReHo will then be calculated per ROI. Maps to a command-line argument:
-in_rois %s
.mask_file (a pathlike object or string representing a file) – Mask within which ReHo should be calculated voxelwise. Maps to a command-line argument:
-mask %s
.neighborhood (‘faces’ or ‘edges’ or ‘vertices’) – voxels in neighborhood. can be:
faces
(for voxel and 6 facewise neighbors, only),edges
(for voxel and 18 face- and edge-wise neighbors),vertices
(for voxel and 26 face-, edge-, and node-wise neighbors). Maps to a command-line argument:-nneigh %s
. Mutually exclusive with inputs:sphere
,ellipsoid
.out_file (a pathlike object or string representing a file) – Output dataset. Maps to a command-line argument:
-prefix %s
(position: 0).overwrite (a boolean) – Overwrite output file if it already exists. Maps to a command-line argument:
-overwrite
.sphere (a float) – For additional voxelwise neighborhood control, the radius R of a desired neighborhood can be put in; R is a floating point number, and must be >1. Examples of the numbers of voxels in a given radius are as follows (you can roughly approximate with the ol’ \(4\pi\,R^3/3\) thing):
R=2.0 -> V=33
R=2.3 -> V=57,
R=2.9 -> V=93,
R=3.1 -> V=123,
R=3.9 -> V=251,
R=4.5 -> V=389,
R=6.1 -> V=949,
but you can choose most any value. Maps to a command-line argument:
-neigh_RAD %s
. Mutually exclusive with inputs:neighborhood
,ellipsoid
.
- Outputs:
out_file (a pathlike object or string representing an existing file) – Voxelwise regional homogeneity map.
out_vals (a pathlike object or string representing a file) – Table of labelwise regional homogeneity values.
- __init__(from_file=None, resource_monitor=None, **inputs)[source]
Subclasses must implement __init__
Methods
__init__
([from_file, resource_monitor])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.
run
([cwd, ignore_exception])Execute this interface.
save_inputs_to_json
(json_file)A convenient way to save current inputs to a JSON 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.
resource_monitor
version
interfaces should implement a version property