nipype.interfaces.freesurfer.model module¶
The freesurfer module provides basic functions for interfacing with freesurfer tools.
Binarize¶
Bases: FSCommand
Wrapped executable:
mri_binarize.Use FreeSurfer mri_binarize to threshold an input volume
Examples
>>> binvol = Binarize(in_file='structural.nii', min=10, binary_file='foo_out.nii') >>> binvol.cmdline 'mri_binarize --o foo_out.nii --i structural.nii --min 10.000000'
- in_filea pathlike object or string representing an existing file
Input volume. Maps to a command-line argument:
--i %s.
- absa boolean
Take abs of invol first (ie, make unsigned). Maps to a command-line argument:
--abs.- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- bin_col_numa boolean
Set binarized voxel value to its column number. Maps to a command-line argument:
--bincol.- bin_valan integer (int or long)
Set vox within thresh to val (default is 1). Maps to a command-line argument:
--binval %d.- bin_val_notan integer (int or long)
Set vox outside range to val (default is 0). Maps to a command-line argument:
--binvalnot %d.- binary_filea pathlike object or string representing a file
Binary output volume. Maps to a command-line argument:
--o %s.- count_filea boolean or a pathlike object or string representing a file
Save number of hits in ascii file (hits, ntotvox, pct). Maps to a command-line argument:
--count %s.- dilatean integer (int or long)
Niters: dilate binarization in 3D. Maps to a command-line argument:
--dilate %d.- environa 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:
{})- erodean integer (int or long)
Nerode: erode binarization in 3D (after any dilation). Maps to a command-line argument:
--erode %d.- erode2dan integer (int or long)
Nerode2d: erode binarization in 2D (after any 3D erosion). Maps to a command-line argument:
--erode2d %d.- frame_noan integer (int or long)
Use 0-based frame of input (default is 0). Maps to a command-line argument:
--frame %s.- inverta boolean
Set binval=0, binvalnot=1. Maps to a command-line argument:
--inv.- mask_filea pathlike object or string representing an existing file
Must be within mask. Maps to a command-line argument:
--mask maskvol.- mask_thresha float
Set thresh for mask. Maps to a command-line argument:
--mask-thresh %f.- matcha list of items which are an integer (int or long)
Match instead of threshold. Maps to a command-line argument:
--match %d....- maxa float
Max thresh. Maps to a command-line argument:
--max %f. Mutually exclusive with inputs:wm_ven_csf.- merge_filea pathlike object or string representing an existing file
Merge with mergevol. Maps to a command-line argument:
--merge %s.- mina float
Min thresh. Maps to a command-line argument:
--min %f. Mutually exclusive with inputs:wm_ven_csf.- out_type‘nii’ or ‘nii.gz’ or ‘mgz’
Output file type.
- rmaxa float
Compute max based on rmax*globalmean. Maps to a command-line argument:
--rmax %f.- rmina float
Compute min based on rmin*globalmean. Maps to a command-line argument:
--rmin %f.- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- ventriclesa boolean
Set match vals those for aseg ventricles+choroid (not 4th). Maps to a command-line argument:
--ventricles.- wma boolean
Set match vals to 2 and 41 (aseg for cerebral WM). Maps to a command-line argument:
--wm.- wm_ven_csfa boolean
WM and ventricular CSF, including choroid (not 4th). Maps to a command-line argument:
--wm+vcsf. Mutually exclusive with inputs:min,max.- zero_edgesa boolean
Zero the edge voxels. Maps to a command-line argument:
--zero-edges.- zero_slice_edgea boolean
Zero the edge slice voxels. Maps to a command-line argument:
--zero-slice-edges.
- binary_filea pathlike object or string representing an existing file
Binarized output volume.
- count_filea pathlike object or string representing a file
Ascii file containing number of hits.
Concatenate¶
Bases: FSCommand
Wrapped executable:
mri_concat.Use Freesurfer mri_concat to combine several input volumes into one output volume. Can concatenate by frames, or compute a variety of statistics on the input volumes.
Examples
Combine two input volumes into one volume with two frames
>>> concat = Concatenate() >>> concat.inputs.in_files = ['cont1.nii', 'cont2.nii'] >>> concat.inputs.concatenated_file = 'bar.nii' >>> concat.cmdline 'mri_concat --o bar.nii --i cont1.nii --i cont2.nii'
- in_filesa list of items which are a pathlike object or string representing an existing file
Individual volumes to be concatenated. Maps to a command-line argument:
--i %s....
- add_vala float
Add some amount to the input volume. Maps to a command-line argument:
--add %f.- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- combinea boolean
Combine non-zero values into single frame volume. Maps to a command-line argument:
--combine.- concatenated_filea pathlike object or string representing a file
Output volume. Maps to a command-line argument:
--o %s.- environa 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:
{})- gmeanan integer (int or long)
Create matrix to average Ng groups, Nper=Ntot/Ng. Maps to a command-line argument:
--gmean %d.- keep_dtypea boolean
Keep voxelwise precision type (default is float. Maps to a command-line argument:
--keep-datatype.- mask_filea pathlike object or string representing an existing file
Mask input with a volume. Maps to a command-line argument:
--mask %s.- max_bonfcora boolean
Compute max and bonferroni correct (assumes -log10(ps)). Maps to a command-line argument:
--max-bonfcor.- max_indexa boolean
Compute the index of max voxel in concatenated volumes. Maps to a command-line argument:
--max-index.- mean_div_na boolean
Compute mean/nframes (good for var). Maps to a command-line argument:
--mean-div-n.- multiply_bya float
Multiply input volume by some amount. Maps to a command-line argument:
--mul %f.- multiply_matrix_filea pathlike object or string representing an existing file
Multiply input by an ascii matrix in file. Maps to a command-line argument:
--mtx %s.- paired_stats‘sum’ or ‘avg’ or ‘diff’ or ‘diff-norm’ or ‘diff-norm1’ or ‘diff-norm2’
Compute paired sum, avg, or diff. Maps to a command-line argument:
--paired-%s.- sign‘abs’ or ‘pos’ or ‘neg’
Take only pos or neg voxles from input, or take abs. Maps to a command-line argument:
--%s.- sorta boolean
Sort each voxel by ascending frame value. Maps to a command-line argument:
--sort.- stats‘sum’ or ‘var’ or ‘std’ or ‘max’ or ‘min’ or ‘mean’
Compute the sum, var, std, max, min or mean of the input volumes. Maps to a command-line argument:
--%s.- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- votea boolean
Most frequent value at each voxel and fraction of occurances. Maps to a command-line argument:
--vote.
- concatenated_filea pathlike object or string representing an existing file
Path/name of the output volume.
GLMFit¶
Bases: FSCommand
Wrapped executable:
mri_glmfit.Use FreeSurfer’s mri_glmfit to specify and estimate a general linear model.
Examples
>>> glmfit = GLMFit() >>> glmfit.inputs.in_file = 'functional.nii' >>> glmfit.inputs.one_sample = True >>> glmfit.cmdline == 'mri_glmfit --glmdir %s --y functional.nii --osgm'%os.getcwd() True
- in_filea pathlike object or string representing a file
Input 4D file. Maps to a command-line argument:
--y %s.
- allow_ill_conda boolean
Allow ill-conditioned design matrices. Maps to a command-line argument:
--illcond.- allow_repeated_subjectsa boolean
Allow subject names to repeat in the fsgd file (must appear before –fsgd. Maps to a command-line argument:
--allowsubjrep.- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- calc_AR1a boolean
Compute and save temporal AR1 of residual. Maps to a command-line argument:
--tar1.- check_optsa boolean
Don’t run anything, just check options and exit. Maps to a command-line argument:
--checkopts.- compute_log_ya boolean
Compute natural log of y prior to analysis. Maps to a command-line argument:
--logy.- contrasta list of items which are a pathlike object or string representing an existing file
Contrast file. Maps to a command-line argument:
--C %s....- cortexa boolean
Use subjects ?h.cortex.label as label. Maps to a command-line argument:
--cortex. Mutually exclusive with inputs:label_file.- debuga boolean
Turn on debugging. Maps to a command-line argument:
--debug.- designa pathlike object or string representing an existing file
Design matrix file. Maps to a command-line argument:
--X %s. Mutually exclusive with inputs:fsgd,design,one_sample.- diagan integer (int or long)
Gdiag_no : set diagnositc level. Maps to a command-line argument:
--diag %d.- diag_clustera boolean
Save sig volume and exit from first sim loop. Maps to a command-line argument:
--diag-cluster.- environa 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:
{})- fixed_fx_dofan integer (int or long)
Dof for fixed effects analysis. Maps to a command-line argument:
--ffxdof %d. Mutually exclusive with inputs:fixed_fx_dof_file.- fixed_fx_dof_filea pathlike object or string representing a file
Text file with dof for fixed effects analysis. Maps to a command-line argument:
--ffxdofdat %d. Mutually exclusive with inputs:fixed_fx_dof.- fixed_fx_vara pathlike object or string representing an existing file
For fixed effects analysis. Maps to a command-line argument:
--yffxvar %s.- force_perma boolean
Force perumtation test, even when design matrix is not orthog. Maps to a command-line argument:
--perm-force.- fsgda tuple of the form: (a pathlike object or string representing an existing file, ‘doss’ or ‘dods’)
Freesurfer descriptor file. Maps to a command-line argument:
--fsgd %s %s. Mutually exclusive with inputs:fsgd,design,one_sample.- fwhma floating point number >= 0.0
Smooth input by fwhm. Maps to a command-line argument:
--fwhm %f.- glm_dira unicode string
Save outputs to dir. Maps to a command-line argument:
--glmdir %s.- hemi‘lh’ or ‘rh’
Surface hemisphere.
- invert_maska boolean
Invert mask. Maps to a command-line argument:
--mask-inv.- label_filea pathlike object or string representing an existing file
Use label as mask, surfaces only. Maps to a command-line argument:
--label %s. Mutually exclusive with inputs:cortex.- mask_filea pathlike object or string representing an existing file
Binary mask. Maps to a command-line argument:
--mask %s.- no_contrast_oka boolean
Do not fail if no contrasts specified. Maps to a command-line argument:
--no-contrasts-ok.- no_est_fwhma boolean
Turn off FWHM output estimation. Maps to a command-line argument:
--no-est-fwhm.- no_mask_smootha boolean
Do not mask when smoothing. Maps to a command-line argument:
--no-mask-smooth.- no_prunea boolean
Do not prune. Maps to a command-line argument:
--no-prune. Mutually exclusive with inputs:prunethresh.- one_samplea boolean
Construct X and C as a one-sample group mean. Maps to a command-line argument:
--osgm. Mutually exclusive with inputs:one_sample,fsgd,design,contrast.- pcaa boolean
Perform pca/svd analysis on residual. Maps to a command-line argument:
--pca.- per_voxel_rega list of items which are a pathlike object or string representing an existing file
Per-voxel regressors. Maps to a command-line argument:
--pvr %s....- profilean integer (int or long)
Niters : test speed. Maps to a command-line argument:
--profile %d.- prunea boolean
Remove voxels that do not have a non-zero value at each frame (def). Maps to a command-line argument:
--prune.- prune_thresha float
Prune threshold. Default is FLT_MIN. Maps to a command-line argument:
--prune_thr %f. Mutually exclusive with inputs:noprune.- resynth_testan integer (int or long)
Test GLM by resynthsis. Maps to a command-line argument:
--resynthtest %d.- save_conda boolean
Flag to save design matrix condition at each voxel. Maps to a command-line argument:
--save-cond.- save_estimatea boolean
Save signal estimate (yhat). Maps to a command-line argument:
--yhat-save.- save_res_corr_mtxa boolean
Save residual error spatial correlation matrix (eres.scm). Big!. Maps to a command-line argument:
--eres-scm.- save_residuala boolean
Save residual error (eres). Maps to a command-line argument:
--eres-save.- seedan integer (int or long)
Used for synthesizing noise. Maps to a command-line argument:
--seed %d.- self_rega tuple of the form: (an integer (int or long), an integer (int or long), an integer (int or long))
Self-regressor from index col row slice. Maps to a command-line argument:
--selfreg %d %d %d.- sim_done_filea pathlike object or string representing a file
Create file when simulation finished. Maps to a command-line argument:
--sim-done %s.- sim_sign‘abs’ or ‘pos’ or ‘neg’
Abs, pos, or neg. Maps to a command-line argument:
--sim-sign %s.- simulationa tuple of the form: (‘perm’ or ‘mc-full’ or ‘mc-z’, an integer (int or long), a float, a unicode string)
Nulltype nsim thresh csdbasename. Maps to a command-line argument:
--sim %s %d %f %s.- subject_ida unicode string
Subject id for surface geometry.
- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- surfa boolean
Analysis is on a surface mesh. Maps to a command-line argument:
--surf %s %s %s. Requires inputs:subject_id,hemi.- surf_geoa unicode string
Surface geometry name (e.g. white, pial). (Nipype default value:
white)- syntha boolean
Replace input with gaussian. Maps to a command-line argument:
--synth.- uniforma tuple of the form: (a float, a float)
Use uniform distribution instead of gaussian. Maps to a command-line argument:
--uniform %f %f.- var_fwhma floating point number >= 0.0
Smooth variance by fwhm. Maps to a command-line argument:
--var-fwhm %f.- vox_dumpa tuple of the form: (an integer (int or long), an integer (int or long), an integer (int or long))
Dump voxel GLM and exit. Maps to a command-line argument:
--voxdump %d %d %d.- weight_filea pathlike object or string representing an existing file
Weight for each input at each voxel. Mutually exclusive with inputs:
weighted_ls.- weight_inva boolean
Invert weights. Maps to a command-line argument:
--w-inv. Mutually exclusive with inputs:weighted_ls.- weight_sqrta boolean
Sqrt of weights. Maps to a command-line argument:
--w-sqrt. Mutually exclusive with inputs:weighted_ls.- weighted_lsa pathlike object or string representing an existing file
Weighted least squares. Maps to a command-line argument:
--wls %s. Mutually exclusive with inputs:weight_file,weight_inv,weight_sqrt.
- beta_filea pathlike object or string representing an existing file
Map of regression coefficients.
- dof_filea pathlike object or string representing a file
Text file with effective degrees-of-freedom for the analysis.
- error_filea pathlike object or string representing a file
Map of residual error.
- error_stddev_filea pathlike object or string representing a file
Map of residual error standard deviation.
- error_var_filea pathlike object or string representing a file
Map of residual error variance.
- estimate_filea pathlike object or string representing a file
Map of the estimated Y values.
- frame_eigenvectorsa pathlike object or string representing a file
Matrix of frame eigenvectors from residual PCA.
- ftest_filea list of items which are any value
Map of test statistic values.
- fwhm_filea pathlike object or string representing a file
Text file with estimated smoothness.
- gamma_filea list of items which are any value
Map of contrast of regression coefficients.
- gamma_var_filea list of items which are any value
Map of regression contrast variance.
- glm_dira pathlike object or string representing an existing directory
Output directory.
- mask_filea pathlike object or string representing a file
Map of the mask used in the analysis.
- sig_filea list of items which are any value
Map of F-test significance (in -log10p).
- singular_valuesa pathlike object or string representing a file
Matrix singular values from residual PCA.
- spatial_eigenvectorsa pathlike object or string representing a file
Map of spatial eigenvectors from residual PCA.
- svd_stats_filea pathlike object or string representing a file
Text file summarizing the residual PCA.
Label2Annot¶
Bases: FSCommand
Wrapped executable:
mris_label2annot.Converts a set of surface labels to an annotation file
Examples
>>> from nipype.interfaces.freesurfer import Label2Annot >>> l2a = Label2Annot() >>> l2a.inputs.hemisphere = 'lh' >>> l2a.inputs.subject_id = '10335' >>> l2a.inputs.in_labels = ['lh.aparc.label'] >>> l2a.inputs.orig = 'lh.pial' >>> l2a.inputs.out_annot = 'test' >>> l2a.cmdline 'mris_label2annot --hemi lh --l lh.aparc.label --a test --s 10335'
- hemisphere‘lh’ or ‘rh’
Input hemisphere. Maps to a command-line argument:
--hemi %s.- in_labelsa list of items which are any value
List of input label files. Maps to a command-line argument:
--l %s....- origa pathlike object or string representing an existing file
Implicit {hemisphere}.orig.
- out_annota string
Name of the annotation to create. Maps to a command-line argument:
--a %s.- subject_ida string
Subject name/ID. Maps to a command-line argument:
--s %s. (Nipype default value:subject_id)
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- color_tablea pathlike object or string representing an existing file
File that defines the structure names, their indices, and their color. Maps to a command-line argument:
--ctab %s.- copy_inputsa boolean
Copy implicit inputs and create a temp subjects_dir.
- environa 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:
{})- keep_maxa boolean
Keep label with highest ‘stat’ value. Maps to a command-line argument:
--maxstatwinner.- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- verbose_offa boolean
Turn off overlap and stat override messages. Maps to a command-line argument:
--noverbose.
- out_filea pathlike object or string representing an existing file
Output annotation file.
- Label2Annot.run(**inputs)¶
Execute this interface.
This interface will not raise an exception if runtime.returncode is non-zero.
- Parameters
cwd (specify a folder where the interface should be run) –
inputs (allows the interface settings to be updated) –
- Returns
results – A copy of the instance that was executed, provenance information and, if successful, results
- Return type
Label2Label¶
Bases: FSCommand
Wrapped executable:
mri_label2label.Converts a label in one subject’s space to a label in another subject’s space using either talairach or spherical as an intermediate registration space.
If a source mask is used, then the input label must have been created from a surface (ie, the vertex numbers are valid). The format can be anything supported by mri_convert or curv or paint. Vertices in the source label that do not meet threshold in the mask will be removed from the label.
Examples
>>> from nipype.interfaces.freesurfer import Label2Label >>> l2l = Label2Label() >>> l2l.inputs.hemisphere = 'lh' >>> l2l.inputs.subject_id = '10335' >>> l2l.inputs.sphere_reg = 'lh.pial' >>> l2l.inputs.white = 'lh.pial' >>> l2l.inputs.source_subject = 'fsaverage' >>> l2l.inputs.source_label = 'lh-pial.stl' >>> l2l.inputs.source_white = 'lh.pial' >>> l2l.inputs.source_sphere_reg = 'lh.pial' >>> l2l.cmdline 'mri_label2label --hemi lh --trglabel lh-pial_converted.stl --regmethod surface --srclabel lh-pial.stl --srcsubject fsaverage --trgsubject 10335'
- hemisphere‘lh’ or ‘rh’
Input hemisphere. Maps to a command-line argument:
--hemi %s.- source_labela pathlike object or string representing an existing file
Source label. Maps to a command-line argument:
--srclabel %s.- source_sphere_rega pathlike object or string representing an existing file
Implicit input <hemisphere>.sphere.reg.
- source_subjecta string
Source subject name. Maps to a command-line argument:
--srcsubject %s.- source_whitea pathlike object or string representing an existing file
Implicit input <hemisphere>.white.
- sphere_rega pathlike object or string representing an existing file
Implicit input <hemisphere>.sphere.reg.
- subject_ida string
Target subject. Maps to a command-line argument:
--trgsubject %s. (Nipype default value:subject_id)- whitea pathlike object or string representing an existing file
Implicit input <hemisphere>.white.
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- copy_inputsa boolean
If running as a node, set this to True.This will copy the input files to the node directory.
- environa 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:
{})- out_filea pathlike object or string representing a file
Target label. Maps to a command-line argument:
--trglabel %s.- registration_method‘surface’ or ‘volume’
Registration method. Maps to a command-line argument:
--regmethod %s. (Nipype default value:surface)- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- out_filea pathlike object or string representing an existing file
Output label.
- Label2Label.run(**inputs)¶
Execute this interface.
This interface will not raise an exception if runtime.returncode is non-zero.
- Parameters
cwd (specify a folder where the interface should be run) –
inputs (allows the interface settings to be updated) –
- Returns
results – A copy of the instance that was executed, provenance information and, if successful, results
- Return type
Label2Vol¶
Bases: FSCommand
Wrapped executable:
mri_label2vol.Make a binary volume from a Freesurfer label
Examples
>>> binvol = Label2Vol(label_file='cortex.label', template_file='structural.nii', reg_file='register.dat', fill_thresh=0.5, vol_label_file='foo_out.nii') >>> binvol.cmdline 'mri_label2vol --fillthresh 0.5 --label cortex.label --reg register.dat --temp structural.nii --o foo_out.nii'
- annot_filea pathlike object or string representing an existing file
Surface annotation file. Maps to a command-line argument:
--annot %s. Mutually exclusive with inputs:label_file,annot_file,seg_file,aparc_aseg. Requires inputs:subject_id,hemi.- aparc_asega boolean
Use aparc+aseg.mgz in subjectdir as seg. Maps to a command-line argument:
--aparc+aseg. Mutually exclusive with inputs:label_file,annot_file,seg_file,aparc_aseg.- label_filea list of items which are a pathlike object or string representing an existing file
List of label files. Maps to a command-line argument:
--label %s.... Mutually exclusive with inputs:label_file,annot_file,seg_file,aparc_aseg.- seg_filea pathlike object or string representing an existing file
Segmentation file. Maps to a command-line argument:
--seg %s. Mutually exclusive with inputs:label_file,annot_file,seg_file,aparc_aseg.- template_filea pathlike object or string representing an existing file
Output template volume. Maps to a command-line argument:
--temp %s.
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- environa 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:
{})- fill_thresh0.0 <= a floating point number <= 1.0
Thresh : between 0 and 1. Maps to a command-line argument:
--fillthresh %g.- hemi‘lh’ or ‘rh’
Hemisphere to use lh or rh. Maps to a command-line argument:
--hemi %s.- identitya boolean
Set R=I. Maps to a command-line argument:
--identity. Mutually exclusive with inputs:reg_file,reg_header,identity.- invert_mtxa boolean
Invert the registration matrix. Maps to a command-line argument:
--invertmtx.- label_hit_filea pathlike object or string representing a file
File with each frame is nhits for a label. Maps to a command-line argument:
--hits %s.- label_voxel_volumea float
Volume of each label point (def 1mm3). Maps to a command-line argument:
--labvoxvol %f.- map_label_stata pathlike object or string representing a file
Map the label stats field into the vol. Maps to a command-line argument:
--label-stat %s.- native_vox2rasa boolean
Use native vox2ras xform instead of tkregister-style. Maps to a command-line argument:
--native-vox2ras.- proja tuple of the form: (‘abs’ or ‘frac’, a float, a float, a float)
Project along surface normal. Maps to a command-line argument:
--proj %s %f %f %f. Requires inputs:subject_id,hemi.- reg_filea pathlike object or string representing an existing file
Tkregister style matrix VolXYZ = R*LabelXYZ. Maps to a command-line argument:
--reg %s. Mutually exclusive with inputs:reg_file,reg_header,identity.- reg_headera pathlike object or string representing an existing file
Label template volume. Maps to a command-line argument:
--regheader %s. Mutually exclusive with inputs:reg_file,reg_header,identity.- subject_ida unicode string
Subject id. Maps to a command-line argument:
--subject %s.- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- surfacea unicode string
Use surface instead of white. Maps to a command-line argument:
--surf %s.- vol_label_filea pathlike object or string representing a file
Output volume. Maps to a command-line argument:
--o %s.
- vol_label_filea pathlike object or string representing an existing file
Output volume.
MRISPreproc¶
Bases: FSCommand
Wrapped executable:
mris_preproc.Use FreeSurfer mris_preproc to prepare a group of contrasts for a second level analysis
Examples
>>> preproc = MRISPreproc() >>> preproc.inputs.target = 'fsaverage' >>> preproc.inputs.hemi = 'lh' >>> preproc.inputs.vol_measure_file = [('cont1.nii', 'register.dat'), ('cont1a.nii', 'register.dat')] >>> preproc.inputs.out_file = 'concatenated_file.mgz' >>> preproc.cmdline 'mris_preproc --hemi lh --out concatenated_file.mgz --target fsaverage --iv cont1.nii register.dat --iv cont1a.nii register.dat'
- hemi‘lh’ or ‘rh’
Hemisphere for source and target. Maps to a command-line argument:
--hemi %s.- targeta unicode string
Target subject name. Maps to a command-line argument:
--target %s.
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- environa 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:
{})- fsgd_filea pathlike object or string representing an existing file
Specify subjects using fsgd file. Maps to a command-line argument:
--fsgd %s. Mutually exclusive with inputs:subjects,fsgd_file,subject_file.- fwhma float
Smooth by fwhm mm on the target surface. Maps to a command-line argument:
--fwhm %f. Mutually exclusive with inputs:num_iters.- fwhm_sourcea float
Smooth by fwhm mm on the source surface. Maps to a command-line argument:
--fwhm-src %f. Mutually exclusive with inputs:num_iters_source.- num_itersan integer (int or long)
Niters : smooth by niters on the target surface. Maps to a command-line argument:
--niters %d. Mutually exclusive with inputs:fwhm.- num_iters_sourcean integer (int or long)
Niters : smooth by niters on the source surface. Maps to a command-line argument:
--niterssrc %d. Mutually exclusive with inputs:fwhm_source.- out_filea pathlike object or string representing a file
Output filename. Maps to a command-line argument:
--out %s.- proj_fraca float
Projection fraction for vol2surf. Maps to a command-line argument:
--projfrac %s.- smooth_cortex_onlya boolean
Only smooth cortex (ie, exclude medial wall). Maps to a command-line argument:
--smooth-cortex-only.- source_formata unicode string
Source format. Maps to a command-line argument:
--srcfmt %s.- subject_filea pathlike object or string representing an existing file
File specifying subjects separated by white space. Maps to a command-line argument:
--f %s. Mutually exclusive with inputs:subjects,fsgd_file,subject_file.- subjectsa list of items which are any value
Subjects from who measures are calculated. Maps to a command-line argument:
--s %s.... Mutually exclusive with inputs:subjects,fsgd_file,subject_file.- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- surf_areaa unicode string
Extract vertex area from subject/surf/hemi.surfname to use as input. Maps to a command-line argument:
--area %s. Mutually exclusive with inputs:surf_measure,surf_measure_file,surf_area.- surf_dira unicode string
Alternative directory (instead of surf). Maps to a command-line argument:
--surfdir %s.- surf_measurea unicode string
Use subject/surf/hemi.surf_measure as input. Maps to a command-line argument:
--meas %s. Mutually exclusive with inputs:surf_measure,surf_measure_file,surf_area.- surf_measure_filea list of items which are a pathlike object or string representing an existing file
File alternative to surfmeas, still requires list of subjects. Maps to a command-line argument:
--is %s.... Mutually exclusive with inputs:surf_measure,surf_measure_file,surf_area.- vol_measure_filea list of items which are a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file)
List of volume measure and reg file tuples. Maps to a command-line argument:
--iv %s %s....
- out_filea pathlike object or string representing a file
Preprocessed output file.
MRISPreprocReconAll¶
Bases: MRISPreproc
Wrapped executable:
mris_preproc.Extends MRISPreproc to allow it to be used in a recon-all workflow
Examples
>>> preproc = MRISPreprocReconAll() >>> preproc.inputs.target = 'fsaverage' >>> preproc.inputs.hemi = 'lh' >>> preproc.inputs.vol_measure_file = [('cont1.nii', 'register.dat'), ('cont1a.nii', 'register.dat')] >>> preproc.inputs.out_file = 'concatenated_file.mgz' >>> preproc.cmdline 'mris_preproc --hemi lh --out concatenated_file.mgz --s subject_id --target fsaverage --iv cont1.nii register.dat --iv cont1a.nii register.dat'
- hemi‘lh’ or ‘rh’
Hemisphere for source and target. Maps to a command-line argument:
--hemi %s.- targeta unicode string
Target subject name. Maps to a command-line argument:
--target %s.
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- copy_inputsa boolean
If running as a node, set this to True this will copy some implicit inputs to the node directory.
- environa 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:
{})- fsgd_filea pathlike object or string representing an existing file
Specify subjects using fsgd file. Maps to a command-line argument:
--fsgd %s. Mutually exclusive with inputs:subjects,fsgd_file,subject_file.- fwhma float
Smooth by fwhm mm on the target surface. Maps to a command-line argument:
--fwhm %f. Mutually exclusive with inputs:num_iters.- fwhm_sourcea float
Smooth by fwhm mm on the source surface. Maps to a command-line argument:
--fwhm-src %f. Mutually exclusive with inputs:num_iters_source.- lh_surfreg_targeta pathlike object or string representing a file
Implicit target surface registration file. Requires inputs:
surfreg_files.- num_itersan integer (int or long)
Niters : smooth by niters on the target surface. Maps to a command-line argument:
--niters %d. Mutually exclusive with inputs:fwhm.- num_iters_sourcean integer (int or long)
Niters : smooth by niters on the source surface. Maps to a command-line argument:
--niterssrc %d. Mutually exclusive with inputs:fwhm_source.- out_filea pathlike object or string representing a file
Output filename. Maps to a command-line argument:
--out %s.- proj_fraca float
Projection fraction for vol2surf. Maps to a command-line argument:
--projfrac %s.- rh_surfreg_targeta pathlike object or string representing a file
Implicit target surface registration file. Requires inputs:
surfreg_files.- smooth_cortex_onlya boolean
Only smooth cortex (ie, exclude medial wall). Maps to a command-line argument:
--smooth-cortex-only.- source_formata unicode string
Source format. Maps to a command-line argument:
--srcfmt %s.- subject_filea pathlike object or string representing an existing file
File specifying subjects separated by white space. Maps to a command-line argument:
--f %s. Mutually exclusive with inputs:subjects,fsgd_file,subject_file.- subject_ida string
Subject from whom measures are calculated. Maps to a command-line argument:
--s %s. Mutually exclusive with inputs:subjects,fsgd_file,subject_file,subject_id. (Nipype default value:subject_id)- subjectsa list of items which are any value
Subjects from who measures are calculated. Maps to a command-line argument:
--s %s.... Mutually exclusive with inputs:subjects,fsgd_file,subject_file.- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- surf_areaa unicode string
Extract vertex area from subject/surf/hemi.surfname to use as input. Maps to a command-line argument:
--area %s. Mutually exclusive with inputs:surf_measure,surf_measure_file,surf_area.- surf_dira unicode string
Alternative directory (instead of surf). Maps to a command-line argument:
--surfdir %s.- surf_measurea unicode string
Use subject/surf/hemi.surf_measure as input. Maps to a command-line argument:
--meas %s. Mutually exclusive with inputs:surf_measure,surf_measure_file,surf_area.- surf_measure_filea pathlike object or string representing an existing file
File necessary for surfmeas. Maps to a command-line argument:
--meas %s. Mutually exclusive with inputs:surf_measure,surf_measure_file,surf_area.- surfreg_filesa list of items which are a pathlike object or string representing an existing file
Lh and rh input surface registration files. Maps to a command-line argument:
--surfreg %s. Requires inputs:lh_surfreg_target,rh_surfreg_target.- vol_measure_filea list of items which are a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file)
List of volume measure and reg file tuples. Maps to a command-line argument:
--iv %s %s....
- out_filea pathlike object or string representing a file
Preprocessed output file.
- MRISPreprocReconAll.run(**inputs)¶
Execute this interface.
This interface will not raise an exception if runtime.returncode is non-zero.
- Parameters
cwd (specify a folder where the interface should be run) –
inputs (allows the interface settings to be updated) –
- Returns
results – A copy of the instance that was executed, provenance information and, if successful, results
- Return type
MS_LDA¶
Bases: FSCommand
Wrapped executable:
mri_ms_LDA.Perform LDA reduction on the intensity space of an arbitrary # of FLASH images
Examples
>>> grey_label = 2 >>> white_label = 3 >>> zero_value = 1 >>> optimalWeights = MS_LDA(lda_labels=[grey_label, white_label], label_file='label.mgz', weight_file='weights.txt', shift=zero_value, vol_synth_file='synth_out.mgz', conform=True, use_weights=True, images=['FLASH1.mgz', 'FLASH2.mgz', 'FLASH3.mgz']) >>> optimalWeights.cmdline 'mri_ms_LDA -conform -label label.mgz -lda 2 3 -shift 1 -W -synth synth_out.mgz -weight weights.txt FLASH1.mgz FLASH2.mgz FLASH3.mgz'
- imagesa list of items which are a pathlike object or string representing an existing file
List of input FLASH images. Maps to a command-line argument:
%s(position: -1).- lda_labelsa list of from 2 to 2 items which are an integer (int or long)
Pair of class labels to optimize. Maps to a command-line argument:
-lda %s.- vol_synth_filea pathlike object or string representing a file
Filename for the synthesized output volume. Maps to a command-line argument:
-synth %s.- weight_filea pathlike object or string representing a file
Filename for the LDA weights (input or output). Maps to a command-line argument:
-weight %s.
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- conforma boolean
Conform the input volumes (brain mask typically already conformed). Maps to a command-line argument:
-conform.- environa 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_filea pathlike object or string representing an existing file
Filename of the label volume. Maps to a command-line argument:
-label %s.- mask_filea pathlike object or string representing an existing file
Filename of the brain mask volume. Maps to a command-line argument:
-mask %s.- shiftan integer (int or long)
Shift all values equal to the given value to zero. Maps to a command-line argument:
-shift %d.- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- use_weightsa boolean
Use the weights from a previously generated weight file. Maps to a command-line argument:
-W.vol_synth_file : a pathlike object or string representing an existing file weight_file : a pathlike object or string representing an existing file
OneSampleTTest¶
Bases: GLMFit
Wrapped executable:
mri_glmfit.
- in_filea pathlike object or string representing a file
Input 4D file. Maps to a command-line argument:
--y %s.
- allow_ill_conda boolean
Allow ill-conditioned design matrices. Maps to a command-line argument:
--illcond.- allow_repeated_subjectsa boolean
Allow subject names to repeat in the fsgd file (must appear before –fsgd. Maps to a command-line argument:
--allowsubjrep.- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- calc_AR1a boolean
Compute and save temporal AR1 of residual. Maps to a command-line argument:
--tar1.- check_optsa boolean
Don’t run anything, just check options and exit. Maps to a command-line argument:
--checkopts.- compute_log_ya boolean
Compute natural log of y prior to analysis. Maps to a command-line argument:
--logy.- contrasta list of items which are a pathlike object or string representing an existing file
Contrast file. Maps to a command-line argument:
--C %s....- cortexa boolean
Use subjects ?h.cortex.label as label. Maps to a command-line argument:
--cortex. Mutually exclusive with inputs:label_file.- debuga boolean
Turn on debugging. Maps to a command-line argument:
--debug.- designa pathlike object or string representing an existing file
Design matrix file. Maps to a command-line argument:
--X %s. Mutually exclusive with inputs:fsgd,design,one_sample.- diagan integer (int or long)
Gdiag_no : set diagnositc level. Maps to a command-line argument:
--diag %d.- diag_clustera boolean
Save sig volume and exit from first sim loop. Maps to a command-line argument:
--diag-cluster.- environa 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:
{})- fixed_fx_dofan integer (int or long)
Dof for fixed effects analysis. Maps to a command-line argument:
--ffxdof %d. Mutually exclusive with inputs:fixed_fx_dof_file.- fixed_fx_dof_filea pathlike object or string representing a file
Text file with dof for fixed effects analysis. Maps to a command-line argument:
--ffxdofdat %d. Mutually exclusive with inputs:fixed_fx_dof.- fixed_fx_vara pathlike object or string representing an existing file
For fixed effects analysis. Maps to a command-line argument:
--yffxvar %s.- force_perma boolean
Force perumtation test, even when design matrix is not orthog. Maps to a command-line argument:
--perm-force.- fsgda tuple of the form: (a pathlike object or string representing an existing file, ‘doss’ or ‘dods’)
Freesurfer descriptor file. Maps to a command-line argument:
--fsgd %s %s. Mutually exclusive with inputs:fsgd,design,one_sample.- fwhma floating point number >= 0.0
Smooth input by fwhm. Maps to a command-line argument:
--fwhm %f.- glm_dira unicode string
Save outputs to dir. Maps to a command-line argument:
--glmdir %s.- hemi‘lh’ or ‘rh’
Surface hemisphere.
- invert_maska boolean
Invert mask. Maps to a command-line argument:
--mask-inv.- label_filea pathlike object or string representing an existing file
Use label as mask, surfaces only. Maps to a command-line argument:
--label %s. Mutually exclusive with inputs:cortex.- mask_filea pathlike object or string representing an existing file
Binary mask. Maps to a command-line argument:
--mask %s.- no_contrast_oka boolean
Do not fail if no contrasts specified. Maps to a command-line argument:
--no-contrasts-ok.- no_est_fwhma boolean
Turn off FWHM output estimation. Maps to a command-line argument:
--no-est-fwhm.- no_mask_smootha boolean
Do not mask when smoothing. Maps to a command-line argument:
--no-mask-smooth.- no_prunea boolean
Do not prune. Maps to a command-line argument:
--no-prune. Mutually exclusive with inputs:prunethresh.- one_samplea boolean
Construct X and C as a one-sample group mean. Maps to a command-line argument:
--osgm. Mutually exclusive with inputs:one_sample,fsgd,design,contrast.- pcaa boolean
Perform pca/svd analysis on residual. Maps to a command-line argument:
--pca.- per_voxel_rega list of items which are a pathlike object or string representing an existing file
Per-voxel regressors. Maps to a command-line argument:
--pvr %s....- profilean integer (int or long)
Niters : test speed. Maps to a command-line argument:
--profile %d.- prunea boolean
Remove voxels that do not have a non-zero value at each frame (def). Maps to a command-line argument:
--prune.- prune_thresha float
Prune threshold. Default is FLT_MIN. Maps to a command-line argument:
--prune_thr %f. Mutually exclusive with inputs:noprune.- resynth_testan integer (int or long)
Test GLM by resynthsis. Maps to a command-line argument:
--resynthtest %d.- save_conda boolean
Flag to save design matrix condition at each voxel. Maps to a command-line argument:
--save-cond.- save_estimatea boolean
Save signal estimate (yhat). Maps to a command-line argument:
--yhat-save.- save_res_corr_mtxa boolean
Save residual error spatial correlation matrix (eres.scm). Big!. Maps to a command-line argument:
--eres-scm.- save_residuala boolean
Save residual error (eres). Maps to a command-line argument:
--eres-save.- seedan integer (int or long)
Used for synthesizing noise. Maps to a command-line argument:
--seed %d.- self_rega tuple of the form: (an integer (int or long), an integer (int or long), an integer (int or long))
Self-regressor from index col row slice. Maps to a command-line argument:
--selfreg %d %d %d.- sim_done_filea pathlike object or string representing a file
Create file when simulation finished. Maps to a command-line argument:
--sim-done %s.- sim_sign‘abs’ or ‘pos’ or ‘neg’
Abs, pos, or neg. Maps to a command-line argument:
--sim-sign %s.- simulationa tuple of the form: (‘perm’ or ‘mc-full’ or ‘mc-z’, an integer (int or long), a float, a unicode string)
Nulltype nsim thresh csdbasename. Maps to a command-line argument:
--sim %s %d %f %s.- subject_ida unicode string
Subject id for surface geometry.
- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- surfa boolean
Analysis is on a surface mesh. Maps to a command-line argument:
--surf %s %s %s. Requires inputs:subject_id,hemi.- surf_geoa unicode string
Surface geometry name (e.g. white, pial). (Nipype default value:
white)- syntha boolean
Replace input with gaussian. Maps to a command-line argument:
--synth.- uniforma tuple of the form: (a float, a float)
Use uniform distribution instead of gaussian. Maps to a command-line argument:
--uniform %f %f.- var_fwhma floating point number >= 0.0
Smooth variance by fwhm. Maps to a command-line argument:
--var-fwhm %f.- vox_dumpa tuple of the form: (an integer (int or long), an integer (int or long), an integer (int or long))
Dump voxel GLM and exit. Maps to a command-line argument:
--voxdump %d %d %d.- weight_filea pathlike object or string representing an existing file
Weight for each input at each voxel. Mutually exclusive with inputs:
weighted_ls.- weight_inva boolean
Invert weights. Maps to a command-line argument:
--w-inv. Mutually exclusive with inputs:weighted_ls.- weight_sqrta boolean
Sqrt of weights. Maps to a command-line argument:
--w-sqrt. Mutually exclusive with inputs:weighted_ls.- weighted_lsa pathlike object or string representing an existing file
Weighted least squares. Maps to a command-line argument:
--wls %s. Mutually exclusive with inputs:weight_file,weight_inv,weight_sqrt.
- beta_filea pathlike object or string representing an existing file
Map of regression coefficients.
- dof_filea pathlike object or string representing a file
Text file with effective degrees-of-freedom for the analysis.
- error_filea pathlike object or string representing a file
Map of residual error.
- error_stddev_filea pathlike object or string representing a file
Map of residual error standard deviation.
- error_var_filea pathlike object or string representing a file
Map of residual error variance.
- estimate_filea pathlike object or string representing a file
Map of the estimated Y values.
- frame_eigenvectorsa pathlike object or string representing a file
Matrix of frame eigenvectors from residual PCA.
- ftest_filea list of items which are any value
Map of test statistic values.
- fwhm_filea pathlike object or string representing a file
Text file with estimated smoothness.
- gamma_filea list of items which are any value
Map of contrast of regression coefficients.
- gamma_var_filea list of items which are any value
Map of regression contrast variance.
- glm_dira pathlike object or string representing an existing directory
Output directory.
- mask_filea pathlike object or string representing a file
Map of the mask used in the analysis.
- sig_filea list of items which are any value
Map of F-test significance (in -log10p).
- singular_valuesa pathlike object or string representing a file
Matrix singular values from residual PCA.
- spatial_eigenvectorsa pathlike object or string representing a file
Map of spatial eigenvectors from residual PCA.
- svd_stats_filea pathlike object or string representing a file
Text file summarizing the residual PCA.
SegStats¶
Bases: FSCommand
Wrapped executable:
mri_segstats.Use FreeSurfer mri_segstats for ROI analysis
Examples
>>> import nipype.interfaces.freesurfer as fs >>> ss = fs.SegStats() >>> ss.inputs.annot = ('PWS04', 'lh', 'aparc') >>> ss.inputs.in_file = 'functional.nii' >>> ss.inputs.subjects_dir = '.' >>> ss.inputs.avgwf_txt_file = 'avgwf.txt' >>> ss.inputs.summary_file = 'summary.stats' >>> ss.cmdline 'mri_segstats --annot PWS04 lh aparc --avgwf ./avgwf.txt --i functional.nii --sum ./summary.stats'
- annota tuple of the form: (a unicode string, ‘lh’ or ‘rh’, a unicode string)
Subject hemi parc : use surface parcellation. Maps to a command-line argument:
--annot %s %s %s. Mutually exclusive with inputs:segmentation_file,annot,surf_label.- segmentation_filea pathlike object or string representing an existing file
Segmentation volume path. Maps to a command-line argument:
--seg %s. Mutually exclusive with inputs:segmentation_file,annot,surf_label.- surf_labela tuple of the form: (a unicode string, ‘lh’ or ‘rh’, a unicode string)
Subject hemi label : use surface label. Maps to a command-line argument:
--slabel %s %s %s. Mutually exclusive with inputs:segmentation_file,annot,surf_label.
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- avgwf_filea boolean or a pathlike object or string representing a file
Save as binary volume (bool or filename). Maps to a command-line argument:
--avgwfvol %s.- avgwf_txt_filea boolean or a pathlike object or string representing a file
Save average waveform into file (bool or filename). Maps to a command-line argument:
--avgwf %s.- brain_vol‘brain-vol-from-seg’ or ‘brainmask’
Compute brain volume either with
brainmaskorbrain-vol-from-seg. Maps to a command-line argument:--%s.- brainmask_filea pathlike object or string representing an existing file
Load brain mask and compute the volume of the brain as the non-zero voxels in this volume. Maps to a command-line argument:
--brainmask %s.- calc_power‘sqr’ or ‘sqrt’
Compute either the sqr or the sqrt of the input. Maps to a command-line argument:
--%s.- calc_snra boolean
Save mean/std as extra column in output table. Maps to a command-line argument:
--snr.- color_table_filea pathlike object or string representing an existing file
Color table file with seg id names. Maps to a command-line argument:
--ctab %s. Mutually exclusive with inputs:color_table_file,default_color_table,gca_color_table.- cortex_vol_from_surfa boolean
Compute cortex volume from surf. Maps to a command-line argument:
--surf-ctx-vol.- default_color_tablea boolean
Use $FREESURFER_HOME/FreeSurferColorLUT.txt. Maps to a command-line argument:
--ctab-default. Mutually exclusive with inputs:color_table_file,default_color_table,gca_color_table.- emptya boolean
Report on segmentations listed in the color table. Maps to a command-line argument:
--empty.- environa 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:
{})- etiva boolean
Compute ICV from talairach transform. Maps to a command-line argument:
--etiv.- etiv_only‘etiv’ or ‘old-etiv’ or ‘–%s-only’
Compute etiv and exit. Use
etivorold-etiv.- eulera boolean
Write out number of defect holes in orig.nofix based on the euler number. Maps to a command-line argument:
--euler.- exclude_ctx_gm_wma boolean
Exclude cortical gray and white matter. Maps to a command-line argument:
--excl-ctxgmwm.- exclude_idan integer (int or long)
Exclude seg id from report. Maps to a command-line argument:
--excludeid %d.- framean integer (int or long)
Report stats on nth frame of input volume. Maps to a command-line argument:
--frame %d.- gca_color_tablea pathlike object or string representing an existing file
Get color table from GCA (CMA). Maps to a command-line argument:
--ctab-gca %s. Mutually exclusive with inputs:color_table_file,default_color_table,gca_color_table.- in_filea pathlike object or string representing an existing file
Use the segmentation to report stats on this volume. Maps to a command-line argument:
--i %s.- in_intensitya pathlike object or string representing a file
Undocumented input norm.mgz file. Maps to a command-line argument:
--in %s --in-intensity-name %s.- intensity_units‘MR’
Intensity units. Maps to a command-line argument:
--in-intensity-units %s. Requires inputs:in_intensity.- mask_erodean integer (int or long)
Erode mask by some amount. Maps to a command-line argument:
--maskerode %d.- mask_filea pathlike object or string representing an existing file
Mask volume (same size as seg. Maps to a command-line argument:
--mask %s.- mask_framean integer (int or long)
Mask with this (0 based) frame of the mask volume. Requires inputs:
mask_file.- mask_inverta boolean
Invert binarized mask volume. Maps to a command-line argument:
--maskinvert.- mask_sign‘abs’ or ‘pos’ or ‘neg’ or ‘–masksign %s’
Sign for mask threshold: pos, neg, or abs.
- mask_thresha float
Binarize mask with this threshold <0.5>. Maps to a command-line argument:
--maskthresh %f.- multiplya float
Multiply input by val. Maps to a command-line argument:
--mul %f.- non_empty_onlya boolean
Only report nonempty segmentations. Maps to a command-line argument:
--nonempty.- partial_volume_filea pathlike object or string representing an existing file
Compensate for partial voluming. Maps to a command-line argument:
--pv %s.- segment_ida list of items which are any value
Manually specify segmentation ids. Maps to a command-line argument:
--id %s....- sf_avg_filea boolean or a pathlike object or string representing a file
Save mean across space and time. Maps to a command-line argument:
--sfavg %s.- subcort_gma boolean
Compute volume of subcortical gray matter. Maps to a command-line argument:
--subcortgray.- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- summary_filea pathlike object or string representing a file
Segmentation stats summary table file. Maps to a command-line argument:
--sum %s(position: -1).- supratenta boolean
Undocumented input flag. Maps to a command-line argument:
--supratent.- total_graya boolean
Compute volume of total gray matter. Maps to a command-line argument:
--totalgray.- voxa list of items which are an integer (int or long)
Replace seg with all 0s except at C R S (three int inputs). Maps to a command-line argument:
--vox %s.- wm_vol_from_surfa boolean
Compute wm volume from surf. Maps to a command-line argument:
--surf-wm-vol.
- avgwf_filea pathlike object or string representing a file
Volume with functional statistics averaged over segs.
- avgwf_txt_filea pathlike object or string representing a file
Text file with functional statistics averaged over segs.
- sf_avg_filea pathlike object or string representing a file
Text file with func statistics averaged over segs and framss.
- summary_filea pathlike object or string representing an existing file
Segmentation summary statistics table.
SegStatsReconAll¶
Bases: SegStats
Wrapped executable:
mri_segstats.This class inherits SegStats and modifies it for use in a recon-all workflow. This implementation mandates implicit inputs that SegStats. To ensure backwards compatability of SegStats, this class was created.
Examples
>>> from nipype.interfaces.freesurfer import SegStatsReconAll >>> segstatsreconall = SegStatsReconAll() >>> segstatsreconall.inputs.annot = ('PWS04', 'lh', 'aparc') >>> segstatsreconall.inputs.avgwf_txt_file = 'avgwf.txt' >>> segstatsreconall.inputs.summary_file = 'summary.stats' >>> segstatsreconall.inputs.subject_id = '10335' >>> segstatsreconall.inputs.ribbon = 'wm.mgz' >>> segstatsreconall.inputs.transform = 'trans.mat' >>> segstatsreconall.inputs.presurf_seg = 'wm.mgz' >>> segstatsreconall.inputs.lh_orig_nofix = 'lh.pial' >>> segstatsreconall.inputs.rh_orig_nofix = 'lh.pial' >>> segstatsreconall.inputs.lh_pial = 'lh.pial' >>> segstatsreconall.inputs.rh_pial = 'lh.pial' >>> segstatsreconall.inputs.lh_white = 'lh.pial' >>> segstatsreconall.inputs.rh_white = 'lh.pial' >>> segstatsreconall.inputs.empty = True >>> segstatsreconall.inputs.brain_vol = 'brain-vol-from-seg' >>> segstatsreconall.inputs.exclude_ctx_gm_wm = True >>> segstatsreconall.inputs.supratent = True >>> segstatsreconall.inputs.subcort_gm = True >>> segstatsreconall.inputs.etiv = True >>> segstatsreconall.inputs.wm_vol_from_surf = True >>> segstatsreconall.inputs.cortex_vol_from_surf = True >>> segstatsreconall.inputs.total_gray = True >>> segstatsreconall.inputs.euler = True >>> segstatsreconall.inputs.exclude_id = 0 >>> segstatsreconall.cmdline 'mri_segstats --annot PWS04 lh aparc --avgwf ./avgwf.txt --brain-vol-from-seg --surf-ctx-vol --empty --etiv --euler --excl-ctxgmwm --excludeid 0 --subcortgray --subject 10335 --supratent --totalgray --surf-wm-vol --sum ./summary.stats'
- annota tuple of the form: (a unicode string, ‘lh’ or ‘rh’, a unicode string)
Subject hemi parc : use surface parcellation. Maps to a command-line argument:
--annot %s %s %s. Mutually exclusive with inputs:segmentation_file,annot,surf_label.- lh_orig_nofixa pathlike object or string representing an existing file
Input lh.orig.nofix.
- lh_piala pathlike object or string representing an existing file
Input file must be <subject_id>/surf/lh.pial.
- lh_whitea pathlike object or string representing an existing file
Input file must be <subject_id>/surf/lh.white.
- rh_orig_nofixa pathlike object or string representing an existing file
Input rh.orig.nofix.
- rh_piala pathlike object or string representing an existing file
Input file must be <subject_id>/surf/rh.pial.
- rh_whitea pathlike object or string representing an existing file
Input file must be <subject_id>/surf/rh.white.
- ribbona pathlike object or string representing an existing file
Input file mri/ribbon.mgz.
- segmentation_filea pathlike object or string representing an existing file
Segmentation volume path. Maps to a command-line argument:
--seg %s. Mutually exclusive with inputs:segmentation_file,annot,surf_label.- subject_ida string
Subject id being processed. Maps to a command-line argument:
--subject %s. (Nipype default value:subject_id)- surf_labela tuple of the form: (a unicode string, ‘lh’ or ‘rh’, a unicode string)
Subject hemi label : use surface label. Maps to a command-line argument:
--slabel %s %s %s. Mutually exclusive with inputs:segmentation_file,annot,surf_label.- transforma pathlike object or string representing an existing file
Input transform file.
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- asega pathlike object or string representing an existing file
Mandatory implicit input in 5.3.
- avgwf_filea boolean or a pathlike object or string representing a file
Save as binary volume (bool or filename). Maps to a command-line argument:
--avgwfvol %s.- avgwf_txt_filea boolean or a pathlike object or string representing a file
Save average waveform into file (bool or filename). Maps to a command-line argument:
--avgwf %s.- brain_vol‘brain-vol-from-seg’ or ‘brainmask’
Compute brain volume either with
brainmaskorbrain-vol-from-seg. Maps to a command-line argument:--%s.- brainmask_filea pathlike object or string representing an existing file
Load brain mask and compute the volume of the brain as the non-zero voxels in this volume. Maps to a command-line argument:
--brainmask %s.- calc_power‘sqr’ or ‘sqrt’
Compute either the sqr or the sqrt of the input. Maps to a command-line argument:
--%s.- calc_snra boolean
Save mean/std as extra column in output table. Maps to a command-line argument:
--snr.- color_table_filea pathlike object or string representing an existing file
Color table file with seg id names. Maps to a command-line argument:
--ctab %s. Mutually exclusive with inputs:color_table_file,default_color_table,gca_color_table.- copy_inputsa boolean
If running as a node, set this to True otherwise, this will copy the implicit inputs to the node directory.
- cortex_vol_from_surfa boolean
Compute cortex volume from surf. Maps to a command-line argument:
--surf-ctx-vol.- default_color_tablea boolean
Use $FREESURFER_HOME/FreeSurferColorLUT.txt. Maps to a command-line argument:
--ctab-default. Mutually exclusive with inputs:color_table_file,default_color_table,gca_color_table.- emptya boolean
Report on segmentations listed in the color table. Maps to a command-line argument:
--empty.- environa 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:
{})- etiva boolean
Compute ICV from talairach transform. Maps to a command-line argument:
--etiv.- etiv_only‘etiv’ or ‘old-etiv’ or ‘–%s-only’
Compute etiv and exit. Use
etivorold-etiv.- eulera boolean
Write out number of defect holes in orig.nofix based on the euler number. Maps to a command-line argument:
--euler.- exclude_ctx_gm_wma boolean
Exclude cortical gray and white matter. Maps to a command-line argument:
--excl-ctxgmwm.- exclude_idan integer (int or long)
Exclude seg id from report. Maps to a command-line argument:
--excludeid %d.- framean integer (int or long)
Report stats on nth frame of input volume. Maps to a command-line argument:
--frame %d.- gca_color_tablea pathlike object or string representing an existing file
Get color table from GCA (CMA). Maps to a command-line argument:
--ctab-gca %s. Mutually exclusive with inputs:color_table_file,default_color_table,gca_color_table.- in_filea pathlike object or string representing an existing file
Use the segmentation to report stats on this volume. Maps to a command-line argument:
--i %s.- in_intensitya pathlike object or string representing a file
Undocumented input norm.mgz file. Maps to a command-line argument:
--in %s --in-intensity-name %s.- intensity_units‘MR’
Intensity units. Maps to a command-line argument:
--in-intensity-units %s. Requires inputs:in_intensity.- mask_erodean integer (int or long)
Erode mask by some amount. Maps to a command-line argument:
--maskerode %d.- mask_filea pathlike object or string representing an existing file
Mask volume (same size as seg. Maps to a command-line argument:
--mask %s.- mask_framean integer (int or long)
Mask with this (0 based) frame of the mask volume. Requires inputs:
mask_file.- mask_inverta boolean
Invert binarized mask volume. Maps to a command-line argument:
--maskinvert.- mask_sign‘abs’ or ‘pos’ or ‘neg’ or ‘–masksign %s’
Sign for mask threshold: pos, neg, or abs.
- mask_thresha float
Binarize mask with this threshold <0.5>. Maps to a command-line argument:
--maskthresh %f.- multiplya float
Multiply input by val. Maps to a command-line argument:
--mul %f.- non_empty_onlya boolean
Only report nonempty segmentations. Maps to a command-line argument:
--nonempty.- partial_volume_filea pathlike object or string representing an existing file
Compensate for partial voluming. Maps to a command-line argument:
--pv %s.- presurf_sega pathlike object or string representing an existing file
Input segmentation volume.
- segment_ida list of items which are any value
Manually specify segmentation ids. Maps to a command-line argument:
--id %s....- sf_avg_filea boolean or a pathlike object or string representing a file
Save mean across space and time. Maps to a command-line argument:
--sfavg %s.- subcort_gma boolean
Compute volume of subcortical gray matter. Maps to a command-line argument:
--subcortgray.- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- summary_filea pathlike object or string representing a file
Segmentation stats summary table file. Maps to a command-line argument:
--sum %s(position: -1).- supratenta boolean
Undocumented input flag. Maps to a command-line argument:
--supratent.- total_graya boolean
Compute volume of total gray matter. Maps to a command-line argument:
--totalgray.- voxa list of items which are an integer (int or long)
Replace seg with all 0s except at C R S (three int inputs). Maps to a command-line argument:
--vox %s.- wm_vol_from_surfa boolean
Compute wm volume from surf. Maps to a command-line argument:
--surf-wm-vol.
- avgwf_filea pathlike object or string representing a file
Volume with functional statistics averaged over segs.
- avgwf_txt_filea pathlike object or string representing a file
Text file with functional statistics averaged over segs.
- sf_avg_filea pathlike object or string representing a file
Text file with func statistics averaged over segs and framss.
- summary_filea pathlike object or string representing an existing file
Segmentation summary statistics table.
- SegStatsReconAll.run(**inputs)¶
Execute this interface.
This interface will not raise an exception if runtime.returncode is non-zero.
- Parameters
cwd (specify a folder where the interface should be run) –
inputs (allows the interface settings to be updated) –
- Returns
results – A copy of the instance that was executed, provenance information and, if successful, results
- Return type
SphericalAverage¶
Bases: FSCommand
Wrapped executable:
mris_spherical_average.This program will add a template into an average surface.
Examples
>>> from nipype.interfaces.freesurfer import SphericalAverage >>> sphericalavg = SphericalAverage() >>> sphericalavg.inputs.out_file = 'test.out' >>> sphericalavg.inputs.in_average = '.' >>> sphericalavg.inputs.in_surf = 'lh.pial' >>> sphericalavg.inputs.hemisphere = 'lh' >>> sphericalavg.inputs.fname = 'lh.entorhinal' >>> sphericalavg.inputs.which = 'label' >>> sphericalavg.inputs.subject_id = '10335' >>> sphericalavg.inputs.erode = 2 >>> sphericalavg.inputs.threshold = 5 >>> sphericalavg.cmdline 'mris_spherical_average -erode 2 -o 10335 -t 5.0 label lh.entorhinal lh pial . test.out'
- fnamea string
Filename from the average subject directory. Example: to use rh.entorhinal.label as the input label filename, set fname to ‘rh.entorhinal’ and which to ‘label’. The program will then search for
<in_average>/label/rh.entorhinal.label. Maps to a command-line argument:%s(position: -5).- hemisphere‘lh’ or ‘rh’
Input hemisphere. Maps to a command-line argument:
%s(position: -4).- in_surfa pathlike object or string representing an existing file
Input surface file. Maps to a command-line argument:
%s(position: -3).- subject_ida string
Output subject id. Maps to a command-line argument:
-o %s.- which‘coords’ or ‘label’ or ‘vals’ or ‘curv’ or ‘area’
No documentation. Maps to a command-line argument:
%s(position: -6).
- argsa unicode string
Additional parameters to the command. Maps to a command-line argument:
%s.- environa 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:
{})- erodean integer (int or long)
Undocumented. Maps to a command-line argument:
-erode %d.- in_averagea pathlike object or string representing an existing directory
Average subject. Maps to a command-line argument:
%s(position: -2).- in_origa pathlike object or string representing an existing file
Original surface filename. Maps to a command-line argument:
-orig %s.- out_filea pathlike object or string representing a file
Output filename. Maps to a command-line argument:
%s(position: -1).- subjects_dira pathlike object or string representing an existing directory
Subjects directory.
- thresholda float
Undocumented. Maps to a command-line argument:
-t %.1f.
- out_filea pathlike object or string representing a file
Output label.
