get_steps#

omnipose.utils.get_steps(dim)[source]#

Get a symmetrical list of all 3**N points in a hypercube represented by a list of all possible sequences of -1, 0, and 1 in ND.

1D: [[-1],[0],[1]] 2D: [[-1, -1],

[-1, 0], [-1, 1], [ 0, -1], [ 0, 0], [ 0, 1], [ 1, -1], [ 1, 0], [ 1, 1]]

The opposite pixel at index i is always found at index -(i+1). The number of possible face, edge, vertex, etc. connections grows exponentially with dimension: 3 steps in 1D, 9 steps in 3D, 3**N in ND.