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

Slice interpolation #38

Open
GenevieveBuckley opened this issue Aug 8, 2022 · 4 comments
Open

Slice interpolation #38

GenevieveBuckley opened this issue Aug 8, 2022 · 4 comments

Comments

@GenevieveBuckley
Copy link
Contributor

This issue is intended as a record of some of our offline & email discussions.

We've discussed three different types of approaches:

  1. Shape based slice interpolation
  2. Convex hulls
  3. Contour slice interpolation

1. Shape based slice interpolation

Resources

  • Paper: Raya and Udupa "Shape-Based Interpolation of Multidimensional Objects" IEEE TRANSACTIONS ON MEDICAL IMAGING, VOL. 9, NO. I , MARCH 1990
  • This StackOverflow question (useful to look at, although it's not n-dimensional & I think there's a subtle bug in there too)

Work done

Problems

  • You get artifacts if there is not significant overlap of pixels between the labelled slices. So that's a problem, especially if you have to label long thin things like filaments of neurons, that may not be well aligned with the image axes.

Plan

Continue figuring out the user interface. This will be necessary regardless of the interpolation algorithm used.

2. Convex hulls

Resources

Work done

Problems

  • It's super, super slow. It's not useable because of this, and I don't see a way to make it as fast as we'd need.
  • It's also not solving the actual problem. You'd get most of your object labelled, but you'd still need to edit every single slice at the edges, which defeats the point.

Plan

Discontinue the convex hull approach.

3. Contour slice interpolation

Resources:

Plan

Try contour slice interpolation in place of the shape based euclidean distance transform method above. See if the results are nicer on a broader range of datasets (at first glance, it certainly seems like it)

@GenevieveBuckley
Copy link
Contributor Author

@jni and @jamesyan-git - the content about the napari-nd-annotator is new, we haven't talked about that yet. I think it would be useful to look at, even if there are some problems with the performance (see here) and documentation (although I did write up some notes here)

@bauerdavid
Copy link

@GenevieveBuckley The performance drop happens regardless of the interpolation part, it is rather related to UI problems. For a single object, interpolating ~20-30 slices is done in ~0.01s (with 300 contour points), so theoretically up to 100 similar-sized objects it would run under 1s (although I assume this could be further optimized).

@jni
Copy link
Owner

jni commented Aug 25, 2022

The contour stuff in nd-annotator is so great! Makes me feel rather validated, thanks @bauerdavid! 😂

@GenevieveBuckley
Copy link
Contributor Author

Link to #32

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