I would like to calculate the sphericity of a Nifti mask. I can get the volume using fslstats, but after searching wide and far across various neuroimaging platforms, I do not see a way to calculate the surface area of a Nifti mask, which is a required part of the formula for sphericity. My masks are non-regular, hence regular polygon equations would not work.
Is there any software package which could calculate the surface area or sphericity of a Nifti mask?
Basically, you need the volume and surface area of a mask given that formula. Alternatively, you could probably generate a similar measure with volume, equivalent radius, and some count of voxels inside and outside the equivalent sphere. See this previous discussion on brain radius:
You can compute surface area by transform a volume or mask into a quick surface by using the command IsoSurface in AFNI. Then compute the nodal and total surface area with SurfMeasures as shown here.