mrsiprep.mrsi.pvc

Partial-volume correction via PETPVC.

Functions

create_tissue_4d(config, subject, session, ...)

Stack the GM/WM/CSF tissue-fraction maps into the single 4D volume petpvc's -m argument requires.

run_pvc(config, subject, session, ...[, ...])

psf_width (mm, isotropic) defaults to the MRSI acquisition's own native resolution -- the mean voxel size of mrsi_reference -- since that is the true width of the MRSI spatial response function PETPVC's RBV algorithm is deconvolving.

Exceptions

PVCError

Raised when partial-volume correction fails.

exception mrsiprep.mrsi.pvc.PVCError[source]

Bases: RuntimeError

Raised when partial-volume correction fails.

mrsiprep.mrsi.pvc.create_tissue_4d(config, subject, session, tissue_mrsi, reference)[source]

Stack the GM/WM/CSF tissue-fraction maps into the single 4D volume petpvc's -m argument requires. Fully reconstructable from those three files, so it's a --work-dir scratch file rather than a derivative.

Parameters:
  • subject (str)

  • session (str | None)

  • tissue_mrsi (dict[str, Path])

  • reference (Path)

Return type:

Path

mrsiprep.mrsi.pvc.run_pvc(config, subject, session, metabolite_maps, tissue_4d, brainmask, mrsi_reference, psf_width=None)[source]

psf_width (mm, isotropic) defaults to the MRSI acquisition's own native resolution -- the mean voxel size of mrsi_reference -- since that is the true width of the MRSI spatial response function PETPVC's RBV algorithm is deconvolving. Pass an explicit value to override.

Parameters:
  • subject (str)

  • session (str | None)

  • metabolite_maps (dict[str, Path])

  • tissue_4d (Path)

  • brainmask (Path)

  • mrsi_reference (Path)

  • psf_width (float | None)

Return type:

dict[str, Path]