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_files (a 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_dir (a 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:
args (a string) – Additional parameters to the command. Maps to a command-line argument:
%s.device (a string) – Compute device (currently reserved; default ‘cpu’). Maps to a command-line argument:
--device %s.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:
{})force_template_zooms (a boolean) – Force the reference (template) zooms on all outputs. Maps to a command-line argument:
--force-template-zooms.grad_quantile (a 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_consistent (a boolean) – Re-center rigid transforms around their SE(3) barycenter. Maps to a command-line argument:
--inverse-consistent.iterations (an integer) – Number of multi-scale alignment passes (default 3). Maps to a command-line argument:
--iterations %d.max_fwhm_mm (a 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_scale (a boolean) – Disable SPM-like per-volume intensity scaling. Maps to a command-line argument:
--no-intensity-scale.out_subfolders (a 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_weight (a float) – Weight of the overlap penalty term (default 0.0). Maps to a command-line argument:
--overlap-penalty-weight %g.register_to_first (a 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_resampled (a boolean) – Write resampled copies of the inputs in reference space. Maps to a command-line argument:
--save-resampled.save_template (a boolean) – Save the reference volume used as the alignment target. Maps to a command-line argument:
--save-template.set_zooms_from_sform (a boolean) – Copy pixdim/zooms from the sform when updating headers. Maps to a command-line argument:
--set-zooms-from-sform.update_headers (a boolean) – Only update the NIfTI headers with the estimated affines; do not write resampled volumes. Maps to a command-line argument:
--update-headers.use_skullstrip (a boolean) – Estimate transforms on skull-stripped copies of the inputs. Maps to a command-line argument:
--use-skullstrip.verbose (a boolean) – Print optimizer diagnostics. Maps to a command-line argument:
--verbose.
- Outputs:
out_dir (a pathlike object or string representing a directory) – Top-level output directory.
