Annotate points on an arbitrary plane
Summary
Annotating points in 3D can be useful for picking particles in CryoET and annotating locations of landmarks. However, doing so on a 2D computer screen is challenging. Here we demonstrate how to use the point annotator, which annotates points on arbitrary slicing planes.
Instructions
-
To run this example, first download the script from the Examples Gallery page; the link is at the bottom of the web page. Save the file to a memorable location. Or, if you've cloned this repository, the script can be found at
napari-threedee/docs/examples/plugin/point_annotator_plugin.py
. -
Ensure you have activated a virtual environment with napari-threedee installed. Change directories to the script location and then execute the script using:
python point_annotator_plugin.py
-
The viewer is initialized in 3D rendering mode in plane rendering mode. We are viewing two 3D volumes, each with one plane being actively rendered. Note that depending on your versions of
napari-threedee
andnapari
you may see subtle visual differences between your viewer and the screenshots/videos here. -
Activate the plugin. Select the
orange plane
layer for the "image layer" andPoints
for the "points layer". Finally click the "activate" button. This will add points to thePoints
layer based on the intersection of the click ray with the currently renderedorange plane
layer. -
You can translate the
orange plane
layer render plane along its normal vector by holding the shift key while clicking with the left mouse button and dragging the plane. Alternately, you can re-position the render plane using the render plane manipulator. -
You can add points on the
orange plane
layer rendered plane, at the location of your mouse cursor, by pressing thea
key or by holding the Alt key while clicking with the left mouse button. Note you must ensure that theorange plane
layer is selected, the points will be automatically placed in thePoints
layer. You can move the plane to annotate a new plane by clicking and dragging with the shift key held down as in step 5.