Updated to use only the non-NaN voxels within the passed lesion-mask to compute features. Previously, the NaN voxels outside the mask were counted as (n+1)th level.