Skip to content

Instantly share code, notes, and snippets.

View almarklein's full-sized avatar

Almar Klein almarklein

View GitHub Profile
from skimage.graph.heap import BinaryHeap as BinaryHeap_sk
import time
VALUE_T = nb.float64
REFERENCE_T = nb.int32
@nb.jit # jit is slightly faster, compile time for autojit is ~2s
class BinaryHeap:
@nb.void(nb.int32)
@almarklein
almarklein / gist:5683681
Last active July 1, 2021 13:42
Visualize marching cubes output
import skimage.measure
import skimage.morphology
import visvis as vv
from visvis.utils import iso
import numpy as np
def ball(radius, dtype=np.uint8):
# New from skimage.morphology
class MouseEvent(Event):
""" Class describing mouse events.
Input arguments
---------------
source : object
The visualization object that this event is created from or applies to.
type : str
string indicating the event type (e.g. mouse_press, key_release)
kwds : keyword arguments