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

TomoSAM, threshold masking, and editable area #21

Open
FossilTurtles opened this issue Sep 18, 2024 · 2 comments
Open

TomoSAM, threshold masking, and editable area #21

FossilTurtles opened this issue Sep 18, 2024 · 2 comments

Comments

@FossilTurtles
Copy link

Hi there,

Congrats and thank you for your great work with TomoSAM! I am testing it to see if it can help speed up segmentation of fossil vertebrates. When segmenting bone material, we would generally like to keep the internal bone structure in order to, for example, separately segment a canal or study bone compactness. Threshold masking usually does a good job, allowing us to select only the material of interest (here bone) and not the cavities inside. Here is an example:
Capture d’écran 2024-09-18 à 10 16 18

When I select my object by prompting a point in TomoSAM, the resulting mask includes the internal cavity, despite threshold masking being activated in the Segment Editor module:
Capture d’écran 2024-09-18 à 10 17 42

Excluding point does not work well:
Capture d’écran 2024-09-18 à 10 18 34

Now I understand SAM works differently, but would there be a way of making TomoSAM take into account threshold masking?

A second related issue concerns the editable area. When set to "Outside all segments" in the Segment Editor module, any selection with a segmentation tool will not overlap with previously segmented parts. TomoSAM does not take this into account either.

Both of these features (threshold masking and editable area) are much used in the field of morphology. Including them in TomoSAM could really make this extension extremely useful for morphologists.

Thanks,
Jérémy.

@pieper
Copy link
Collaborator

pieper commented Sep 18, 2024

@FossilTurtles I agree with your suggestion that TomoSAM should behave like other editor effects in terms of masking and threshold rules.

One suggestion as a workaround is to first make the whole-bone mask using TomoSAM and then do a threshold within the segments to make new segments of the internal structures.

@FossilTurtles
Copy link
Author

@pieper Yep, good point, this workaround does work. Thanks.

But it will be a time saver if TomoSAM somehow took threshold and masking into consideration natively.

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

2 participants