Skip to content

Commit

Permalink
feat!: Rename AnyNiivue to Niivue (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
kolibril13 authored May 30, 2024
1 parent dfea903 commit 69f1a57
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ pip install ipyniivue
In a Jupyter environment:

```py
from ipyniivue import AnyNiivue
from ipyniivue import NiiVue

nv = AnyNiivue()
nv = NiiVue()
nv.load_volumes([{"path": "images/mni152.nii.gz"}])
nv
```
Expand Down
6 changes: 3 additions & 3 deletions demo/additive_voxels.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"metadata": {},
"outputs": [],
"source": [
"from ipyniivue import AnyNiivue, SliceType\n",
"from ipyniivue import NiiVue, SliceType\n",
"# based on https://niivue.github.io/niivue/features/additive.voxels.html\n",
"\n",
"volumes = [\n",
Expand All @@ -36,7 +36,7 @@
" \"cal_max\": 4,\n",
" },\n",
"]\n",
"nv = AnyNiivue(\n",
"nv = NiiVue(\n",
" back_color=(1, 1, 1, 1),\n",
" show_3D_crosshair=True,\n",
" is_colorbar=True,\n",
Expand Down Expand Up @@ -78,7 +78,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.12.3"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
6 changes: 3 additions & 3 deletions demo/basic_multiplanar.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"metadata": {},
"outputs": [],
"source": [
"from ipyniivue import AnyNiivue, SliceType\n",
"from ipyniivue import NiiVue, SliceType\n",
"# based on https://niivue.github.io/niivue/features/basic.multiplanar.html\n",
"\n",
"volumes = [\n",
" { \"path\": \"../images/mni152.nii.gz\", \"colormap\": \"gray\", \"visible\": True, \"opacity\": 1.0 },\n",
" { \"path\": \"../images/hippo.nii.gz\", \"colormap\": \"red\", \"visible\": True, \"opacity\": 1 },\n",
"\n",
"]\n",
"nv = AnyNiivue(slice_type=SliceType.MULTIPLANAR)\n",
"nv = NiiVue(slice_type=SliceType.MULTIPLANAR)\n",
"nv.load_volumes(volumes)\n",
"nv"
]
Expand Down Expand Up @@ -71,7 +71,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.12.3"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
2 changes: 1 addition & 1 deletion src/ipyniivue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
import importlib.metadata

from ._constants import DragMode, MuliplanarType, SliceType # noqa: F401
from ._widget import AnyNiivue # noqa: F401
from ._widget import NiiVue # noqa: F401

__version__ = importlib.metadata.version("ipyniivue")
4 changes: 2 additions & 2 deletions src/ipyniivue/_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ._options_mixin import OptionsMixin
from ._utils import file_serializer, serialize_options, snake_to_camel

__all__ = ["AnyNiivue"]
__all__ = ["NiiVue"]


class Volume(ipywidgets.Widget):
Expand All @@ -22,7 +22,7 @@ class Volume(ipywidgets.Widget):
cal_max = t.Float(None, allow_none=True).tag(sync=True)


class AnyNiivue(OptionsMixin, anywidget.AnyWidget):
class NiiVue(OptionsMixin, anywidget.AnyWidget):
"""Represents a Niivue instance."""

_esm = pathlib.Path(__file__).parent / "static" / "widget.js"
Expand Down

0 comments on commit 69f1a57

Please sign in to comment.