PYME.DSView.modules.annotation module¶
- class PYME.DSView.modules.annotation.AnnotateBase(win, selector, minimize=False)¶
Bases:
object
- Parameters
- winPYME.ui.AUIFrame (or derived class) instance.
Window to add annotation contols to. Must implement AddMenuItem()
- selectorPYME.ui.selection.Selection instance
class holding info about the current selection.
- DrawOverlays(view, dc)¶
- add_curved_line(event=None)¶
- add_filled_polygon(event=None)¶
- clear_all(event=None)¶
- clear_selected(event=None)¶
- get_json_annotations()¶
- render(gl_canvas)¶
- select_annotation(pos)¶
- set_lock_mode(mode)¶
- snake_refine_trace(event=None, sender=None, **kwargs)¶
- class PYME.DSView.modules.annotation.Annotater(dsviewer)¶
Bases:
Plugin
,AnnotateBase
- Parameters
- winPYME.ui.AUIFrame (or derived class) instance.
Window to add annotation contols to. Must implement AddMenuItem()
- selectorPYME.ui.selection.Selection instance
class holding info about the current selection.
- OnLoadClassifier(event=None)¶
- OnSaveClassifier(event=None)¶
- apply_mask(event=None)¶
- get_label_image(event=None, mask=False)¶
- svm_segment(event=None)¶
- train_naive_bayes(event=None)¶
- train_svm(event=None)¶
- class PYME.DSView.modules.annotation.AnnotationList(iterable=None, json=None, filename=None)¶
Bases:
list
- add(type, points, label, z=None, width=1)¶
- add_curve(points, label, z=None, width=1)¶
- add_line(start, finish, label, z=None, width=1)¶
- add_polygon(points, label, z=None, width=1)¶
- add_rectangle(start, finish, label, z=None, width=1)¶
- label_points(points)¶
Label points based on the current set of annotations
- Parameters
- pointsMx2 ndarray
- Returns
- labels: Mx1 array of labels
- rasterize(z, shape)¶
- class PYME.DSView.modules.annotation.LabelPanel(parent, labeler, **kwargs)¶
Bases:
mClass
- OnChangeLineWidth(event)¶
- OnChangeStructure(event)¶
- get_labels()¶
- on_adjust_snake(event)¶
- on_change_lock_mode(event=None)¶
- PYME.DSView.modules.annotation.Plug(dsviewer)¶
- PYME.DSView.modules.annotation.minimum_distance_to_poly(poly, points, closed=True)¶
calculate minimum distances between a set of 2D line segments and a set of 2D points
- Parameters
- polyNx2 ndarray
line segment or polygon
- pointsMx2 ndarray
points to test
- Returns
- Mx1 array of (signed?) distances