Skip to content

Update GeodesicSegmentation CLI#1496

Open
AlexanderGetka-cbica wants to merge 3 commits intoCBICA:masterfrom
AlexanderGetka-cbica:fix-geodesic
Open

Update GeodesicSegmentation CLI#1496
AlexanderGetka-cbica wants to merge 3 commits intoCBICA:masterfrom
AlexanderGetka-cbica:fix-geodesic

Conversation

@AlexanderGetka-cbica
Copy link
Contributor

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.

thresholder->SetInsideValue(1);
thresholder->SetLowerThreshold(threshold);
thresholder->SetUpperThreshold(maxVal);
thresholder->SetLowerThreshold(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
thresholder->SetLowerThreshold(0);
thresholder->SetLowerThreshold(threshold);

This should use threshold instead of a hard-coded 0.

Copy link
Contributor Author

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
thresholder->SetUpperThreshold(threshold);
thresholder->SetUpperThreshold(maxVal);

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.

3 participants