Picking¶
Picker¶
Initialise a GUI to pick various points on images.
This Module provides a class to initialise a GUI, to pick various points on one or multiple images.
-
class
PointPicker[source][source]¶ Bases:
objectGUI for picking points.
-
pick(images, all_pts=True)[source][source]¶ Initialise a GUI to pick points on multiple images.
A matplot GUI will be initialised, where the user can pick multiple points on the N
images. Afterwards thePointPickerwill return N ndarrays, which holds the coordinates of the marked points. Each ndarray holds the points for one image.Parameters: Returns: Returns a List of length N, where each cell contains a ndarray (M,2), which holds the coordinates of the M marked points per image.
Return type: list(ndarray)
-
Draggables¶
This module contains draggable objects for the matplotlib GUI.
The objects are used to mark specific points on an image. The module also contains a special list to save these objects. This list is extended with special functions to get the coordinates of the marked points.
-
class
DraggableMark(mark, img=None)[source][source]¶ Bases:
objectDefines marks which can be dragged by mouse.
The placed mark can be dragged by simple left click and can be refined by pressing the
key_refinespecific button and they can be marked as selected by pressingkey_select.-
key_refine= 'r'¶
-
key_select= 's'¶
-
-
class
DraggableMarkList(*args)[source][source]¶ Bases:
listExtended List with some extra functions for
DraggableMarkobjects.-
get_points(all_pts=True)[source][source]¶ Convert the list of
DraggableMarkobjects to a ndarray holding just coordinates.Parameters: all_pts (bool) – if Truefunction returns all coordinate. IfFalsefunction return just coordinates formDraggableMarkobjects marked as selected.Returns: array that contains just the coordinates of the DraggableMarkobjects of the list.Return type: ndarray
-