Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Sep 27, 2024
1 parent 9de2a9c commit 5ee2123
Show file tree
Hide file tree
Showing 174 changed files with 703 additions and 704 deletions.
Binary file modified dev/_downloads/00e7696e0c5e504a25d80ad4f12395c4/set_theme.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/1da6595d849ac041f5c975e57f743bdd/add_image.zip
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/1dfac501616088d72425dec7711622c0/swap_dims.zip
Binary file not shown.
Binary file modified dev/_downloads/1e274fb9b67e15af5487fcafc71b4340/add_3D_image.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/3b252b54c600f14b324cb87b16587e6c/tracks_2d.zip
Binary file not shown.
Binary file modified dev/_downloads/3bebfb4bc3aee139ca3296606b6f6d0e/layers.zip
Binary file not shown.
Binary file modified dev/_downloads/3d5a3198b85f4e6fae5437ed1c4fa2f8/cursor_ray.zip
Binary file not shown.
Binary file modified dev/_downloads/42b41304b313e0d10a4d9e44735cc32b/labels3d.zip
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/43eff8c243d1d9c4529eb0b685742b3b/image_depth.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/55239c1dbb11ca8c15cb695037108f68/nD_vectors.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/62a47e5370a74b2df2ef0779e96b4323/add_labels.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/79b42e22517b178b9c5bcefff29fc821/nD_shapes.zip
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/88049abf11e4f38bc8c8df576b282427/nD_labels.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/a087cb1d37a527025580995ced54e4c2/magic_viewer.zip
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/a555a2e2ef6be1611cca7f2aa3da553a/point_cloud.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/ae1a69ef712161f215b8822accfc0896/labels-2d.zip
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/b1c749b5e8302f3c9aaf957580b9514d/vortex.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/bfc3c15bc1b0285ab26e2a618ded23e0/add_points.zip
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/c3f1b7629c47c11fa4a2f3185c327b76/add_shapes.zip
Binary file not shown.
Binary file modified dev/_downloads/c5beb79acf9c20c90d7159a3b37972b9/nD_image.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/d2855484663eb4df7dca67e3aa6b9e39/paint-nd.zip
Binary file not shown.
Binary file modified dev/_downloads/d5daff7ed42d12abe3c7e591aeee473c/scale_bar.zip
Binary file not shown.
Binary file modified dev/_downloads/d7afa369f20824da15dfb0f7dbb38dc2/annotate-2d.zip
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/de537851ff14d25bcc013356255f986a/tracks_3d.zip
Binary file not shown.
Binary file modified dev/_downloads/df5beb5db4391713dce0764a3fa9b295/nD_surface.zip
Binary file not shown.
Binary file modified dev/_downloads/e048db026d884800dec78ff6c5c513c1/new_theme.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/e8e39cf1fd938bae4551b07221e41f9d/nD_points.zip
Binary file not shown.
Binary file modified dev/_downloads/edc80295dc32a55e42827195cc2cd57d/3D_paths.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/fbf230a2e8ba587c45d1d350b29a4c11/add_vectors.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified dev/_images/sphx_glr_3D_paths_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_3D_paths_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_3Dimage_plane_rendering_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_3Dimage_plane_rendering_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add-points-3d_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add-points-3d_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add_3D_image_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add_3D_image_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add_grayscale_image_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add_grayscale_image_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add_points_on_nD_shapes_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add_points_on_nD_shapes_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add_vectors_image_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_add_vectors_image_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_affine_transforms_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_affine_transforms_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_custom_key_bindings_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_custom_key_bindings_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_custom_mouse_functions_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_custom_mouse_functions_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_dask_nD_image_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_dask_nD_image_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_dynamic-projections-dask_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev/_images/sphx_glr_dynamic-projections-dask_002.png
Binary file modified dev/_images/sphx_glr_dynamic-projections-dask_thumb.png
Binary file modified dev/_images/sphx_glr_export_figure_001.png
Binary file modified dev/_images/sphx_glr_export_figure_thumb.png
Binary file modified dev/_images/sphx_glr_layers_001.png
Binary file modified dev/_images/sphx_glr_layers_thumb.png
Binary file modified dev/_images/sphx_glr_mixed-dimensions-labels_001.png
Binary file modified dev/_images/sphx_glr_mixed-dimensions-labels_thumb.png
Binary file modified dev/_images/sphx_glr_mouse_drag_callback_001.png
Binary file modified dev/_images/sphx_glr_mouse_drag_callback_thumb.png
Binary file modified dev/_images/sphx_glr_nD_image_001.png
Binary file modified dev/_images/sphx_glr_nD_image_thumb.png
Binary file modified dev/_images/sphx_glr_nD_labels_001.png
Binary file modified dev/_images/sphx_glr_nD_labels_thumb.png
Binary file modified dev/_images/sphx_glr_nD_points_001.png
Binary file modified dev/_images/sphx_glr_nD_points_thumb.png
Binary file modified dev/_images/sphx_glr_nD_points_with_features_001.png
Binary file modified dev/_images/sphx_glr_nD_points_with_features_thumb.png
Binary file modified dev/_images/sphx_glr_nD_shapes_001.png
Binary file modified dev/_images/sphx_glr_nD_shapes_thumb.png
Binary file modified dev/_images/sphx_glr_nD_shapes_with_text_001.png
Binary file modified dev/_images/sphx_glr_nD_shapes_with_text_thumb.png
Binary file modified dev/_images/sphx_glr_nD_vectors_001.png
Binary file modified dev/_images/sphx_glr_nD_vectors_thumb.png
Binary file modified dev/_images/sphx_glr_paint-nd_001.png
Binary file modified dev/_images/sphx_glr_paint-nd_thumb.png
Binary file modified dev/_images/sphx_glr_points-over-time_001.png
Binary file modified dev/_images/sphx_glr_points-over-time_thumb.png
Binary file modified dev/_images/sphx_glr_spherical_points_001.png
Binary file modified dev/_images/sphx_glr_spherical_points_thumb.png
Binary file modified dev/_images/sphx_glr_swap_dims_001.png
Binary file modified dev/_images/sphx_glr_swap_dims_thumb.png
Binary file modified dev/_images/sphx_glr_to_screenshot_001.png
Binary file modified dev/_images/sphx_glr_to_screenshot_thumb.png
Binary file modified dev/_images/sphx_glr_without_gui_qt_001.png
Binary file modified dev/_images/sphx_glr_without_gui_qt_thumb.png
20 changes: 10 additions & 10 deletions dev/_sources/developers/architecture/app_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The {class}`~napari._app_model._app.NapariApplication` (`app`)
is the top level object that stores information about the commands, keybindings
and menus that make up the application.
It is a subclass of {class}`app_model.Application` and is a global application
singleton. It can be retrieved with `napari._app_model.get_app`.
singleton. It can be retrieved with `napari._app_model.get_app_model`.

Currently, the primary purpose of the `app` is to compose the following
{mod}`app_model.registries` into a single name-spaced object:
Expand Down Expand Up @@ -106,10 +106,10 @@ The code below shows how to register the `action` defined above with the napari
singleton `app`:

```python
from napari._app_model import get_app
from napari._app_model import get_app_model


get_app().register_action(action)
get_app_model().register_action(action)
```

````{note}
Expand Down Expand Up @@ -395,7 +395,7 @@ current viewer, if one present (returning `None` if not). It is
registered in the `app.injection_store` via `app.injection_store.register_provider`. Processors can be registered in the same way.

```python
from napari._app_model import get_app
from napari._app_model import get_app_model

# return annotation indicates what this provider provides
def provide_points() -> Optional['Points']:
Expand All @@ -409,7 +409,7 @@ def provide_points() -> Optional['Points']:
None
)

get_app().injection_store.register_provider(provide_points)
get_app_model().injection_store.register_provider(provide_points)
```

This allows both internal and external functions to be injected with these
Expand All @@ -418,7 +418,7 @@ This is particularly important in a GUI context, where a user can't always be
providing arguments:

```python
>>> injected_func = get_app().injection_store.inject(process_points)
>>> injected_func = get_app_model().injection_store.inject(process_points)
```

Note: injection doesn't *inherently* mean that it's always safe to call an
Expand Down Expand Up @@ -502,11 +502,11 @@ On `napari` start up, `app-model` initialization occurs in the following order:
1. Initialize {class}`~napari.viewer.Viewer`, which calls
`napari.plugins._initialize_plugins`, which registers discovered plugins
and all their actions (non-Qt first, followed immedidately by Qt actions).
This also results in the first call to `napari._app_model.get_app`.
This also results in the first call to `napari._app_model.get_app_model`.

i. Instantiation of the `app-model` app results in registration of all non-GUI
internal `napari` actions (and associated submenus). Note that the
`napari._app_model.get_app` call creates the `app` only when *first*
`napari._app_model.get_app_model` call creates the `app` only when *first*
called. It simply returns the existing app on all subsequent calls.

2. {class}`~napari._qt.qt_main_window.Window` instantiation, followed by
Expand All @@ -532,8 +532,8 @@ singleton `app` may keep a reference to an object, e.g., a
since been cleaned up at the end of a previous test.
Thus, we mock the `app` in a `_mock_app` fixture, and
explicitly use it in {ref}`make_napari_viewer` as well as in all tests that
use the `get_app` function. This way, a new instance of `app` is returned
every time `napari._app_model.get_app`
use the `get_app_model` function. This way, a new instance of `app` is returned
every time `napari._app_model.get_app_model`
is used inside a test. This 'test' `app` is available for use throughout the test's
duration and will get cleaned up at the end.

Expand Down
6 changes: 3 additions & 3 deletions dev/_sources/gallery/action_manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ Action manager
application, not part of the napari viewer model. If your use case
requires access to qt_viewer, please open an issue to discuss.
layer_buttons = viewer.window.qt_viewer.layerButtons
calling <function register_action at 0x7f01ff51c790>
calling <function bind_button at 0x7f01ff51c5e0>
calling <function bind_shortcut at 0x7f01ff51c670>
calling <function bind_shortcut at 0x7fcce08051b0>
calling <function register_action at 0x7fcce08052d0>
calling <function bind_button at 0x7fcce0805120>
Expand Down
Loading

0 comments on commit 5ee2123

Please sign in to comment.