Skip to content

Commit

Permalink
change subsurface_vertex_mask to not use zeros at incorrect locations
Browse files Browse the repository at this point in the history
  • Loading branch information
spopham committed Jul 18, 2018
1 parent 13054a2 commit 008c491
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cortex/polyutils/subsurface.py
Expand Up @@ -64,7 +64,8 @@ def create_subsurface(self, vertex_mask=None, polygon_mask=None):
vertex_mask[self.polys[polygon_mask].flat] = True

# build map from old index to new index
vertex_map = np.zeros(self.pts.shape[0], dtype=np.int)
# vertices not in the subsurface are represented with large numbers
vertex_map = np.ones(self.pts.shape[0], dtype=np.int) * np.iinfo(np.int32).max
vertex_map[vertex_mask] = range(vertex_mask.sum())

# reindex vertices and polygons
Expand Down

0 comments on commit 008c491

Please sign in to comment.