mrsi_segment generates tissue fraction maps that don't add up to 1 on peripheries
when fitting with fsl_mrsi one of the multiprocessing workers fails on partial volume estimate sum to 94%
segmentation from fsl_anat directory:
/home/fs0/edmond/scratch/2021_10_ping-mrsi-pooled/derivatives/sub-ev055/anat/sub-ev055_T1w.anat/T1_fast_pve_*.nii.gz
mrsi_segment generated maps here:
/home/fs0/edmond/scratch/2021_10_ping-mrsi-pooled/derivatives/sub-ev055/mrsi/Output/tissue_frac_*.nii.gz
While all the voxels of the original pveseg image add up to 1, the background voxels have value 0. It looks like voxels on the peripheries of the tissue fraction maps generated by mrsi_segment don't add up to 1 (perhaps interpolating with background voxels of value zero?).
- logfile:
/vols/Scratch/edmond/2021_10_ping-mrsi-pooled/logs/2021-11-26/ss_fit_ev055.e294995
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/fs0/edmond/.conda/envs/mrsi/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/fs0/edmond/.conda/envs/mrsi/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/home/fs0/edmond/.conda/envs/mrsi/bin/fsl_mrsi", line 526, in runvoxel
q_info.set_fractions(tissue_seg)
File "/home/fs0/edmond/.conda/envs/mrsi/lib/python3.9/site-packages/fsl_mrs/utils/quantify.py", line 279, in set_fractions
raise ValueError("fractions must be a dict containing 'WM', 'GM', 'CSF' keys"
ValueError: fractions must be a dict containing 'WM', 'GM', 'CSF' keys, and must sum to 1. Currently they are: {'CSF': 0.21171024, 'WM': 0.34460485, 'GM': 0.3851066} (sum=0.9414).
"""
Edited by Evan Edmond