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
Display vertebral levels when provided with -perslice 1
#4004
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking on this task, and opening up a PR so quickly!
I found this PR a little difficult to review, though. So, I have some PR ettiquette-related requests for the future, if possible?
-
Could you add extended descriptions to your commits, when applicable?
They're really helpful for explaining the reasons for each change. Without explanations, a reviewer either has to has to guess the motivations for each commit, or they have to take the time ask for explanations as part of their review. This slows down the review process, and makes a PR harder to review.
(Obviously sometimes the changes are pretty self-explanatory? But in this case, the motivations for each commit weren't clear to me.)
-
Could you break down commits into smaller changes?
(I had some trouble understanding 0c21b16, since it has multiple changes that are seemingly unrelated.)
Thank you again!
Without this, currently the default value of `argumnets.vert` is `None`. By adding this line, it makes it so that the default value of `arguments.vert` will be an empty list (`[]`).
This allows users to specify `-vert` by itself, assuming they've run `sct_warp_template` and generated the level file in the working directory.
Instead of manually setting `vert` to `[]` and `vertfile` to `None`, we can just rely on their default values.
I've made some changes to implement the suggestions from the earlier review. To test these changes, I followed the instructions from the Registration to Template tutorial to register the Before running
|
Without this check, `aggregate_per_slice_or_level` will try to generate vertebral level information on a nonexistent file.
9dd71dc
to
02d25bb
Compare
@joshuacwnewton I've tested it out and works fine on my side! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I think we can merge. :)
To be compatible with spinalcordtoolbox/spinalcordtoolbox#4004
Checklist
GitHub
PR contents
Description
This PR adresses #3113. In
sct_process_segmentation
when specifying-vertfile
and-perslice 1
, it now specifies the vertebral levels (when they are provided).Linked issues
Fixes #3113 (and also its duplication #3976)