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

meta: list of things we want #14

Open
7 tasks done
alisterburt opened this issue May 18, 2024 · 2 comments
Open
7 tasks done

meta: list of things we want #14

alisterburt opened this issue May 18, 2024 · 2 comments

Comments

@alisterburt
Copy link
Member

alisterburt commented May 18, 2024

List of shapes we want CLI tools for

  • cylinder
  • ellipsoid
  • sphere
  • cuboid
  • cube
  • cone
  • curved membrane

All would ideally have a configurable soft edge parameter.

I think we should parametrise diameters/radii in angstroms as a general rule but happy to discuss if you don't agree!

not sure how the membrane should be specified...

@alisterburt alisterburt changed the title meta: meta: list of things we want May 18, 2024
@brisvag
Copy link

brisvag commented Aug 7, 2024

Awesome stuff! This repo is a much more torough version of something I worked on here https://github.com/brisvag/stemia/blob/main/src/stemia/image/create_mask.py.

I have a couple suggestions based on my work on that that might be useful here:

  1. At the time I used https://pypi.org/project/edt/. I think it was faster than scipy at the time (and had more options to work with multiple labels, irrelevant here). EDIT: looks like scipy's much faster :)
  2. Implementing the mask with a "range" approach (instead of just using >= in the SDF) will give you "for free" the ability to have a hollow cylinder, sphere, cube, and everything else. I do this here:
    https://github.com/brisvag/stemia/blob/b577790fd2177755f0ebeba956bd49902ef61bf5/src/stemia/utils/image_processing.py#L151
  3. Using the smoothstep_normalized or something similar should give better results for the padding
  4. Curved membranes are just a very big hollow sphere with the center outside the box... 😉

@milesagraham
Copy link
Member

Thanks very much for this, @brisvag . Have taken your #4 suggestion as this was easiest to implement. Have taken a look at your other suggestions and look forward to following up on them

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

3 participants