mrsiprep.workflows.registration
Registration workflow.
Functions
|
Register one recording's MRSI reference to T1w, and T1w to MNI if requested. |
Classes
|
Forward/inverse transforms produced by |
- class mrsiprep.workflows.registration.RegistrationResult(mrsi_to_t1, t1_to_mni)[source]
Bases:
objectForward/inverse transforms produced by
run_registration_workflow().- Parameters:
mrsi_to_t1 (MRSIToT1Result)
t1_to_mni (T1ToMNIResult | None)
- mrsi_to_t1: MRSIToT1Result
- t1_to_mni: T1ToMNIResult | None
- mrsiprep.workflows.registration.run_registration_workflow(config, subject, session, mrsi_reference, registration_t1, registration_mask=None, mrsi_mask=None, subject_template=None)[source]
Register one recording's MRSI reference to T1w, and T1w to MNI if requested.
MRSI→T1w always runs, via
mrsiprep.registration.mrsi_to_t1.run_mrsi_to_t1()(or the MIDAS-faithful rigid+mutual-information variant,run_mrsi_to_t1_rigid_mi(), whenconfig.processing_mode == "midas"). T1w→MNI only runs when MNI output space, MNI parcellation, or an MNI transform is actually requested byconfig.- Parameters:
config -- Run-wide
mrsiprep.config.settings.MRSIPrepConfig.subject (str) -- BIDS subject label, without the
sub-prefix.session (str | None) -- BIDS session label without the
ses-prefix, orNonefor session-less datasets.mrsi_reference (Path) -- Reference-metabolite image driving MRSI→T1w registration.
registration_t1 (Path) -- T1w image to register to (see
mrsiprep.workflows.anatomical.prepare_anatomical()'sregistration_t1w).registration_mask (Path | None) -- T1w-side fixed mask for registration, if any.
mrsi_mask (Path | None) -- MRSI-native brainmask; only used by the
fslbackend's FNIRT stage, as the moving-side mask FNIRT needs alongsideregistration_mask.subject_template -- Optional precomputed
SubjectTemplateResult, built once per subject when--longitudinalis on and the subject has 2+ sessions. When present, T1w-to-MNI is composed via (session→template)+(template→MNI) instead of registering this session directly to MNI.
- Returns:
RegistrationResultwith the MRSI→T1w transforms always set, and T1w→MNI transforms set only when that stage ran.- Return type: