mne.viz.
ClickableImage
(imdata, **kwargs)¶Display an image so you can click on it and store x/y positions.
Takes as input an image array (can be any array that works with imshow, but will work best with images. Displays the image and lets you click on it. Stores the xy coordinates of each click, so now you can superimpose something on top of it.
Upon clicking, the x/y coordinate of the cursor will be stored in self.coords, which is a list of (x, y) tuples.
Parameters: | imdata: ndarray :
**kwargs : dict
|
---|
Notes
New in version 0.9.0.
Methods
onclick (event) |
Mouse click handler. |
plot_clicks (**kwargs) |
Plot the x/y positions stored in self.coords. |
to_layout (**kwargs) |
Turn coordinates into an MNE Layout object. |
__init__
(imdata, **kwargs)¶Display the image for clicking.
onclick
(event)¶Mouse click handler.
Parameters: | event: matplotlib event object :
|
---|
plot_clicks
(**kwargs)¶Plot the x/y positions stored in self.coords.
Parameters: | **kwargs : dict
|
---|
to_layout
(**kwargs)¶Turn coordinates into an MNE Layout object.
Normalizes by the image you used to generate clicks
Parameters: | **kwargs : dict
|
---|