Skip to content

display coordinates of line segments and annotations in a table #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions mmNapari/simpleExample.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@
- 3D point annotations
- 3D line tracings

To run locally, you need to specify the full path to the map in mapPath
To run locally, you need to specify the full path to the map in mapPath.py

To view the coordinates of line segments and annotations in a table, you need to run:

pip install napari-properties-viewer

Once napari is running, you can view the properties by opening the properties viewer plugin from
Plugins menu -> Add dock widget -> napari-propertiews-viewer: properties table

It can take a minute or so after napari has started for the Plugins menu to be clickable.

"""

Expand All @@ -16,6 +25,7 @@
import pymapmanager

mapPath = '/media/cudmore/data/richard/rr30a/rr30a.txt'
# mapPath = '/Users/vasudhajha/Documents/mapmanager/PyMapManager-Data/rr30a.txt'

def run():
# load a mmMap
Expand Down Expand Up @@ -64,7 +74,7 @@ def run():
#
# create a points layer with our spineROI point annotations
size = 2 # the size of the point displayed in napari
points_layer = viewer.add_points(points, size=size, face_color='r')
points_layer = viewer.add_points(points, size=size, face_color='r', properties={"x": x, "y": y, "z": z})

#
# load line/segment tracings from a mmStack
Expand All @@ -81,7 +91,7 @@ def run():
#
# create a points layer with our line segments
size = 2
line_points_layer = viewer.add_points(linePoints, size=size, face_color='c')
line_points_layer = viewer.add_points(linePoints, size=size, face_color='c', properties={"x": xLine.tolist(), "y": yLine.tolist(), "z": zLine.tolist()})

#
# typical of any kind of GUI interface, we need to enter into a loop so the viewer stays up
Expand Down