MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / on_select

Method on_select

deeplabcut/utils/skeleton.py:187–200  ·  view source on GitHub ↗
(self, verts)

Source from the content-addressed store, hash-verified

185 self.fig.canvas.draw_idle()
186
187 def on_select(self, verts):
188 # self.path = Path(verts)
189 # self.verts = verts
190 inds = self.tree.query_ball_point(verts, 5)
191 inds_unique = []
192 for lst in inds:
193 if len(lst) and lst[0] not in inds_unique:
194 inds_unique.append(lst[0])
195 for pair in zip(inds_unique, inds_unique[1:], strict=False):
196 pair_sorted = tuple(sorted(pair))
197 self.inds.add(pair_sorted)
198 self.segs.add(tuple(map(tuple, self.xy[pair_sorted, :])))
199 self.lines.set_segments(self.segs)
200 self.fig.canvas.draw_idle()

Calls 1

addMethod · 0.45