glue-viz / bqplot-image-gl

Jupyter widget for displaying images with a focus on astronomy
MIT License
20 stars 15 forks source link

Feature: contour widget #10

Closed maartenbreddels closed 4 years ago

maartenbreddels commented 5 years ago

Draws a contour line on top of an image. contour

TODO:

maartenbreddels commented 5 years ago

We now have multiple level support contour-multiple

maartenbreddels commented 5 years ago

I'm not sure about the performance, what we could do if this is an issue is to at least debounce on changes of the level trait on the javascript side, and only compute after say 0.05 or 0.1 seconds.

maartenbreddels commented 5 years ago

The performance of d3 isn't so good. On a 1000x1000 grid, it takes about 1 second, while skimage will do the same in 20ms (single core).

I've added a feature to push in precomputed contour lines (from skimage for instance). This allows us to push the contours from glue, and even do multithreading if performance becomes an issue (for multiple contour lines).

maartenbreddels commented 4 years ago

Merging this for now, we can always improve later/