SUMA crash when loading atlas volumes, and the reason for it


I hope this finds you in good spirits!

SUMA crashes when a labeled volume is stored as floats.

From a SUMA/ directory, running:

suma -vol aparc.a2009s+aseg_rank.nii
Opens a blank viewer with the following warnings echoed in the shell:
Error SUMA_SetUniqueValsAttr (suma_datasets.c:1539):
Bad column type 6 for unique values
– Error SUMA_CreateCmapForLabelDset (SUMA_Color.c:4139):
Either no unique values or too many of them:
0x0, 0 (256)
– Error SUMA_CreateOverlayPointer (SUMA_Color.c:6372):
Failed to create new label dset cmap
– Error SUMA_ColorizePlane (SUMA_Color.c:11471):
Where’s your cmapname?
Opening the viewer controller causes SUMA to crash.

Copying the dataset to a short format along with the label tables get around the problem.
3dcalc -a aparc.a2009s+aseg_rank.nii -expr ‘a’ -prefix ttt.nii -datum short
3drefit -copytables aparc.a2009s+aseg.nii ttt.nii