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

Remove grains based on height #431

Open
Jean-Du opened this issue Jan 12, 2023 · 7 comments · May be fixed by #574
Open

Remove grains based on height #431

Jean-Du opened this issue Jan 12, 2023 · 7 comments · May be fixed by #574
Labels
enhancement New feature or request

Comments

@Jean-Du
Copy link
Collaborator

Jean-Du commented Jan 12, 2023

Is your feature request related to a problem? Please describe.
It would be useful to be able to remove grains for being too high. This could prevent certain impurities having the same area as molecules of interest from being selected.

Describe the solution you'd like
Introduce another user configurable threshold based on the mean height of the grain, so that for example, grains whose mean height deviates from the image mean by over 5 sigma can be excluded. (Suggested by @SylviaWhittle )
Example images will be supplied as google drive links in the comments.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@Jean-Du Jean-Du added the enhancement New feature or request label Jan 12, 2023
@Jean-Du
Copy link
Collaborator Author

Jean-Du commented Jan 12, 2023

As an example, this spm file contains grains that are too high and aren't of interest (see processed and masked images).
If this feature request is implemented, grains circled in blue in this image can be excluded for being too high.

@ns-rse ns-rse added the duplicate This issue or pull request already exists label Jan 16, 2023
@ns-rse
Copy link
Collaborator

ns-rse commented Jan 16, 2023

As #390 closed #154 I think this can be closed too as its a duplicate.

@ns-rse ns-rse closed this as completed Jan 16, 2023
@Jean-Du
Copy link
Collaborator Author

Jean-Du commented Jan 16, 2023

@ns-rse Hi, I think this feature request is slight different from #154 as it's about user configurable grain removal in the grains section, whereas the scar removal is in the filters section and doesn't remove globular features, such as those shown in the example images above. @SylviaWhittle should be able to confirm this.

@Jean-Du Jean-Du reopened this Jan 16, 2023
@Jean-Du Jean-Du removed the duplicate This issue or pull request already exists label Jan 31, 2023
@ns-rse
Copy link
Collaborator

ns-rse commented Apr 21, 2023

If the overall aim of developing TopoStats is to provide a "hands-free" experience (as much as that it is possible) where output is as good as it can be I feel it is appropriate to take time to consider and implement features and base it on empirical data to justify the design decisions rather than just adding options just because we can.

This would require systematic assessment of a wide range of scans from different sample types (not just minicircles.spm) to provide the data on which to base such decisions.

I'd also question what to do when such regions are removed, as it would result in "blank" regions as its not possible to interpolate what is behind the high regions. If there are other grains of interest going into such a region you can't really extrapolte/interpolate what would be behind so you're left with a "hole" in the image. Is that any better than the existing high region? To my crude understanding they look like impurities in the sample/buffer mixture e.g. dirt. Sometimes the answer to such issues isn't algorithmic, but rather better data.

@Jean-Du
Copy link
Collaborator Author

Jean-Du commented Apr 21, 2023

Hi @ns-rse , thanks for your thoughts! I would like to clarify that removing those grains would not lead to blank regions, as this step would happen in 'grains' and not 'filter': the idea is simply to provide an option to exclude them from being masked.

@Jean-Du
Copy link
Collaborator Author

Jean-Du commented Apr 21, 2023

This would function in a similar way to area_thresholding except that it's based on height. I recall @SylviaWhittle saying this is relatively straightforward to implement?

@slackline
Copy link
Contributor

Ah, ok so its not really a removal then, rather its an aspect of masking and what to mask and what not to. 👍

I still think it would be useful to have some empirical data across a wide range of samples to do this. One image alone isn't a great basis for sampling and one unintended consequence might be that whilst it works on one image with obvious problems as linked that when applied to other images without such extremes some grains that are meant to be masked are not.

As we go forward I'd like to design features correctly based on a range of samples as one of the drawbacks so far has been relying solely on minicircles.spm and then TopoStats being used on a range of different samples that throw up errors. If we have a good sample set to start with then we can design things better from the outset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants