mrsiprep.workflows.parcellation
Parcellation workflow.
Functions
|
Dispatch to the configured parcellation backend and project atlas labels into MRSI-native space. |
- mrsiprep.workflows.parcellation.run_parcellation_workflow(config, subject, session, mrsi_reference, registration_result, raw_t1=None, t1_reference=None)[source]
Dispatch to the configured parcellation backend and project atlas labels into MRSI-native space.
Backend is selected via
config.parcellation_mode:"synthseg"-- SynthSeg cortical/subcortical labels, projected via the inverse MRSI→T1w transform (registration_result.mrsi_to_t1.inverse). Requiresraw_t1."chimera"-- Chimera multi-atlas fusion, same inverse-transform projection."mni"-- the bundled MNI-space atlas, projected via both the inverse T1w→MNI and inverse MRSI→T1w transforms. Requiresregistration_result.t1_to_mnito be set (i.e. MNI normalization ran) and at1_referenceimage.
- Parameters:
config -- Run-wide
mrsiprep.config.settings.MRSIPrepConfig.subject -- BIDS subject label, without the
sub-prefix.session -- BIDS session label without the
ses-prefix, orNonefor session-less datasets.mrsi_reference -- Reference-metabolite image defining the target MRSI grid.
registration_result --
mrsiprep.workflows.registration.RegistrationResultfor this recording, supplying the inverse transforms used to project atlas labels into MRSI space.raw_t1 -- Non-skull-stripped T1w, required for
"synthseg".t1_reference -- T1w-space reference image, required for
"mni".
- Returns:
Backend-specific parcellation result object (see
mrsiprep.parcellation.synthseg,mrsiprep.parcellation.chimera_native, ormrsiprep.parcellation.mni_atlas).- Raises:
FileNotFoundError -- If
"synthseg"is selected withoutraw_t1.RuntimeError -- If
"mni"is selected but T1w-to-MNI normalization wasn't run.ValueError -- If
"mni"is selected withoutt1_reference, orconfig.parcellation_modeisn't a supported value.