Detects outliers in a functional imaging series
Uses intensity and motion parameters to infer outliers. If use_norm is True, it computes the movement of the center of each face a cuboid centered around the head and returns the maximal movement across the centers.
>>> ad = ArtifactDetect()
>>> ad.inputs.realigned_files = 'functional.nii'
>>> ad.inputs.realignment_parameters = 'functional.par'
>>> ad.inputs.parameter_source = 'FSL'
>>> ad.inputs.norm_threshold = 1
>>> ad.inputs.use_differences = [True, False]
>>> ad.inputs.zintensity_threshold = 3
>>> ad.run()
Inputs:
[Mandatory]
norm_threshold : (a float)
Threshold to use to detect motion-related outliers whencomposite motion is being used (see ``use_norm``)
exclusive: rotation_threshold,translation_threshold
parameter_source : ('SPM' or 'FSL' or 'Siemens')
Are the movement parameters from SPM or FSL or fromSiemens PACE data. Options: SPM, FSL or Siemens
realigned_files : (an existing file name)
Names of realigned functional data files
realignment_parameters : (an existing file name)
Names of realignment parameterscorresponding to the functional data files
rotation_threshold : (a float)
Threshold (in radians) to use to detect rotation-related outliers
exclusive: norm_threshold
translation_threshold : (a float)
Threshold (in mm) to use to detect translation-related outliers
exclusive: norm_threshold
zintensity_threshold : (a float)
Intensity Z-threshold use to detection images that deviate from themean
[Optional]
ignore_exception : (a boolean)
Print an error message instead of throwing an exception in case the interface fails to run
intersect_mask : (a boolean)
Intersect the masks when computed from spm_global. (default isTrue)
mask_file : (an existing file name)
Mask file to be used if mask_type is 'file'.
mask_threshold : (a float)
Mask threshold to be used if mask_type is 'thresh'.
mask_type : ('spm_global' or 'file' or 'thresh')
Type of mask that should be used to mask the functional data.*spm_global* uses an spm_global like calculation to determine thebrain mask. *file* specifies a brain mask file (should be an imagefile consisting of 0s and 1s). *thresh* specifies a threshold touse. By default all voxels are used, unless one of these masktypes are defined.
save_plot : (a boolean)
save plots containing outliers
use_differences : (a list of items which are an implementor of, or can be adapted to implement, bool or None)
Use differences between successive motion (first element)and intensity paramter (second element) estimates in orderto determine outliers. (default is [True, False])
use_norm : (a boolean)
Uses a composite of the motion parameters in order to determineoutliers. Requires ``norm_threshold`` to be set. (default isTrue)
Outputs:
intensity_files : (an existing file name)
One file for each functional run containing the global intensityvalues determined from the brainmask
norm_files : (a file name)
One file for each functional run containing the composite norm
outlier_files : (an existing file name)
One file for each functional run containing a list of 0-basedindices corresponding to outlier volumes
plot_files : (a file name)
One image file for each functional run containing the detected outliers
statistic_files : (an existing file name)
One file for each functional run containing information about thedifferent types of artifacts and if design info is provided thendetails of stimulus correlated motion and a listing or artifacts byevent type.
Determines if stimuli are correlated with motion or intensity parameters.
Currently this class supports an SPM generated design matrix and requires intensity parameters. This implies that one must run ArtifactDetect and nipype.interfaces.spm.Level1Design prior to running this or provide an SPM.mat file and intensity parameters through some other means.
>>> sc = StimulusCorrelation()
>>> sc.inputs.realignment_parameters = 'functional.par'
>>> sc.inputs.intensity_values = 'functional.rms'
>>> sc.inputs.spm_mat_file = 'SPM.mat'
>>> sc.inputs.concatenated_design = False
>>> sc.run()
Inputs:
[Mandatory]
concatenated_design : (a boolean)
state if the design matrix contains concatenated sessions
intensity_values : (an existing file name)
Name of file containing intensity values
realignment_parameters : (an existing file name)
Names of realignment parameters corresponding to the functional data files
spm_mat_file : (an existing file name)
SPM mat file (use pre-estimate SPM.mat file)
[Optional]
ignore_exception : (a boolean)
Print an error message instead of throwing an exception in case the interface fails to run
Outputs:
stimcorr_files : (an existing file name)
List of files containing correlation values