nipype.interfaces.t1prep.longitudinal module¶
Nipype interfaces for T1Prep longitudinal processing.
T1PrepRealignLongitudinalRigid realignment of a series of 3D NIfTI volumes acquired from the same subject (longitudinal time-points), mirroring SPM’s realign module. Wraps
python -m t1prep.realign_longitudinal.
- class nipype.interfaces.t1prep.longitudinal.T1PrepRealignLongitudinal(command=None, terminal_output=None, write_cmdline=False, **inputs)¶
Bases:
T1PrepCommandWrapped executable:
python.Nipype interface for the T1Prep longitudinal realignment module.
Estimates per-timepoint rigid (6-DoF) transforms and optionally refines them against a mean template, then writes resampled volumes and/or updates NIfTI headers in place. Mirrors SPM’s realign module.
Invoked as
python -m t1prep.realign_longitudinal.Examples
>>> ra = T1PrepRealignLongitudinal() >>> ra.inputs.in_files = ['sub-01_ses-01_T1w.nii.gz', 'sub-01_ses-02_T1w.nii.gz'] >>> ra.inputs.out_dir = 'derivatives/realign' >>> ra.inputs.save_resampled = True >>> ra.cmdline 'python -m t1prep.realign_longitudinal --inputs sub-01_ses-01_T1w.nii.gz sub-01_ses-02_T1w.nii.gz --out-dir derivatives/realign --save-resampled'
References
https://github.com/ChristianGaser/T1Prep
Mandatory Inputs¶
- in_filesa list of items which are a pathlike object or string representing an existing file
Input NIfTI images (one per longitudinal time-point). Maps to a command-line argument:
--inputs %s.- out_dira pathlike object or string representing a directory
Output directory for realigned volumes and transforms. Maps to a command-line argument:
--out-dir %s.
Optional Inputs¶
- argsa string
Additional parameters to the command. Maps to a command-line argument:
%s.- devicea string
Compute device (currently reserved; default ‘cpu’). Maps to a command-line argument:
--device %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:
{})- force_template_zoomsa boolean
Force the reference (template) zooms on all outputs. Maps to a command-line argument:
--force-template-zooms.- grad_quantilea float
Quantile threshold for the gradient sampler (only used when sample_strategy=’gradient’; default 0.80). Maps to a command-line argument:
--grad-quantile %g.- inverse_consistenta boolean
Re-center rigid transforms around their SE(3) barycenter. Maps to a command-line argument:
--inverse-consistent.- iterationsan integer
Number of multi-scale alignment passes (default 3). Maps to a command-line argument:
--iterations %d.- max_fwhm_mma float
Maximum smoothing FWHM in mm for the multi-scale pyramid (default 6.0). Maps to a command-line argument:
--max-fwhm-mm %g.- no_intensity_scalea boolean
Disable SPM-like per-volume intensity scaling. Maps to a command-line argument:
--no-intensity-scale.- out_subfoldersa list of items which are a string
Per-input output subfolder names (must match the number of inputs). Maps to a command-line argument:
--out-subfolders %s.- output_naming‘bids’ or ‘legacy’
Output naming convention: ‘bids’ (default) or ‘legacy’. Maps to a command-line argument:
--output-naming %s.- overlap_penalty_weighta float
Weight of the overlap penalty term (default 0.0). Maps to a command-line argument:
--overlap-penalty-weight %g.- register_to_firsta boolean
Register all volumes to the first input (skip mean-template refinement). Maps to a command-line argument:
--register-to-first.- sample_strategy‘grid’ or ‘gradient’
Sample-point selection: ‘grid’ (default) or ‘gradient’. Maps to a command-line argument:
--sample-strategy %s.- save_resampleda boolean
Write resampled copies of the inputs in reference space. Maps to a command-line argument:
--save-resampled.- save_templatea boolean
Save the reference volume used as the alignment target. Maps to a command-line argument:
--save-template.- set_zooms_from_sforma boolean
Copy pixdim/zooms from the sform when updating headers. Maps to a command-line argument:
--set-zooms-from-sform.- update_headersa boolean
Only update the NIfTI headers with the estimated affines; do not write resampled volumes. Maps to a command-line argument:
--update-headers.- use_skullstripa boolean
Estimate transforms on skull-stripped copies of the inputs. Maps to a command-line argument:
--use-skullstrip.- verbosea boolean
Print optimizer diagnostics. Maps to a command-line argument:
--verbose.
Outputs¶
- out_dira pathlike object or string representing a directory
Top-level output directory.