-
Notifications
You must be signed in to change notification settings - Fork 56
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
get_contour_fill_mask: truncating contour data #22
Comments
I forget why exactly we performed the conversion at that stage. Most likely we can just remove it but I'll bring this up with the rest of the team. Would you mind attaching you result images directly in this issue just so that they are easier to reference? |
The other thing I would add, is that it might be an idea to round |
@asim-shrestha is that the right link? Just took me to the original code we were discussing. |
Not sure about your tests, but it seems the ITK library rounds the voxel index according to their docs. |
Hi there,
It seems perhaps that you're rounding the contour data too early in your code. The contour_data is changed to type 'int' here, before being converted to the pixel coordinates. I think you can just remove
.astype(int)
as it's converted to 'int32' further on.This change can make a difference to the resulting mask, please see attached example where I forked the code and applied the change to the fork:
https://colab.research.google.com/drive/1anBcwIGgrGcPDbsyIDrNqgb0H9UZxJhC?usp=sharing
The text was updated successfully, but these errors were encountered: