-
Notifications
You must be signed in to change notification settings - Fork 64
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 GeodesicSegmentation CLI #1496
base: master
Are you sure you want to change the base?
Update GeodesicSegmentation CLI #1496
Conversation
thresholder->SetInput(geosOutput); | ||
thresholder->SetOutsideValue(0); | ||
thresholder->SetInsideValue(1); | ||
thresholder->SetLowerThreshold(threshold); | ||
thresholder->SetUpperThreshold(maxVal); | ||
thresholder->SetLowerThreshold(0); |
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.
thresholder->SetLowerThreshold(0); | |
thresholder->SetLowerThreshold(threshold); |
This should use threshold
instead of a hard-coded 0
.
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.
Your suggestion is what it was before. The geodesic distance map that is created before the thresholding step is represented as increasing values away from the original segmentation/seeds. So setting it as you suggest will yield a 1 label in everything outside the predicted region of interest.
I tested this and compared to the GUI version with my changes, and this makes them consistent.
thresholder->SetLowerThreshold(threshold); | ||
thresholder->SetUpperThreshold(maxVal); | ||
thresholder->SetLowerThreshold(0); | ||
thresholder->SetUpperThreshold(threshold); |
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.
thresholder->SetUpperThreshold(threshold); | |
thresholder->SetUpperThreshold(maxVal); |
Fixes an issue where GeodesicSegmentation's CLI was broken -- threshold values could never be read, the generated masks/distance maps were not being written for any voxels other than what was already labelled, and the threshold filter was wrongly inverted.