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

Avocado Protection (🥑) #40

Closed
william-silversmith opened this issue Feb 20, 2020 · 6 comments
Closed

Avocado Protection (🥑) #40

william-silversmith opened this issue Feb 20, 2020 · 6 comments
Assignees
Labels
feature New feature or request

Comments

@william-silversmith
Copy link
Contributor

william-silversmith commented Feb 20, 2020

Avocado (n.) 1. a delicious buttery fruit 2. a neuron cell body with its nucleus punched out.

Alyssa and I developed an anti-avocado attack plan last night. Here are some of the features:

Given you know there's a soma and you want to know if you are dealing with an avocado, you can march along a number of rays projected from the soma center. If the first different voxel encountered by each ray matches the other rays, you're in an avocado. If they are all different, you're in a non-avocado cell.

Some of the avocado fruits have holes in them, so a simple flood fill is insufficient. Therefore you need to do something more like:

labels = binary_fill_holes(labels)
while not labels[center]:
     labels = morophological_close(labels)
     labels = binary_fill_holes(labels)

For dealing with soma contacting the edge of the volume, once you know you're dealing with an avocado, paint a 1 voxel thick border on the faces touching the edge of the image. Then run binary fill holes.

@william-silversmith william-silversmith added the feature New feature or request label Feb 20, 2020
@william-silversmith
Copy link
Contributor Author

image

@shangmu
Copy link

shangmu commented Feb 20, 2020

Oh man. The poor avocado had its nucleus punched out and you guys are still conspiring to attack it? >_<

@william-silversmith
Copy link
Contributor Author

william-silversmith commented Feb 20, 2020 via email

@william-silversmith
Copy link
Contributor Author

A 3D view.
image

@william-silversmith
Copy link
Contributor Author

Fixing the hole in the avocado fruit is probably unnecessary. We can just do binary_image = fruit + pit

@william-silversmith
Copy link
Contributor Author

Added in #43

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

No branches or pull requests

2 participants