Skip to content

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

  1. 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.

  2. 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
    
  3. 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 and napari you may see subtle visual differences between your viewer and the screenshots/videos here.

    example opened

  4. Activate the plugin. Select the orange plane layer for the "image layer" and Points for the "points layer". Finally click the "activate" button. This will add points to the Points layer based on the intersection of the click ray with the currently rendered orange plane layer.

    select layer

  5. 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.

  6. You can add points on the orange plane layer rendered plane, at the location of your mouse cursor, by pressing the a key or by holding the Alt key while clicking with the left mouse button. Note you must ensure that the orange plane layer is selected, the points will be automatically placed in the Points 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.