Commit 76d185e26bbbda28c2e1c25487a0488d570236d0
1 parent
519c44b4
Exists in
get_pixel
Better doc get_coordinate_cursor
Showing
1 changed file
with
12 additions
and
1 deletions
Show diff stats
invesalius/data/viewer_slice.py
| @@ -976,7 +976,18 @@ class Viewer(wx.Panel): | @@ -976,7 +976,18 @@ class Viewer(wx.Panel): | ||
| 976 | return mx, my | 976 | return mx, my |
| 977 | 977 | ||
| 978 | def get_coordinate_cursor(self, mx, my, picker=None): | 978 | def get_coordinate_cursor(self, mx, my, picker=None): |
| 979 | - # Find position | 979 | + """ |
| 980 | + Given the mx, my screen position returns the x, y, z position in world | ||
| 981 | + coordinates. | ||
| 982 | + | ||
| 983 | + Parameters | ||
| 984 | + mx (int): x position. | ||
| 985 | + my (int): y position | ||
| 986 | + picker: the picker used to get calculate the voxel coordinate. | ||
| 987 | + | ||
| 988 | + Returns: | ||
| 989 | + world coordinate (x, y, z) | ||
| 990 | + """ | ||
| 980 | if picker is None: | 991 | if picker is None: |
| 981 | picker = self.pick | 992 | picker = self.pick |
| 982 | 993 |