spinalcordtoolbox / PAM50

https://github.com/neuropoly/spinalcordtoolbox
2 stars 1 forks source link

Update spinal levels based on Frostell et al. paper #18

Closed jcohenadad closed 1 year ago

jcohenadad commented 1 year ago

This PR updates the spinal levels with an improved version. See full context in #16.

![image](https://github.com/spinalcordtoolbox/PAM50/assets/2482071/c26f5659-777f-483b-96a7-71c9c12e361c) Generated with: d854c268d445fa5ed18b8928b730fd0a7c108c3a

As the new spinal levels are integer (vs. the previous spinal levels which were probabilistic), they are contained within a single file located under PAM50/template (previously PAM50/spinal_levels). The following changes are therefore necessary:

Fixes #16

Related: https://github.com/spinalcordtoolbox/PAM50/pull/21

jcohenadad commented 1 year ago

As per https://github.com/spinalcordtoolbox/PAM50/issues/28#issuecomment-1771540105, a suggestion would be to have:

jcohenadad commented 1 year ago

Oops! on 38f6ce3418aebcee1458594f22646dc94ca889f6 I noticed a value=1 at the very bottom: image

It extends for 9 slices. Probably related to the code, which rounds segment length and then accumulate errors going caudally: https://github.com/spinalcordtoolbox/PAM50/blob/38f6ce3418aebcee1458594f22646dc94ca889f6/scripts/generate_spinal_levels.py#L94

jcohenadad commented 1 year ago

We can merge and fix https://github.com/spinalcordtoolbox/spinalcordtoolbox/issues/4248 afterwards