-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
sct_get_centerline: Use the new viewer #2035
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.
there is a weird bug (i think related to the centerline smoothing). To reproduce:
cd sct_example_data/t1/
sct_get_centerline -i t1.nii.gz -method viewer
results (tested on ba40d2f):
… into cg_sctGetCenterline_newViewer
@jcohenadad : Thank you. I reproduced the bug, and I think it comes from this line: I will investigate in this way. UPDATE: In the commit 983a719, I reduced the nurbs_pts_number in the smoothing. It seems to fix it. |
i still find issues if the number of points is too low (switches to hanning, but we don't know because verbose is set to False). For this PR, i would suggest to only introduce the new viewer, without perturbating too much the behaviour (which requires extensive testing on larger set of images). So i would suggest the following modifs:
happy to help :-) |
…_process_segmentation.extract_centerline
…e in sct_process_segmentation.extract_centerline
@jcohenadad: Thank you for your help.
I tested it on the example_data with the default param (gap=10) and it seems to work well. |
scripts/sct_get_centerline.py
Outdated
|
||
|
||
def viewer_centerline(image_input_reoriented, interslice_gap, verbose): | ||
def _call_viewer_centerline(fname_in, interslice_gap=10): |
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.
i find it a bit too dense now, how about setting a compromise with interslice_gap=20
?
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.
I agree!
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.
great contribution! I just made a minor comment about the default value for interslice_gap
. Otherwise looks OK!
@jcohenadad: By increasing the default gap to 20.0mm, I observed 'not smooth centerline' again. Another approach would be to leave gap=20 and |
@charleygros let's go with your latest commit. We definitely don't want to have an approach where a message is sent, asking the user to make a decision (99.99% of our users don't read the terminal output). |
sct_get_centerline: use the new viewer Former-commit-id: a627117
sct_get_centerline
currently usessct_viewer.ClickViewerPropseg()
instead of the newspinalcordtoolbox.gui.*
viewer.This Pull Request aims at integrating the new viewer into
sct_get_centerline
.To test it, please run:
This code was in
sct_deepseg_sc
--> I moved it insct_get_centerline
--> that s why bothsct_deepseg_sc
andsct_deepseg_lesion
now called functions fromsct_get_centerline
.To test it, please run:
This PR fixes the issue #1837.