Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2828f48
start vector fields
kushalkolar Oct 21, 2025
c439fd9
basics of vector field works
kushalkolar Oct 21, 2025
d10d08f
add vector field to api docs
kushalkolar Oct 21, 2025
6858fd6
update event tables
kushalkolar Oct 21, 2025
178ce12
add vector field to subsection_order
kushalkolar Oct 21, 2025
c336b16
update vector field, almost there
kushalkolar Oct 28, 2025
f205473
vector field done and working
kushalkolar Oct 28, 2025
0b98075
cleanup
kushalkolar Oct 28, 2025
f51a17b
update docstring
kushalkolar Oct 28, 2025
7df8a9f
update
kushalkolar Oct 30, 2025
868ede4
Merge branch 'main' into vector-field
kushalkolar Oct 30, 2025
bec43aa
black
kushalkolar Oct 30, 2025
6b54967
black
kushalkolar Oct 30, 2025
d5792bf
update
kushalkolar Oct 30, 2025
3820bfc
update .gitignore
kushalkolar Oct 30, 2025
085b3cb
Merge branch 'main' into vector-field
kushalkolar Oct 30, 2025
7c56b8c
restore stuff in .gitignore
kushalkolar Oct 30, 2025
049f3c5
test examples
kushalkolar Oct 30, 2025
1f29bca
update min pygfx version
kushalkolar Oct 30, 2025
1e8e640
ome zarr being annoying
kushalkolar Oct 30, 2025
82ee16a
remove multi-channel from screenshot tests, only show code in nb
kushalkolar Oct 30, 2025
8e269e0
don't run multi channel example
kushalkolar Oct 30, 2025
bf34866
rename to VectorsGraphic since we will use field for something else
kushalkolar Nov 2, 2025
b1f23bc
interactive electric field example
kushalkolar Nov 2, 2025
3f43786
update name
kushalkolar Nov 2, 2025
1d6ea48
black
kushalkolar Nov 2, 2025
8769dce
update name
kushalkolar Nov 2, 2025
33e8fae
wrong sign, now correct
kushalkolar Nov 2, 2025
b801e7f
update api docs
kushalkolar Nov 2, 2025
da752af
Apply suggestion from @clewis7
kushalkolar Nov 3, 2025
cfecfa3
fix render order and blending, add comment
kushalkolar Nov 3, 2025
675ec0b
rename
kushalkolar Nov 3, 2025
7b82f97
docstrings, comments
kushalkolar Nov 3, 2025
6ea00e6
checks
kushalkolar Nov 3, 2025
e33f8f7
clarify example
kushalkolar Nov 3, 2025
e5d0488
cleanup
kushalkolar Nov 3, 2025
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/source/sg_execution_times.rst

# PyBuilder
target/
Expand Down Expand Up @@ -134,5 +135,6 @@ dmypy.json
# vs code
.vscode/

# diffs from visual regression tests
examples/desktop/diffs/*.png
docs/source/_gallery/
35 changes: 35 additions & 0 deletions docs/source/api/graphic_features/VectorDirections.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. _api.VectorDirections:

VectorDirections
****************

================
VectorDirections
================
.. currentmodule:: fastplotlib.graphics.features

Constructor
~~~~~~~~~~~
.. autosummary::
:toctree: VectorDirections_api

VectorDirections

Properties
~~~~~~~~~~
.. autosummary::
:toctree: VectorDirections_api

VectorDirections.value

Methods
~~~~~~~
.. autosummary::
:toctree: VectorDirections_api

VectorDirections.add_event_handler
VectorDirections.block_events
VectorDirections.clear_event_handlers
VectorDirections.remove_event_handler
VectorDirections.set_value

35 changes: 35 additions & 0 deletions docs/source/api/graphic_features/VectorPositions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. _api.VectorPositions:

VectorPositions
***************

===============
VectorPositions
===============
.. currentmodule:: fastplotlib.graphics.features

Constructor
~~~~~~~~~~~
.. autosummary::
:toctree: VectorPositions_api

VectorPositions

Properties
~~~~~~~~~~
.. autosummary::
:toctree: VectorPositions_api

VectorPositions.value

Methods
~~~~~~~
.. autosummary::
:toctree: VectorPositions_api

VectorPositions.add_event_handler
VectorPositions.block_events
VectorPositions.clear_event_handlers
VectorPositions.remove_event_handler
VectorPositions.set_value

2 changes: 2 additions & 0 deletions docs/source/api/graphic_features/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Graphic Features
VolumeIsoEmissive
VolumeIsoShininess
VolumeSlicePlane
VectorPositions
VectorDirections
TextData
FontSize
TextFaceColor
Expand Down
49 changes: 49 additions & 0 deletions docs/source/api/graphics/VectorsGraphic.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.. _api.VectorsGraphic:

VectorsGraphic
**************

==============
VectorsGraphic
==============
.. currentmodule:: fastplotlib

Constructor
~~~~~~~~~~~
.. autosummary::
:toctree: VectorsGraphic_api

VectorsGraphic

Properties
~~~~~~~~~~
.. autosummary::
:toctree: VectorsGraphic_api

VectorsGraphic.alpha
VectorsGraphic.alpha_mode
VectorsGraphic.axes
VectorsGraphic.block_events
VectorsGraphic.deleted
VectorsGraphic.directions
VectorsGraphic.event_handlers
VectorsGraphic.name
VectorsGraphic.offset
VectorsGraphic.positions
VectorsGraphic.right_click_menu
VectorsGraphic.rotation
VectorsGraphic.supported_events
VectorsGraphic.visible
VectorsGraphic.world_object

Methods
~~~~~~~
.. autosummary::
:toctree: VectorsGraphic_api

VectorsGraphic.add_axes
VectorsGraphic.add_event_handler
VectorsGraphic.clear_event_handlers
VectorsGraphic.remove_event_handler
VectorsGraphic.rotate

1 change: 1 addition & 0 deletions docs/source/api/graphics/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Graphics
ScatterGraphic
ImageGraphic
ImageVolumeGraphic
VectorsGraphic
TextGraphic
LineCollection
LineStack
1 change: 1 addition & 0 deletions docs/source/api/layouts/subplot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Methods
Subplot.add_line_stack
Subplot.add_scatter
Subplot.add_text
Subplot.add_vectors
Subplot.auto_scale
Subplot.center_graphic
Subplot.center_scene
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"../../examples/line",
"../../examples/line_collection",
"../../examples/scatter",
"../../examples/vectors",
"../../examples/text",
"../../examples/events",
"../../examples/selection_tools",
Expand Down
102 changes: 102 additions & 0 deletions docs/source/user_guide/event_tables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,108 @@ deleted
| value | bool | True when graphic was deleted |
+----------+------+-------------------------------+

VectorsGraphic
--------------

positions
^^^^^^^^^

**event info dict**

+----------+------------+----------------------+
| dict key | type | description |
+==========+============+======================+
| value | np.ndarray | new vector positions |
+----------+------------+----------------------+

directions
^^^^^^^^^^

**event info dict**

+----------+------------+-----------------------+
| dict key | type | description |
+==========+============+=======================+
| value | np.ndarray | new vector directions |
+----------+------------+-----------------------+

name
^^^^

**event info dict**

+----------+------+--------------------+
| dict key | type | description |
+==========+======+====================+
| value | str | user provided name |
+----------+------+--------------------+

offset
^^^^^^

**event info dict**

+----------+---------------------------------+----------------------+
| dict key | type | description |
+==========+=================================+======================+
| value | np.ndarray[float, float, float] | new offset (x, y, z) |
+----------+---------------------------------+----------------------+

rotation
^^^^^^^^

**event info dict**

+----------+----------------------------------------+-------------------------+
| dict key | type | description |
+==========+========================================+=========================+
| value | np.ndarray[float, float, float, float] | new rotation quaternion |
+----------+----------------------------------------+-------------------------+

alpha
^^^^^

**event info dict**

+----------+-------+-----------------+
| dict key | type | description |
+==========+=======+=================+
| value | float | new alpha value |
+----------+-------+-----------------+

alpha_mode
^^^^^^^^^^

**event info dict**

+----------+------+----------------+
| dict key | type | description |
+==========+======+================+
| value | str | new alpha mode |
+----------+------+----------------+

visible
^^^^^^^

**event info dict**

+----------+------+---------------------+
| dict key | type | description |
+==========+======+=====================+
| value | bool | new visibility bool |
+----------+------+---------------------+

deleted
^^^^^^^

**event info dict**

+----------+------+-------------------------------+
| dict key | type | description |
+==========+======+===============================+
| value | bool | True when graphic was deleted |
+----------+------+-------------------------------+

TextGraphic
-----------

Expand Down
11 changes: 5 additions & 6 deletions examples/image_volume/image_volume_multi_channel.py
Comment thread
kushalkolar marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
Example with multi-channel volume images. Use alpha_mode "add" for additive blending.
"""

# test_example = true
# sphinx_gallery_pygfx_docs = 'screenshot'
# test_example = false
# run_example = false
# sphinx_gallery_pygfx_docs = 'code'

import fastplotlib as fpl
from ome_zarr.io import parse_url
Expand All @@ -18,10 +19,8 @@

# read the image data
reader = Reader(parse_url(url))
# nodes may include images, labels etc
nodes = list(reader())
# first node will be the image pixel data
image_node = nodes[0]
# first node is image data
image_node = next(reader())

dask_data = image_node.data

Expand Down
3 changes: 0 additions & 3 deletions examples/screenshots/image_volume_multi_channel.png

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions examples/tests/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"scatter/*.py",
"line/*.py",
"line_collection/*.py",
"vectors/*.py"
"gridplot/*.py",
"window_layouts/*.py",
"events/*.py",
Expand Down
2 changes: 2 additions & 0 deletions examples/vectors/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Vector Examples
===============
Loading