Update GeodesicSegmentation CLI#1496
Open
AlexanderGetka-cbica wants to merge 3 commits intoCBICA:masterfrom
Open
Update GeodesicSegmentation CLI#1496AlexanderGetka-cbica wants to merge 3 commits intoCBICA:masterfrom
AlexanderGetka-cbica wants to merge 3 commits intoCBICA:masterfrom
Conversation
sarthakpati
suggested changes
May 28, 2022
| thresholder->SetInsideValue(1); | ||
| thresholder->SetLowerThreshold(threshold); | ||
| thresholder->SetUpperThreshold(maxVal); | ||
| thresholder->SetLowerThreshold(0); |
Contributor
There was a problem hiding this comment.
Suggested change
| thresholder->SetLowerThreshold(0); | |
| thresholder->SetLowerThreshold(threshold); |
This should use threshold instead of a hard-coded 0.
Contributor
Author
There was a problem hiding this comment.
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); |
Contributor
There was a problem hiding this comment.
Suggested change
| thresholder->SetUpperThreshold(threshold); | |
| thresholder->SetUpperThreshold(maxVal); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.