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:
object
GUI 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 thePointPicker
will 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:
object
Defines 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_refine
specific button and they can be marked as selected by pressingkey_select
.-
key_refine
= 'r'¶
-
key_select
= 's'¶
-
-
class
DraggableMarkList
(*args)[source][source]¶ Bases:
list
Extended List with some extra functions for
DraggableMark
objects.-
get_points
(all_pts=True)[source][source]¶ Convert the list of
DraggableMark
objects to a ndarray holding just coordinates.Parameters: all_pts (bool) – if True
function returns all coordinate. IfFalse
function return just coordinates formDraggableMark
objects marked as selected.Returns: array that contains just the coordinates of the DraggableMark
objects of the list.Return type: ndarray
-