Skip to content
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

Morphology #15

Open
nilgoyette opened this issue Nov 18, 2022 · 0 comments
Open

Morphology #15

nilgoyette opened this issue Nov 18, 2022 · 0 comments

Comments

@nilgoyette
Copy link
Contributor

There's a problem with the border management in the morphological erosion. Currently we are doing:

  • Set all borders to 0, then work on all 3x3x3 windows. Thus avoiding to work with outside voxels.
  • This seems logical, but it always gives a black border, whatever the kernel used.

The consequence of our current method can be seen in the following image.
Wrong

  • In red+pink we have ANTs ImageMath result.
  • in pink, we have ndimage result. We can easily see that we "ate" the border.

I read more and I realized that it's not the right behavior: "Pixels beyond the image border are assigned the maximum value afforded by the data type." Thus all the padded voxels should be set to 1.

Our current method (working with windows to avoid padding) can't work. We can keep the window but we must pad with 1 if we want to avoid border effects.

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

No branches or pull requests

1 participant