Major refactoring of sct_process_segmentation


#1

Dear SCT users,

We are currently applying a major refactoring to the widely used sct_process_segmentation function. In brief, the following modifications are planned:

  • Much faster execution of shape analysis
  • Remove flag -p and always output a csv file that contains csa results as well as shape analysis.
  • Remove metric ratio_minor_major because redundant with AP_diameter + RL_diameter

For more details, see the pull request on Github.

Feedback is welcome :slight_smile:
Julien


#2

#3

Hi Julien,

Running this with SCT v4.beta.5:

sct_process_segmentation -i sanlm_structural_seg.nii.gz -vert 3:8 -perlevel 1 -angle-corr 0 -o proc_seg_structural_seg_csa_perlevel_noanglecorr.csv

gives the following warning - not sure if this is something broken in my Python installation (though I thought SCT was run in its own env)…

Compute shape analysis: 0%| | 0/135 [00:00<?, ?iter/s]/Users/jon/sct_4.0.0-beta.5/python/envs/venv_sct/lib/python3.6/site-packages/skimage/transform/_warps.py:23: UserWarning: The default multichannel argument (None) is deprecated. Please specify either True or False explicitly. multichannel will default to False starting with release 0.16.
warn('The default multichannel argument (None) is deprecated. Please ’
/Users/jon/sct_4.0.0-beta.5/python/envs/venv_sct/lib/python3.6/site-packages/skimage/measure/_regionprops.py:250: UserWarning: regionprops and image moments (including moments, normalized moments, central moments, and inertia tensor) of 2D images will change from xy coordinates to rc coordinates in version 0.16.
See https://scikit-image.org/docs/0.14.x/release_notes_and_installation.html#deprecations for details on how to avoid this message.
warn(XY_TO_RC_DEPRECATION_MESSAGE)
/Users/jon/sct_4.0.0-beta.5/python/envs/venv_sct/lib/python3.6/site-packages/skimage/measure/_regionprops.py:260: UserWarning: regionprops and image moments (including moments, normalized moments, central moments, and inertia tensor) of 2D images will change from xy coordinates to rc coordinates in version 0.16.
See https://scikit-image.org/docs/0.14.x/release_notes_and_installation.html#deprecations for details on how to avoid this message.
warn(XY_TO_RC_DEPRECATION_MESSAGE)
Compute shape analysis: 100%|##############| 135/135 [00:00<00:00, 305.58iter/s]

Are these warnings safe to ignore?

Best wishes,

Jon


#4

yup! safe to ignore-- working on it.
thank you!!!