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

image_to_mask feature in math-tools/common_tools possibly already somewhere else #116

Open
Gregoire-V opened this issue Nov 5, 2024 · 1 comment

Comments

@Gregoire-V
Copy link
Contributor

I added a feature image_to_mask in July, which converts an image (either scalar or vectorial) into a mask. I put it in math-tools/common_tools. In this code, the output mask is 0 in the voxels where the input image is 0 (or a null vector) and 1 elsewhere. But I have the feeling that this feature already exists inside segmentation/basic_tools/thr_image (but maybe here, that doesn't work for vectorial images?), or segmentation/basic_tools/mask_image. As I don't understand well what the cxx files inside these two folders do, I'm not sure that it's the case. If so, maybe we should remove image_to_mask in math-tools/common_tools?

@astamm
Copy link
Contributor

astamm commented Jan 17, 2025

Your tool animaImageToMask is indeed very similar to animaThrImage. We should have a unique tool that leverages the good features of both. It should:

  • be generic and deal with ND image with N generic and VectorImage;
  • offer the possibility for a user-defined threshold which, if omitted, default to what you do in ImageToMask.

If you can work on it and propose a PR, that would be awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants