Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning caused by sct_process_segmentation #5

Open
plbenveniste opened this issue Nov 20, 2024 · 2 comments
Open

Warning caused by sct_process_segmentation #5

plbenveniste opened this issue Nov 20, 2024 · 2 comments

Comments

@plbenveniste
Copy link
Collaborator

plbenveniste commented Nov 20, 2024

Here is the warning message that I saw in the log file.

--
Spinal Cord Toolbox (git-master-72f072555f97e8417260869567b34f8d0c5f5166)

sct_process_segmentation -i sub-HC001_acq-sagCervCube_T2w_seg.nii.gz -vertfile sub-HC001_acq-sagCervCube_T2w_seg_labeled.nii.gz -perslice 1 -o /Users/plbenveniste/Documents/data/ms-mayo/output_pipeline/results/sub-HC001_CSA.csv -append 1 -qc /Users/plbenveniste/Documents/data/ms-mayo/output_pipeline/qc
--

/Users/plbenveniste/spinalcordtoolbox/python/envs/venv_sct/lib/python3.9/site-packages/numpy/core/fromnumeric.py:3504: RuntimeWarning: Mean of empty slice.
  return _methods._mean(a, axis=axis, dtype=dtype,
/Users/plbenveniste/spinalcordtoolbox/python/envs/venv_sct/lib/python3.9/site-packages/numpy/core/_methods.py:129: RuntimeWarning: invalid value encountered in scalar divide
  ret = ret.dtype.type(ret / rcount)
�[33mQC report only available for PMJ-based CSA. QC report not generated.�

I will look into what it is and see whether it we can be easily fixed.

@jcohenadad
Copy link
Member

Right, there is no QC for process_segmentation (unless if using PMJ-based CSA), so the warning message is normal. You can simply remove the "-qc" flag.

@plbenveniste
Copy link
Collaborator Author

Removing the QC indeed removed a part of the warning.
However, I still have the following warning message:

/Users/plbenveniste/spinalcordtoolbox/python/envs/venv_sct/lib/python3.9/site-packages/numpy/core/fromnumeric.py:3504: RuntimeWarning: Mean of empty slice.
  return _methods._mean(a, axis=axis, dtype=dtype,
/Users/plbenveniste/spinalcordtoolbox/python/envs/venv_sct/lib/python3.9/site-packages/numpy/core/_methods.py:129: RuntimeWarning: invalid value encountered in scalar divide
  ret = ret.dtype.type(ret / rcount)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants