nipype.interfaces.freesurfer.petsurfer module

Provides interfaces to various commands for running PET analyses provided by FreeSurfer

GTMPVC

Link to code

Bases: FSCommand

Wrapped executable: mri_gtmpvc.

create an anatomical segmentation for the geometric transfer matrix (GTM).

Examples

>>> gtmpvc = GTMPVC()
>>> gtmpvc.inputs.in_file = 'sub-01_ses-baseline_pet.nii.gz'
>>> gtmpvc.inputs.segmentation = 'gtmseg.mgz'
>>> gtmpvc.inputs.reg_file = 'sub-01_ses-baseline_pet_mean_reg.lta'
>>> gtmpvc.inputs.pvc_dir = 'pvc'
>>> gtmpvc.inputs.psf = 4
>>> gtmpvc.inputs.default_seg_merge = True
>>> gtmpvc.inputs.auto_mask = (1, 0.1)
>>> gtmpvc.inputs.km_ref = ['8 47']
>>> gtmpvc.inputs.km_hb = ['11 12 50 51']
>>> gtmpvc.inputs.no_rescale = True
>>> gtmpvc.inputs.save_input = True
>>> gtmpvc.cmdline  
'mri_gtmpvc --auto-mask 1.000000 0.100000 --default-seg-merge     --i sub-01_ses-baseline_pet.nii.gz --km-hb 11 12 50 51 --km-ref 8 47 --no-rescale     --psf 4.000000 --o pvc --reg sub-01_ses-baseline_pet_mean_reg.lta --save-input     --seg gtmseg.mgz'
>>> gtmpvc = GTMPVC()
>>> gtmpvc.inputs.in_file = 'sub-01_ses-baseline_pet.nii.gz'
>>> gtmpvc.inputs.segmentation = 'gtmseg.mgz'
>>> gtmpvc.inputs.regheader = True
>>> gtmpvc.inputs.pvc_dir = 'pvc'
>>> gtmpvc.inputs.mg = (0.5, ["ROI1", "ROI2"])
>>> gtmpvc.cmdline  
'mri_gtmpvc --i sub-01_ses-baseline_pet.nii.gz --mg 0.5 ROI1 ROI2 --o pvc --regheader --seg gtmseg.mgz'
Mandatory Inputs:
  • in_file (a pathlike object or string representing an existing file) – Input volume - source data to pvc. Maps to a command-line argument: --i %s.

  • reg_file (a pathlike object or string representing an existing file) – LTA registration file that maps PET to anatomical. Maps to a command-line argument: --reg %s. Mutually exclusive with inputs: reg_file, regheader, reg_identity.

  • reg_identity (a boolean) – Assume that input is in anatomical space. Maps to a command-line argument: --reg-identity. Mutually exclusive with inputs: reg_file, regheader, reg_identity.

  • regheader (a boolean) – Assume input and seg share scanner space. Maps to a command-line argument: --regheader. Mutually exclusive with inputs: reg_file, regheader, reg_identity.

  • segmentation (a pathlike object or string representing an existing file) – Segfile : anatomical segmentation to define regions for GTM. Maps to a command-line argument: --seg %s.

Optional Inputs:
  • X (a boolean) – Save X matrix in matlab4 format as X.mat (it will be big). Maps to a command-line argument: --X.

  • X0 (a boolean) – Save X0 matrix in matlab4 format as X0.mat (it will be big). Maps to a command-line argument: --X0.

  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • auto_mask (a tuple of the form: (a float, a float)) – FWHM thresh : automatically compute mask. Maps to a command-line argument: --auto-mask %f %f.

  • beta (a boolean) – Save beta matrix in matlab4 format as beta.mat. Maps to a command-line argument: --beta.

  • color_table_file (a 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.

  • contrast (a list of items which are a pathlike object or string representing an existing file) – Contrast file. Maps to a command-line argument: --C %s....

  • default_color_table (a boolean) – Use $FREESURFER_HOME/FreeSurferColorLUT.txt. Maps to a command-line argument: --ctab-default. Mutually exclusive with inputs: color_table_file, default_color_table.

  • default_seg_merge (a boolean) – Default schema for merging ROIs. Maps to a command-line argument: --default-seg-merge.

  • 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: {})

  • frame (an integer) – Only process 0-based frame F from inputvol. Maps to a command-line argument: --frame %i.

  • km_hb (a list of items which are any value) – RefId1 RefId2 … : compute HiBinding TAC for KM as mean of given RefIds. Maps to a command-line argument: --km-hb %s....

  • km_ref (a list of items which are any value) – RefId1 RefId2 … : compute reference TAC for KM as mean of given RefIds. Maps to a command-line argument: --km-ref %s....

  • lat (a boolean) – Lateralize tissue types. Maps to a command-line argument: --lat.

  • mask_file (a pathlike object or string representing an existing file) – Ignore areas outside of the mask (in input vol space). Maps to a command-line argument: --mask %s.

  • merge_cblum_wm_gyri (a boolean) – Cerebellum WM gyri back into cerebellum WM. Maps to a command-line argument: --merge-cblum-wm-gyri.

  • merge_hypos (a boolean) – Merge left and right hypointensites into to ROI. Maps to a command-line argument: --merge-hypos.

  • mg (a tuple of the form: (a float, a list of items which are a string)) – Gmthresh RefId1 RefId2 …: perform Mueller-Gaertner PVC, gmthresh is min gm pvf bet 0 and 1. Maps to a command-line argument: --mg %g %s.

  • mg_ref_cerebral_wm (a boolean) – set MG RefIds to 2 and 41. Maps to a command-line argument: --mg-ref-cerebral-wm.

  • mg_ref_lobes_wm (a boolean) – Set MG RefIds to those for lobes when using wm subseg. Maps to a command-line argument: --mg-ref-lobes-wm.

  • mgx (a float) – Gmxthresh : GLM-based Mueller-Gaertner PVC, gmxthresh is min gm pvf bet 0 and 1. Maps to a command-line argument: --mgx %f.

  • no_pvc (a boolean) – Turns off PVC entirely (both PSF and TFE). Maps to a command-line argument: --no-pvc.

  • no_reduce_fov (a boolean) – Do not reduce FoV to encompass mask. Maps to a command-line argument: --no-reduce-fov.

  • no_rescale (a boolean) – Do not global rescale such that mean of reference region is scaleref. Maps to a command-line argument: --no-rescale.

  • no_tfe (a boolean) – Do not correct for tissue fraction effect (with –psf 0 turns off PVC entirely). Maps to a command-line argument: --no-tfe.

  • num_threads (an integer) – Threads : number of threads to use. Maps to a command-line argument: --threads %i.

  • opt_brain (a boolean) – Apply adaptive GTM. Maps to a command-line argument: --opt-brain.

  • opt_seg_merge (a boolean) – Optimal schema for merging ROIs when applying adaptive GTM. Maps to a command-line argument: --opt-seg-merge.

  • opt_tol (a tuple of the form: (an integer, a float, a float)) – N_iters_max ftol lin_min_tol : optimization parameters for adaptive gtm using fminsearch. Maps to a command-line argument: --opt-tol %i %f %f.

  • optimization_schema (‘3D’ or ‘2D’ or ‘1D’ or ‘3D_MB’ or ‘2D_MB’ or ‘1D_MB’ or ‘MBZ’ or ‘MB3’) – Opt : optimization schema for applying adaptive GTM. Maps to a command-line argument: --opt %s.

  • psf (a float) – Scanner PSF FWHM in mm. Maps to a command-line argument: --psf %f.

  • psf_col (a float) – XFWHM : full-width-half-maximum in the x-direction. Maps to a command-line argument: --psf-col %f.

  • psf_row (a float) – YFWHM : full-width-half-maximum in the y-direction. Maps to a command-line argument: --psf-row %f.

  • psf_slice (a float) – ZFWHM : full-width-half-maximum in the z-direction. Maps to a command-line argument: --psf-slice %f.

  • pvc_dir (a string) – Save outputs to dir. Maps to a command-line argument: --o %s.

  • rbv (a boolean) – Perform Region-based Voxelwise (RBV) PVC. Maps to a command-line argument: --rbv. Requires inputs: subjects_dir.

  • rbv_res (a float) – Voxsize : set RBV voxel resolution (good for when standard res takes too much memory). Maps to a command-line argument: --rbv-res %f.

  • reduce_fox_eqodd (a boolean) – Reduce FoV to encompass mask but force nc=nr and ns to be odd. Maps to a command-line argument: --reduce-fox-eqodd.

  • replace (a tuple of the form: (an integer, an integer)) – Id1 Id2 : replace seg Id1 with seg Id2. Maps to a command-line argument: --replace %i %i.

  • rescale (a list of items which are any value) – Id1 <Id2…> : specify reference region(s) used to rescale (default is pons). Maps to a command-line argument: --rescale %s....

  • save_eres (a boolean) – Saves residual error. Maps to a command-line argument: --save-eres.

  • save_input (a boolean) – Saves rescaled input as input.rescaled.nii.gz. Maps to a command-line argument: --save-input.

  • save_yhat (a boolean) – Save signal estimate (yhat) smoothed with the PSF. Maps to a command-line argument: --save-yhat. Mutually exclusive with inputs: save_yhat_with_noise.

  • save_yhat0 (a boolean) – Save signal estimate (yhat). Maps to a command-line argument: --save-yhat0.

  • save_yhat_full_fov (a boolean) – Save signal estimate (yhat). Maps to a command-line argument: --save-yhat-full-fov.

  • save_yhat_with_noise (a tuple of the form: (an integer, an integer)) – Seed nreps : save signal estimate (yhat) with noise. Maps to a command-line argument: --save-yhat-with-noise %i %i. Mutually exclusive with inputs: save_yhat.

  • scale_refval (a float) – Refval : scale such that mean in reference region is refval. Maps to a command-line argument: --scale-refval %f.

  • steady_state_params (a tuple of the form: (a float, a float, a float)) – Bpc scale dcf : steady-state analysis spec blood plasma concentration, unit scale and decay correction factor. You must also spec –km-ref. Turns off rescaling. Maps to a command-line argument: --ss %f %f %f.

  • subjects_dir (a pathlike object or string representing an existing directory) – Subjects directory.

  • tissue_fraction_resolution (a float) – Set the tissue fraction resolution parameter (def is 0.5). Maps to a command-line argument: --segpvfres %f.

  • tt_reduce (a boolean) – Reduce segmentation to that of a tissue type. Maps to a command-line argument: --tt-reduce.

  • tt_update (a boolean) – Changes tissue type of VentralDC, BrainStem, and Pons to be SubcortGM. Maps to a command-line argument: --tt-update.

  • y (a boolean) – Save y matrix in matlab4 format as y.mat. Maps to a command-line argument: --y.

Outputs:
  • gtm_file (a pathlike object or string representing a file) – TACs for all regions with GTM PVC.

  • gtm_stats (a pathlike object or string representing a file) – Statistics for the GTM PVC.

  • hb_dat (a pathlike object or string representing a file) – High-binding TAC in .dat.

  • hb_nifti (a pathlike object or string representing a file) – High-binding TAC in nifti.

  • input_file (a pathlike object or string representing a file) – 4D PET file in native volume space.

  • mgx_ctxgm (a pathlike object or string representing a file) – Cortical GM voxel-wise values corrected using the extended Muller-Gartner method.

  • mgx_gm (a pathlike object or string representing a file) – All GM voxel-wise values corrected using the extended Muller-Gartner method.

  • mgx_subctxgm (a pathlike object or string representing a file) – Subcortical GM voxel-wise values corrected using the extended Muller-Gartner method.

  • nopvc_file (a pathlike object or string representing a file) – TACs for all regions with no PVC.

  • opt_params (a pathlike object or string representing a file) – Optimal parameter estimates for the FWHM using adaptive GTM.

  • pvc_dir (a pathlike object or string representing a directory) – Output directory.

  • rbv (a pathlike object or string representing a file) – All GM voxel-wise values corrected using the RBV method.

  • ref_file (a pathlike object or string representing a file) – Reference TAC in .dat.

  • reg_anat2pet (a pathlike object or string representing a file) – Registration file to go from anat to PET.

  • reg_anat2rbvpet (a pathlike object or string representing a file) – Registration file to go from anat to RBV corrected PET.

  • reg_pet2anat (a pathlike object or string representing a file) – Registration file to go from PET to anat.

  • reg_rbvpet2anat (a pathlike object or string representing a file) – Registration file to go from RBV corrected PET to anat.

  • yhat (a pathlike object or string representing a file) – 4D PET file of signal estimate (yhat) after PVC (smoothed with PSF).

  • yhat0 (a pathlike object or string representing a file) – 4D PET file of signal estimate (yhat) after PVC (unsmoothed).

  • yhat_full_fov (a pathlike object or string representing a file) – 4D PET file with full FOV of signal estimate (yhat) after PVC (smoothed with PSF).

  • yhat_with_noise (a pathlike object or string representing a file) – 4D PET file with full FOV of signal estimate (yhat) with noise after PVC (smoothed with PSF).

GTMSeg

Link to code

Bases: FSCommand

Wrapped executable: gtmseg.

create an anatomical segmentation for the geometric transfer matrix (GTM).

Examples

>>> gtmseg = GTMSeg()
>>> gtmseg.inputs.subject_id = 'subject_id'
>>> gtmseg.cmdline
'gtmseg --o gtmseg.mgz --s subject_id'
Mandatory Inputs:

subject_id (a string) – Subject id. Maps to a command-line argument: --s %s.

Optional Inputs:
  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • colortable (a pathlike object or string representing an existing file) – Colortable. Maps to a command-line argument: --ctab %s.

  • ctx_annot (a tuple of the form: (a string, an integer, an integer)) – Annot lhbase rhbase : annotation to use for cortical segmentation (default is aparc 1000 2000). Maps to a command-line argument: --ctx-annot %s %i %i.

  • dmax (a float) – Distance threshold to use when subsegmenting WM (default is 5). Maps to a command-line argument: --dmax %f.

  • 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: {})

  • head (a string) – Use headseg instead of apas+head.mgz. Maps to a command-line argument: --head %s.

  • keep_cc (a boolean) – Do not relabel corpus callosum as WM. Maps to a command-line argument: --keep-cc.

  • keep_hypo (a boolean) – Do not relabel hypointensities as WM when subsegmenting WM. Maps to a command-line argument: --keep-hypo.

  • no_pons (a boolean) – Do not add pons segmentation when doing —xcerseg. Maps to a command-line argument: --no-pons.

  • no_seg_stats (a boolean) – Do not compute segmentation stats. Maps to a command-line argument: --no-seg-stats.

  • no_vermis (a boolean) – Do not add vermis segmentation when doing —xcerseg. Maps to a command-line argument: --no-vermis.

  • out_file (a pathlike object or string representing a file) – Output volume relative to subject/mri. Maps to a command-line argument: --o %s. (Nipype default value: gtmseg.mgz)

  • output_upsampling_factor (an integer) – Set output USF different than USF, mostly for debugging. Maps to a command-line argument: --output-usf %i.

  • subjects_dir (a pathlike object or string representing an existing directory) – Subjects directory.

  • subseg_cblum_wm (a boolean) – Subsegment cerebellum WM into core and gyri. Maps to a command-line argument: --subseg-cblum-wm.

  • subsegwm (a boolean) – Subsegment WM into lobes (default). Maps to a command-line argument: --subsegwm.

  • upsampling_factor (an integer) – Upsampling factor (default is 2). Maps to a command-line argument: --usf %i.

  • wm_annot (a tuple of the form: (a string, an integer, an integer)) – Annot lhbase rhbase : annotation to use for WM segmentation (with –subsegwm, default is lobes 3200 4200). Maps to a command-line argument: --wm-annot %s %i %i.

  • xcerseg (a boolean) – Run xcerebralseg on this subject to create apas+head.mgz. Maps to a command-line argument: --xcerseg.

Outputs:

out_file (a pathlike object or string representing a file) – GTM segmentation.

LoganRef

Link to code

Bases: GLMFit

Wrapped executable: mri_glmfit.

Perform Logan reference kinetic modeling. .. rubric:: Examples

>>> logan = LoganRef()
>>> logan.inputs.in_file = 'tac.nii'
>>> logan.inputs.logan = ('ref_tac.dat', 'timing.dat', 2600)
>>> logan.inputs.glm_dir = 'logan'
>>> logan.cmdline
'mri_glmfit --glmdir logan --y tac.nii --logan ref_tac.dat timing.dat 2600'
Mandatory Inputs:
  • in_file (a pathlike object or string representing a file) – Input 4D file. Maps to a command-line argument: --y %s.

  • logan (a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file, a float)) – RefTac TimeSec tstar : perform Logan kinetic modeling. Maps to a command-line argument: --logan %s %s %g.

Optional Inputs:
  • allow_ill_cond (a boolean) – Allow ill-conditioned design matrices. Maps to a command-line argument: --illcond.

  • allow_repeated_subjects (a boolean) – Allow subject names to repeat in the fsgd file (must appear before –fsgd. Maps to a command-line argument: --allowsubjrep.

  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • calc_AR1 (a boolean) – Compute and save temporal AR1 of residual. Maps to a command-line argument: --tar1.

  • check_opts (a boolean) – Don’t run anything, just check options and exit. Maps to a command-line argument: --checkopts.

  • compute_log_y (a boolean) – Compute natural log of y prior to analysis. Maps to a command-line argument: --logy.

  • contrast (a list of items which are a pathlike object or string representing an existing file) – Contrast file. Maps to a command-line argument: --C %s....

  • cortex (a boolean) – Use subjects ?h.cortex.label as label. Maps to a command-line argument: --cortex. Mutually exclusive with inputs: label_file.

  • debug (a boolean) – Turn on debugging. Maps to a command-line argument: --debug.

  • design (a 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.

  • diag (an integer) – Gdiag_no : set diagnostic level. Maps to a command-line argument: --diag %d.

  • diag_cluster (a boolean) – Save sig volume and exit from first sim loop. Maps to a command-line argument: --diag-cluster.

  • 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: {})

  • fixed_fx_dof (an integer) – Dof for fixed effects analysis. Maps to a command-line argument: --ffxdof %d. Mutually exclusive with inputs: fixed_fx_dof_file.

  • fixed_fx_dof_file (a 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_var (a pathlike object or string representing an existing file) – For fixed effects analysis. Maps to a command-line argument: --yffxvar %s.

  • force_perm (a boolean) – Force perumtation test, even when design matrix is not orthog. Maps to a command-line argument: --perm-force.

  • fsgd (a 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.

  • fwhm (a floating point number >= 0.0) – Smooth input by fwhm. Maps to a command-line argument: --fwhm %f.

  • glm_dir (a string) – Save outputs to dir. Maps to a command-line argument: --glmdir %s.

  • hemi (‘lh’ or ‘rh’) – Surface hemisphere.

  • invert_mask (a boolean) – Invert mask. Maps to a command-line argument: --mask-inv.

  • label_file (a 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_file (a pathlike object or string representing an existing file) – Binary mask. Maps to a command-line argument: --mask %s.

  • mrtm1 (a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file)) – RefTac TimeSec : perform MRTM1 kinetic modeling. Maps to a command-line argument: --mrtm1 %s %s.

  • mrtm2 (a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file, a float)) – RefTac TimeSec k2prime : perform MRTM2 kinetic modeling. Maps to a command-line argument: --mrtm2 %s %s %f.

  • nii (a boolean) – Save outputs as nii. Maps to a command-line argument: --nii. Mutually exclusive with inputs: nii, nii_gz.

  • nii_gz (a boolean) – Save outputs as nii.gz. Maps to a command-line argument: --nii.gz. Mutually exclusive with inputs: nii, nii_gz.

  • no_contrast_ok (a boolean) – Do not fail if no contrasts specified. Maps to a command-line argument: --no-contrasts-ok.

  • no_est_fwhm (a boolean) – Turn off FWHM output estimation. Maps to a command-line argument: --no-est-fwhm.

  • no_mask_smooth (a boolean) – Do not mask when smoothing. Maps to a command-line argument: --no-mask-smooth.

  • no_prune (a boolean) – Do not prune. Maps to a command-line argument: --no-prune. Mutually exclusive with inputs: prunethresh.

  • one_sample (a 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.

  • pca (a boolean) – Perform pca/svd analysis on residual. Maps to a command-line argument: --pca.

  • per_voxel_reg (a 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....

  • profile (an integer) – Niters : test speed. Maps to a command-line argument: --profile %d.

  • prune (a boolean) – Remove voxels that do not have a non-zero value at each frame (def). Maps to a command-line argument: --prune.

  • prune_thresh (a float) – Prune threshold. Default is FLT_MIN. Maps to a command-line argument: --prune_thr %f. Mutually exclusive with inputs: noprune.

  • resynth_test (an integer) – Test GLM by resynthsis. Maps to a command-line argument: --resynthtest %d.

  • save_cond (a boolean) – Flag to save design matrix condition at each voxel. Maps to a command-line argument: --save-cond.

  • save_estimate (a boolean) – Save signal estimate (yhat). Maps to a command-line argument: --yhat-save.

  • save_res_corr_mtx (a boolean) – Save residual error spatial correlation matrix (eres.scm). Big!. Maps to a command-line argument: --eres-scm.

  • save_residual (a boolean) – Save residual error (eres). Maps to a command-line argument: --eres-save.

  • seed (an integer) – Used for synthesizing noise. Maps to a command-line argument: --seed %d.

  • self_reg (a tuple of the form: (an integer, an integer, an integer)) – Self-regressor from index col row slice. Maps to a command-line argument: --selfreg %d %d %d.

  • sim_done_file (a 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.

  • simulation (a tuple of the form: (‘perm’ or ‘mc-full’ or ‘mc-z’, an integer, a float, a string)) – Nulltype nsim thresh csdbasename. Maps to a command-line argument: --sim %s %d %f %s.

  • subject_id (a string) – Subject id for surface geometry.

  • subjects_dir (a pathlike object or string representing an existing directory) – Subjects directory.

  • surf (a boolean) – Analysis is on a surface mesh. Maps to a command-line argument: --surf %s %s %s. Requires inputs: subject_id, hemi.

  • surf_geo (a string) – Surface geometry name (e.g. white, pial). (Nipype default value: white)

  • synth (a boolean) – Replace input with gaussian. Maps to a command-line argument: --synth.

  • uniform (a tuple of the form: (a float, a float)) – Use uniform distribution instead of gaussian. Maps to a command-line argument: --uniform %f %f.

  • var_fwhm (a floating point number >= 0.0) – Smooth variance by fwhm. Maps to a command-line argument: --var-fwhm %f.

  • vox_dump (a tuple of the form: (an integer, an integer, an integer)) – Dump voxel GLM and exit. Maps to a command-line argument: --voxdump %d %d %d.

  • weight_file (a pathlike object or string representing an existing file) – Weight for each input at each voxel. Mutually exclusive with inputs: weighted_ls.

  • weight_inv (a boolean) – Invert weights. Maps to a command-line argument: --w-inv. Mutually exclusive with inputs: weighted_ls.

  • weight_sqrt (a boolean) – Sqrt of weights. Maps to a command-line argument: --w-sqrt. Mutually exclusive with inputs: weighted_ls.

  • weighted_ls (a 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.

Outputs:
  • beta_file (a pathlike object or string representing an existing file) – Map of regression coefficients.

  • bp_file (a pathlike object or string representing a file) – Binding potential estimates.

  • dof_file (a pathlike object or string representing a file) – Text file with effective degrees-of-freedom for the analysis.

  • error_file (a pathlike object or string representing a file) – Map of residual error.

  • error_stddev_file (a pathlike object or string representing a file) – Map of residual error standard deviation.

  • error_var_file (a pathlike object or string representing a file) – Map of residual error variance.

  • estimate_file (a pathlike object or string representing a file) – Map of the estimated Y values.

  • frame_eigenvectors (a pathlike object or string representing a file) – Matrix of frame eigenvectors from residual PCA.

  • ftest_file (a list of items which are any value) – Map of test statistic values.

  • fwhm_file (a pathlike object or string representing a file) – Text file with estimated smoothness.

  • gamma_file (a list of items which are any value) – Map of contrast of regression coefficients.

  • gamma_var_file (a list of items which are any value) – Map of regression contrast variance.

  • glm_dir (a pathlike object or string representing an existing directory) – Output directory.

  • k2p_file (a pathlike object or string representing a file) – Estimate of k2p parameter.

  • mask_file (a pathlike object or string representing a file) – Map of the mask used in the analysis.

  • sig_file (a list of items which are any value) – Map of F-test significance (in -log10p).

  • singular_values (a pathlike object or string representing a file) – Matrix singular values from residual PCA.

  • spatial_eigenvectors (a pathlike object or string representing a file) – Map of spatial eigenvectors from residual PCA.

  • svd_stats_file (a pathlike object or string representing a file) – Text file summarizing the residual PCA.

MRTM

Link to code

Bases: GLMFit

Wrapped executable: mri_glmfit.

Perform MRTM1 kinetic modeling.

Examples

>>> mrtm = MRTM()
>>> mrtm.inputs.in_file = 'tac.nii'
>>> mrtm.inputs.mrtm1 = ('ref_tac.dat', 'timing.dat')
>>> mrtm.inputs.glm_dir = 'mrtm'
>>> mrtm.cmdline
'mri_glmfit --glmdir mrtm --y tac.nii --mrtm1 ref_tac.dat timing.dat'
Mandatory Inputs:
  • in_file (a pathlike object or string representing a file) – Input 4D file. Maps to a command-line argument: --y %s.

  • mrtm1 (a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file)) – RefTac TimeSec : perform MRTM1 kinetic modeling. Maps to a command-line argument: --mrtm1 %s %s.

Optional Inputs:
  • allow_ill_cond (a boolean) – Allow ill-conditioned design matrices. Maps to a command-line argument: --illcond.

  • allow_repeated_subjects (a boolean) – Allow subject names to repeat in the fsgd file (must appear before –fsgd. Maps to a command-line argument: --allowsubjrep.

  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • calc_AR1 (a boolean) – Compute and save temporal AR1 of residual. Maps to a command-line argument: --tar1.

  • check_opts (a boolean) – Don’t run anything, just check options and exit. Maps to a command-line argument: --checkopts.

  • compute_log_y (a boolean) – Compute natural log of y prior to analysis. Maps to a command-line argument: --logy.

  • contrast (a list of items which are a pathlike object or string representing an existing file) – Contrast file. Maps to a command-line argument: --C %s....

  • cortex (a boolean) – Use subjects ?h.cortex.label as label. Maps to a command-line argument: --cortex. Mutually exclusive with inputs: label_file.

  • debug (a boolean) – Turn on debugging. Maps to a command-line argument: --debug.

  • design (a 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.

  • diag (an integer) – Gdiag_no : set diagnostic level. Maps to a command-line argument: --diag %d.

  • diag_cluster (a boolean) – Save sig volume and exit from first sim loop. Maps to a command-line argument: --diag-cluster.

  • 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: {})

  • fixed_fx_dof (an integer) – Dof for fixed effects analysis. Maps to a command-line argument: --ffxdof %d. Mutually exclusive with inputs: fixed_fx_dof_file.

  • fixed_fx_dof_file (a 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_var (a pathlike object or string representing an existing file) – For fixed effects analysis. Maps to a command-line argument: --yffxvar %s.

  • force_perm (a boolean) – Force perumtation test, even when design matrix is not orthog. Maps to a command-line argument: --perm-force.

  • fsgd (a 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.

  • fwhm (a floating point number >= 0.0) – Smooth input by fwhm. Maps to a command-line argument: --fwhm %f.

  • glm_dir (a string) – Save outputs to dir. Maps to a command-line argument: --glmdir %s.

  • hemi (‘lh’ or ‘rh’) – Surface hemisphere.

  • invert_mask (a boolean) – Invert mask. Maps to a command-line argument: --mask-inv.

  • label_file (a 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.

  • logan (a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file, a float)) – RefTac TimeSec tstar : perform Logan kinetic modeling. Maps to a command-line argument: --logan %s %s %f.

  • mask_file (a pathlike object or string representing an existing file) – Binary mask. Maps to a command-line argument: --mask %s.

  • mrtm2 (a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file, a float)) – RefTac TimeSec k2prime : perform MRTM2 kinetic modeling. Maps to a command-line argument: --mrtm2 %s %s %f.

  • nii (a boolean) – Save outputs as nii. Maps to a command-line argument: --nii. Mutually exclusive with inputs: nii, nii_gz.

  • nii_gz (a boolean) – Save outputs as nii.gz. Maps to a command-line argument: --nii.gz. Mutually exclusive with inputs: nii, nii_gz.

  • no_contrast_ok (a boolean) – Do not fail if no contrasts specified. Maps to a command-line argument: --no-contrasts-ok.

  • no_est_fwhm (a boolean) – Turn off FWHM output estimation. Maps to a command-line argument: --no-est-fwhm.

  • no_mask_smooth (a boolean) – Do not mask when smoothing. Maps to a command-line argument: --no-mask-smooth.

  • no_prune (a boolean) – Do not prune. Maps to a command-line argument: --no-prune. Mutually exclusive with inputs: prunethresh.

  • one_sample (a 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.

  • pca (a boolean) – Perform pca/svd analysis on residual. Maps to a command-line argument: --pca.

  • per_voxel_reg (a 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....

  • profile (an integer) – Niters : test speed. Maps to a command-line argument: --profile %d.

  • prune (a boolean) – Remove voxels that do not have a non-zero value at each frame (def). Maps to a command-line argument: --prune.

  • prune_thresh (a float) – Prune threshold. Default is FLT_MIN. Maps to a command-line argument: --prune_thr %f. Mutually exclusive with inputs: noprune.

  • resynth_test (an integer) – Test GLM by resynthsis. Maps to a command-line argument: --resynthtest %d.

  • save_cond (a boolean) – Flag to save design matrix condition at each voxel. Maps to a command-line argument: --save-cond.

  • save_estimate (a boolean) – Save signal estimate (yhat). Maps to a command-line argument: --yhat-save.

  • save_res_corr_mtx (a boolean) – Save residual error spatial correlation matrix (eres.scm). Big!. Maps to a command-line argument: --eres-scm.

  • save_residual (a boolean) – Save residual error (eres). Maps to a command-line argument: --eres-save.

  • seed (an integer) – Used for synthesizing noise. Maps to a command-line argument: --seed %d.

  • self_reg (a tuple of the form: (an integer, an integer, an integer)) – Self-regressor from index col row slice. Maps to a command-line argument: --selfreg %d %d %d.

  • sim_done_file (a 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.

  • simulation (a tuple of the form: (‘perm’ or ‘mc-full’ or ‘mc-z’, an integer, a float, a string)) – Nulltype nsim thresh csdbasename. Maps to a command-line argument: --sim %s %d %f %s.

  • subject_id (a string) – Subject id for surface geometry.

  • subjects_dir (a pathlike object or string representing an existing directory) – Subjects directory.

  • surf (a boolean) – Analysis is on a surface mesh. Maps to a command-line argument: --surf %s %s %s. Requires inputs: subject_id, hemi.

  • surf_geo (a string) – Surface geometry name (e.g. white, pial). (Nipype default value: white)

  • synth (a boolean) – Replace input with gaussian. Maps to a command-line argument: --synth.

  • uniform (a tuple of the form: (a float, a float)) – Use uniform distribution instead of gaussian. Maps to a command-line argument: --uniform %f %f.

  • var_fwhm (a floating point number >= 0.0) – Smooth variance by fwhm. Maps to a command-line argument: --var-fwhm %f.

  • vox_dump (a tuple of the form: (an integer, an integer, an integer)) – Dump voxel GLM and exit. Maps to a command-line argument: --voxdump %d %d %d.

  • weight_file (a pathlike object or string representing an existing file) – Weight for each input at each voxel. Mutually exclusive with inputs: weighted_ls.

  • weight_inv (a boolean) – Invert weights. Maps to a command-line argument: --w-inv. Mutually exclusive with inputs: weighted_ls.

  • weight_sqrt (a boolean) – Sqrt of weights. Maps to a command-line argument: --w-sqrt. Mutually exclusive with inputs: weighted_ls.

  • weighted_ls (a 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.

Outputs:
  • beta_file (a pathlike object or string representing an existing file) – Map of regression coefficients.

  • bp_file (a pathlike object or string representing a file) – Binding potential estimates.

  • dof_file (a pathlike object or string representing a file) – Text file with effective degrees-of-freedom for the analysis.

  • error_file (a pathlike object or string representing a file) – Map of residual error.

  • error_stddev_file (a pathlike object or string representing a file) – Map of residual error standard deviation.

  • error_var_file (a pathlike object or string representing a file) – Map of residual error variance.

  • estimate_file (a pathlike object or string representing a file) – Map of the estimated Y values.

  • frame_eigenvectors (a pathlike object or string representing a file) – Matrix of frame eigenvectors from residual PCA.

  • ftest_file (a list of items which are any value) – Map of test statistic values.

  • fwhm_file (a pathlike object or string representing a file) – Text file with estimated smoothness.

  • gamma_file (a list of items which are any value) – Map of contrast of regression coefficients.

  • gamma_var_file (a list of items which are any value) – Map of regression contrast variance.

  • glm_dir (a pathlike object or string representing an existing directory) – Output directory.

  • k2p_file (a pathlike object or string representing a file) – Estimate of k2p parameter.

  • mask_file (a pathlike object or string representing a file) – Map of the mask used in the analysis.

  • sig_file (a list of items which are any value) – Map of F-test significance (in -log10p).

  • singular_values (a pathlike object or string representing a file) – Matrix singular values from residual PCA.

  • spatial_eigenvectors (a pathlike object or string representing a file) – Map of spatial eigenvectors from residual PCA.

  • svd_stats_file (a pathlike object or string representing a file) – Text file summarizing the residual PCA.

MRTM2

Link to code

Bases: GLMFit

Wrapped executable: mri_glmfit.

Perform MRTM2 kinetic modeling. .. rubric:: Examples

>>> mrtm2 = MRTM2()
>>> mrtm2.inputs.in_file = 'tac.nii'
>>> mrtm2.inputs.mrtm2 = ('ref_tac.dat', 'timing.dat', 0.07872)
>>> mrtm2.inputs.glm_dir = 'mrtm2'
>>> mrtm2.cmdline
'mri_glmfit --glmdir mrtm2 --y tac.nii --mrtm2 ref_tac.dat timing.dat 0.078720'
Mandatory Inputs:
  • in_file (a pathlike object or string representing a file) – Input 4D file. Maps to a command-line argument: --y %s.

  • mrtm2 (a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file, a float)) – RefTac TimeSec k2prime : perform MRTM2 kinetic modeling. Maps to a command-line argument: --mrtm2 %s %s %f.

Optional Inputs:
  • allow_ill_cond (a boolean) – Allow ill-conditioned design matrices. Maps to a command-line argument: --illcond.

  • allow_repeated_subjects (a boolean) – Allow subject names to repeat in the fsgd file (must appear before –fsgd. Maps to a command-line argument: --allowsubjrep.

  • args (a string) – Additional parameters to the command. Maps to a command-line argument: %s.

  • calc_AR1 (a boolean) – Compute and save temporal AR1 of residual. Maps to a command-line argument: --tar1.

  • check_opts (a boolean) – Don’t run anything, just check options and exit. Maps to a command-line argument: --checkopts.

  • compute_log_y (a boolean) – Compute natural log of y prior to analysis. Maps to a command-line argument: --logy.

  • contrast (a list of items which are a pathlike object or string representing an existing file) – Contrast file. Maps to a command-line argument: --C %s....

  • cortex (a boolean) – Use subjects ?h.cortex.label as label. Maps to a command-line argument: --cortex. Mutually exclusive with inputs: label_file.

  • debug (a boolean) – Turn on debugging. Maps to a command-line argument: --debug.

  • design (a 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.

  • diag (an integer) – Gdiag_no : set diagnostic level. Maps to a command-line argument: --diag %d.

  • diag_cluster (a boolean) – Save sig volume and exit from first sim loop. Maps to a command-line argument: --diag-cluster.

  • 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: {})

  • fixed_fx_dof (an integer) – Dof for fixed effects analysis. Maps to a command-line argument: --ffxdof %d. Mutually exclusive with inputs: fixed_fx_dof_file.

  • fixed_fx_dof_file (a 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_var (a pathlike object or string representing an existing file) – For fixed effects analysis. Maps to a command-line argument: --yffxvar %s.

  • force_perm (a boolean) – Force perumtation test, even when design matrix is not orthog. Maps to a command-line argument: --perm-force.

  • fsgd (a 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.

  • fwhm (a floating point number >= 0.0) – Smooth input by fwhm. Maps to a command-line argument: --fwhm %f.

  • glm_dir (a string) – Save outputs to dir. Maps to a command-line argument: --glmdir %s.

  • hemi (‘lh’ or ‘rh’) – Surface hemisphere.

  • invert_mask (a boolean) – Invert mask. Maps to a command-line argument: --mask-inv.

  • label_file (a 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.

  • logan (a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file, a float)) – RefTac TimeSec tstar : perform Logan kinetic modeling. Maps to a command-line argument: --logan %s %s %f.

  • mask_file (a pathlike object or string representing an existing file) – Binary mask. Maps to a command-line argument: --mask %s.

  • mrtm1 (a tuple of the form: (a pathlike object or string representing an existing file, a pathlike object or string representing an existing file)) – RefTac TimeSec : perform MRTM1 kinetic modeling. Maps to a command-line argument: --mrtm1 %s %s.

  • nii (a boolean) – Save outputs as nii. Maps to a command-line argument: --nii. Mutually exclusive with inputs: nii, nii_gz.

  • nii_gz (a boolean) – Save outputs as nii.gz. Maps to a command-line argument: --nii.gz. Mutually exclusive with inputs: nii, nii_gz.

  • no_contrast_ok (a boolean) – Do not fail if no contrasts specified. Maps to a command-line argument: --no-contrasts-ok.

  • no_est_fwhm (a boolean) – Turn off FWHM output estimation. Maps to a command-line argument: --no-est-fwhm.

  • no_mask_smooth (a boolean) – Do not mask when smoothing. Maps to a command-line argument: --no-mask-smooth.

  • no_prune (a boolean) – Do not prune. Maps to a command-line argument: --no-prune. Mutually exclusive with inputs: prunethresh.

  • one_sample (a 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.

  • pca (a boolean) – Perform pca/svd analysis on residual. Maps to a command-line argument: --pca.

  • per_voxel_reg (a 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....

  • profile (an integer) – Niters : test speed. Maps to a command-line argument: --profile %d.

  • prune (a boolean) – Remove voxels that do not have a non-zero value at each frame (def). Maps to a command-line argument: --prune.

  • prune_thresh (a float) – Prune threshold. Default is FLT_MIN. Maps to a command-line argument: --prune_thr %f. Mutually exclusive with inputs: noprune.

  • resynth_test (an integer) – Test GLM by resynthsis. Maps to a command-line argument: --resynthtest %d.

  • save_cond (a boolean) – Flag to save design matrix condition at each voxel. Maps to a command-line argument: --save-cond.

  • save_estimate (a boolean) – Save signal estimate (yhat). Maps to a command-line argument: --yhat-save.

  • save_res_corr_mtx (a boolean) – Save residual error spatial correlation matrix (eres.scm). Big!. Maps to a command-line argument: --eres-scm.

  • save_residual (a boolean) – Save residual error (eres). Maps to a command-line argument: --eres-save.

  • seed (an integer) – Used for synthesizing noise. Maps to a command-line argument: --seed %d.

  • self_reg (a tuple of the form: (an integer, an integer, an integer)) – Self-regressor from index col row slice. Maps to a command-line argument: --selfreg %d %d %d.

  • sim_done_file (a 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.

  • simulation (a tuple of the form: (‘perm’ or ‘mc-full’ or ‘mc-z’, an integer, a float, a string)) – Nulltype nsim thresh csdbasename. Maps to a command-line argument: --sim %s %d %f %s.

  • subject_id (a string) – Subject id for surface geometry.

  • subjects_dir (a pathlike object or string representing an existing directory) – Subjects directory.

  • surf (a boolean) – Analysis is on a surface mesh. Maps to a command-line argument: --surf %s %s %s. Requires inputs: subject_id, hemi.

  • surf_geo (a string) – Surface geometry name (e.g. white, pial). (Nipype default value: white)

  • synth (a boolean) – Replace input with gaussian. Maps to a command-line argument: --synth.

  • uniform (a tuple of the form: (a float, a float)) – Use uniform distribution instead of gaussian. Maps to a command-line argument: --uniform %f %f.

  • var_fwhm (a floating point number >= 0.0) – Smooth variance by fwhm. Maps to a command-line argument: --var-fwhm %f.

  • vox_dump (a tuple of the form: (an integer, an integer, an integer)) – Dump voxel GLM and exit. Maps to a command-line argument: --voxdump %d %d %d.

  • weight_file (a pathlike object or string representing an existing file) – Weight for each input at each voxel. Mutually exclusive with inputs: weighted_ls.

  • weight_inv (a boolean) – Invert weights. Maps to a command-line argument: --w-inv. Mutually exclusive with inputs: weighted_ls.

  • weight_sqrt (a boolean) – Sqrt of weights. Maps to a command-line argument: --w-sqrt. Mutually exclusive with inputs: weighted_ls.

  • weighted_ls (a 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.

Outputs:
  • beta_file (a pathlike object or string representing an existing file) – Map of regression coefficients.

  • bp_file (a pathlike object or string representing a file) – Binding potential estimates.

  • dof_file (a pathlike object or string representing a file) – Text file with effective degrees-of-freedom for the analysis.

  • error_file (a pathlike object or string representing a file) – Map of residual error.

  • error_stddev_file (a pathlike object or string representing a file) – Map of residual error standard deviation.

  • error_var_file (a pathlike object or string representing a file) – Map of residual error variance.

  • estimate_file (a pathlike object or string representing a file) – Map of the estimated Y values.

  • frame_eigenvectors (a pathlike object or string representing a file) – Matrix of frame eigenvectors from residual PCA.

  • ftest_file (a list of items which are any value) – Map of test statistic values.

  • fwhm_file (a pathlike object or string representing a file) – Text file with estimated smoothness.

  • gamma_file (a list of items which are any value) – Map of contrast of regression coefficients.

  • gamma_var_file (a list of items which are any value) – Map of regression contrast variance.

  • glm_dir (a pathlike object or string representing an existing directory) – Output directory.

  • k2p_file (a pathlike object or string representing a file) – Estimate of k2p parameter.

  • mask_file (a pathlike object or string representing a file) – Map of the mask used in the analysis.

  • sig_file (a list of items which are any value) – Map of F-test significance (in -log10p).

  • singular_values (a pathlike object or string representing a file) – Matrix singular values from residual PCA.

  • spatial_eigenvectors (a pathlike object or string representing a file) – Map of spatial eigenvectors from residual PCA.

  • svd_stats_file (a pathlike object or string representing a file) – Text file summarizing the residual PCA.