How to position points with the point manipulator
Summary
Precisely positioning a point in 3D is a useful way to annotate specific positions or choose the location of an object in a scene. This article explains how to use the napari-threedee
point manipulator plugin to position points in 3D.
Instructions
-
To run this example, first download the script from the Examples Gallery page; the download 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/points_manipulator_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 points_manipulator_plugin.py
-
The viewer will open in 3D rendering mode with a Points layer and 3 points and the widget already visible. The widget can be otherwise accessed from the Plugins menu: Plugins -> napari-threedee -> point manipulator. Click the "activate" button to start the plugin.
-
Set the Points layer to "Selection" mode by clicking the "Selection" button in the layer controls.
-
Select a point by clicking on it. The point manipulator will appear on the selected point. Note that depending on your versions of
napari-threedee
andnapari
you may see subtle visual differences between your viewer and the screenshots/videos here. -
You can now move the point around by clicking and dragging the manipulator.
If you want to rotate the view while a point manipulator is active, press and hold the space bar to toggle panning while clicking and dragging in the canvas to rotate the view.