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

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

Merged
merged 21 commits into from
Oct 23, 2023

Conversation

jcohenadad
Copy link
Member

@jcohenadad jcohenadad commented Aug 1, 2023

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

image
Generated with: d854c26

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: #21

@jcohenadad jcohenadad marked this pull request as draft August 1, 2023 21:29
@jcohenadad jcohenadad changed the title Update spinal levels Update spinal levels based on Frostell et al. paper Aug 4, 2023
@jcohenadad
Copy link
Member Author

As per #28 (comment), a suggestion would be to have:

  • one file for spinal level labels (one pixel per level): 14, point-wise spinal level labels, PAM50_label_spinal_levels.nii.gz
  • one file for spinal levels (labeled segmentation): 15, spinal cord mask with spinal levels, PAM50_spinal_levels.nii.gz

@jcohenadad
Copy link
Member Author

jcohenadad commented Oct 20, 2023

Oops! on 38f6ce3 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:

length_segment = np.uint8(length_spinalcord * level_percent / 100)

@jcohenadad jcohenadad marked this pull request as ready for review October 21, 2023 17:32
@jcohenadad
Copy link
Member Author

We can merge and fix spinalcordtoolbox/spinalcordtoolbox#4248 afterwards

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

Successfully merging this pull request may close these issues.

Update spinal segments using Frostell et al. paper
1 participant