From e3022f74f1abb8f23a88da863199be60781eb1f6 Mon Sep 17 00:00:00 2001 From: christian-oreilly Date: Fri, 18 Aug 2023 19:50:09 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20documentation=20from=20@=20nii?= =?UTF-8?q?vue/ipyniivue@7a0027c75afb87e58df6483e038479a4488cbb4f=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _modules/index.html | 448 ++++ _modules/ipyniivue/niivue.html | 1971 +++++++++++++++++ .../development-notes/py-ts-messaging.rst.txt | 2 +- _static/basic.css | 22 + _static/documentation_options.js | 3 +- _static/searchtools.js | 26 +- _static/sphinx_highlight.js | 16 +- api.html | 1325 ++++++++++- develop-install.html | 14 +- development-notes.html | 14 +- development-notes/attribute-docstrings.html | 14 +- development-notes/cell-syncing.html | 14 +- development-notes/py-ts-messaging.html | 26 +- examples/index.html | 14 +- examples/introduction.html | 50 +- examples/introduction.ipynb | 356 ++- genindex.html | 355 ++- index.html | 23 +- installing.html | 14 +- introduction.html | 14 +- objects.inv | Bin 925 -> 3285 bytes search.html | 12 +- searchindex.js | 2 +- 23 files changed, 4420 insertions(+), 315 deletions(-) create mode 100644 _modules/index.html create mode 100644 _modules/ipyniivue/niivue.html diff --git a/_modules/index.html b/_modules/index.html new file mode 100644 index 0000000..059d940 --- /dev/null +++ b/_modules/index.html @@ -0,0 +1,448 @@ + + + + + + + + + + Overview: module code — ipyniivue 1.1.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + + + + + +
+ +
+ +
+
+
+ +
+ +
+ +
+ + + + +
+
+ +
+ +
+
+
+ + + + + + + + \ No newline at end of file diff --git a/_modules/ipyniivue/niivue.html b/_modules/ipyniivue/niivue.html new file mode 100644 index 0000000..2ce70dd --- /dev/null +++ b/_modules/ipyniivue/niivue.html @@ -0,0 +1,1971 @@ + + + + + + + + + + ipyniivue.niivue — ipyniivue 1.1.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ +
+ +
+ + + + +
+ +
+ + +
+
+ + + + + +
+ +

Source code for ipyniivue.niivue

+#!/usr/bin/env python
+# coding: utf-8
+
+# Copyright (c) Niivue.
+# Distributed under the terms of the Modified BSD License.
+
+# Much of the structure and many of the functions/classes in this file
+# are from https://github.com/martinRenou/ipycanvas. The Niivue class is based
+# off of Canvas class.
+
+# Standard library
+import json
+import math
+import pathlib
+import random
+import string
+import time
+import os
+from urllib.parse import urlparse
+from urllib.request import url2pathname
+
+# Third-party libraries
+from ipywidgets import DOMWidget
+from jupyter_ui_poll import ui_events
+from traitlets import (
+    Unicode,
+    CInt,
+    CFloat,
+    Dict,
+    List,
+    Bool,
+    UseEnum,
+    CaselessStrEnum,
+)
+
+# Local imports
+from .traits import (
+    DragModes,
+    SliceType,
+    keycodes,
+)
+from ._frontend import module_name, module_version
+from .nvimage import NVImage
+from .nvmesh import NVMesh
+
+class _CanvasBase(DOMWidget):
+    '''
+    Canvas
+
+    Parameters:
+    -----------
+    height: int
+        The height (in pixels) of the canvas
+    width: int
+        The width (in pixels) of the canvas
+    '''
+    _model_module = Unicode(module_name).tag(sync=True)
+    _model_module_version = Unicode(module_version).tag(sync=True)
+    _view_module = Unicode(module_name).tag(sync=True)
+    _view_module_version = Unicode(module_version).tag(sync=True)
+
+    height = CInt(480).tag(sync=True)
+    width = CInt(640).tag(sync=True)
+
+
+
+[docs] +class Niivue(_CanvasBase): + ''' + Niivue class. + + Parameters: + ----------- + text_height: float + the text height for orientation labels (0 to 1). Zero for no text + labels. Default is 0.06. + colorbar_height: float + size of colorbar. 0 for no colorbars, fraction of Nifti j dimension. + Default is 0.05. + colorbar_margin: float + padding around colorbar when displayed. Default is 0.05. + crosshair_width: float + crosshair size. Zero for no crosshair. Default is 1. + ruler_width: float + ruler size. 0 for no ruler. Default is 4. + back_color: list + the background color. RGBA values from 0 to 1. Default is + black ([0,0,0,1]). + crosshair_color: list + the crosshair color. RGBA values from 0 to 1. Default is + red ([1,0,0,1]). + selection_box_color: list + the selection box color when the intensty selection box is shown + (right click and drag). RGBA values from 0 to 1. Default is + transparent white ([1,1,1,0.5]). + clip_plane_color: list + the color of the visible clip plane. RGBA values from 0 to 1. + Default is white ([1,1,1,0.5]). + ruler_color: list + the color of the ruler. RGBA values from 0 to 1. Default is + translucent red ([1, 0, 0, 0.8]). + show_3D_crosshair: bool + True/False whether crosshairs are shown on 3D rendering. + Default is False. + trust_cal_min_max: bool + True/False whether to trust the nifti header values for + cal_min and cal_max. Trusting them results in faster loading + because we skip computing these values from the data. + Default is True. + clip_plane_hot_key: str + the keyboard key used to cycle through clip plane orientations. + Default is "KeyC". + view_mode_hot_key: str + the keyboard key used to cycle through view modes. Default is "KeyV". + key_debounce_time: float + the keyUp debounce time in milliseconds You must wait this long before + a new hot-key keystroke will be registered by the event listener. + The default is 50 ms. + double_touch_timeout: float + the maximum time in milliseconds for a double touch to be detected. + The default is 500 ms. + long_touch_timeout: float + the minimum time in milliseconds for a touch to count as long touch. + The default is 1000 ms. + is_radiological_convention: bool + whether or not to use radiological convention in the display. + Default is False. + loading_text: str + the loading text to display when there is a blank canvas and no images. + Default is "waiting on images...". + drag_and_drop_enabled: bool + whether or not to allow file and url drag and drop on the canvas. + Default is True. + is_nearest_interpolation: bool + whether nearest neighbor interpolation is used, else linear + interpolation. Default is False. + is_atlas_outline: bool + whether atlas maps are only visible at the boundary of regions. + Default is False. + is_ruler: bool + whether a 10cm ruler is displayed. Default is False. + is_colorbar: bool + whether colorbar(s) are shown illustrating values for color maps. + Default is False. + is_orient_cube: bool + whether orientation cube is shown for 3D renderings. Default is False. + multiplanar_pad_pixels: int + spacing between tiles of a multiplanar view. Default is 0. + mesh_thickness_on_2D: float + 2D slice views can show meshes within this range. Meshes only visible + in sliceMM (world space) mode. Default is Infinity. + drag_mode(str/int): + behavior for dragging. string ("none", "contrast", + "measurement", "pan", "slicer_3D") or integer (0, 1, 2, 3, 4). + Default is "contrast" or 1. + is_depth_pick_mesh: bool + when both voxel-based image and mesh is loaded, will depth picking be + able to detect mesh or only voxels. Default is False. + is_corner_orientation_text: bool + should slice text be shown in the upper right corner instead of the + center of left and top axes?. Default is False. + sagittal_nose_left: bool + should 2D sagittal slices show the anterior direction toward the + left?. Default is False. + is_slice_MM: bool + are images aligned to voxel space (False) or world space (True). + Default is False. + is_high_resolution_capable: bool + demand that high-dot-per-inch displays use native voxel size. + Default is True. + drawing_enabled: bool + allow user to create and edit voxel-based drawings. + Default is False. + pen_value: float + if drawing_enabled, color of drawing when user drags mouse. + Default is Infinity. + is_filled_pen: bool + if drawing_enabled, create filled drawings when user drags mouse. + Default is False. + max_draw_undo_bitmaps: int + if drawing_enabled, number of possible undo steps. Default is 8. + thumbnail: str + optional 2D png bitmap that can be rapidly loaded to defer slow + loading of 3D image. Default is "". + ''' + _model_name = Unicode('NiivueModel').tag(sync=True) + _model_module = Unicode(module_name).tag(sync=True) + _model_module_version = Unicode(module_version).tag(sync=True) + _view_name = Unicode('NiivueView').tag(sync=True) + _view_module = Unicode(module_name).tag(sync=True) + _view_module_version = Unicode(module_version).tag(sync=True) + + _custom_code_results = {} + + # NiivueOptions + text_height = CFloat(default_value=0.06, + help="the text height for orientation labels (0 to 1)" + ". Zero for no text labels" + ).tag(sync=True) + colorbar_height = CFloat(default_value=0.05, + help="size of colorbar. 0 for no colorbars, " + "fraction of Nifti j dimension" + ).tag(sync=True) + colorbar_margin = CFloat(default_value=0.05, + help="padding around colorbar when displayed" + ).tag(sync=True) + crosshair_width = CFloat(default_value=1, + help="crosshair size. Zero for no crosshair" + ).tag(sync=True) + ruler_width = CFloat(default_value=4, + help="ruler size. 0 for no ruler" + ).tag(sync=True) + back_color = List(trait=CFloat(), default_value=(0, 0, 0, 1), + help="the background color. RGBA values from 0 to 1." + " Default is black" + ).tag(sync=True, min_len=4, max_len=4) + crosshair_color = List(trait=CFloat(), default_value=(1, 0, 0, 1), + help="the crosshair color. RGBA values from 0 to 1." + " Default is red" + ).tag(sync=True, min_len=4, max_len=4) + font_color = List(trait=CFloat(), default_value=(0.5, 0.5, 0.5, 1), + help="the font color. RGBA values from 0 to 1. Default " + "is gray" + ).tag(sync=True, min_len=4, max_len=4) + selection_box_color = List(trait=CFloat(), default_value=(1, 1, 1, 0.5), + help="the selection box color when the intensty" + " selection box is shown (right click and " + "drag). RGBA values from 0 to 1. Default " + "is transparent white" + ).tag(sync=True, min_len=4, max_len=4) + clip_plane_color = List(trait=CFloat(), default_value=(1, 1, 1, 0.5), + help="the color of the visible clip plane. RGBA " + "values from 0 to 1. Default is white" + ).tag(sync=True, min_len=4, max_len=4) + ruler_color = List(trait=CFloat(), default_value=(1, 0, 0, 0.8), + help="the color of the ruler. RGBA values from 0 to 1. " + "Default is translucent red" + ).tag(sync=True, min_len=4, max_len=4) + show_3D_crosshair = Bool(default_value=False, + help="True/False whether crosshairs are shown on " + "3D rendering" + ).tag(sync=True) + trust_cal_min_max = Bool(default_value=True, + help="True/False whether to trust the nifti " + "header values for cal_min and cal_max. " + "Trusting them results in faster loading " + "because we skip computing these values " + "from the data" + ).tag(sync=True) + clip_plane_hot_key = CaselessStrEnum(keycodes, + default_value="KeyC", + help="the keyboard key used to cycle" + " through clip plane " + "orientations" + ).tag(sync=True) + view_mode_hot_key = CaselessStrEnum(keycodes, + default_value="KeyV", + help="the keyboard key used to cycle " + "through view modes" + ).tag(sync=True) + key_debounce_time = CFloat(default_value=50, + help="the keyUp debounce time in milliseconds. " + "The default is 50 ms. You must wait this " + "long before a new hot-key keystroke will " + "be registered by the event listener" + ).tag(sync=True) + double_touch_timeout = CFloat(default_value=500, + help="the maximum time in milliseconds for a" + " double touch to be detected. The " + "default is 500 ms" + ).tag(sync=True) + long_touch_timeout = CFloat(default_value=1000, + help="the minimum time in milliseconds for a " + "touch to count as long touch. The " + "default is 1000 ms" + ).tag(sync=True) + is_radiological_convention = Bool(default_value=False, + help="whether or not to use radiological" + " convention in the display" + ).tag(sync=True) + loading_text = Unicode(default_value="waiting on images...", + help="the loading text to display when there is a " + "blank canvas and no images" + ).tag(sync=True) + drag_and_drop_enabled = Bool(default_value=True, + help="whether or not to allow file and url " + "drag and drop on the canvas" + ).tag(sync=True) + is_nearest_interpolation = Bool(default_value=False, + help="whether nearest neighbor " + "interpolation is used, else linear" + " interpolation" + ).tag(sync=True) + is_atlas_outline = Bool(default_value=False, + help="whether atlas maps are only visible at the" + " boundary of regions" + ).tag(sync=True) + is_ruler = Bool(default_value=False, + help="whether a 10cm ruler is displayed" + ).tag(sync=True) + is_colorbar = Bool(default_value=False, + help="whether colorbar(s) are shown illustrating values" + " for color maps" + ).tag(sync=True) + is_orient_cube = Bool(default_value=False, + help="whether orientation cube is shown for 3D " + "renderings" + ).tag(sync=True) + multiplanar_pad_pixels = CInt(default_value=0, + help="spacing between tiles of a multiplanar" + " view" + ).tag(sync=True) + multiplanar_force_render = Bool(default_value=False, + help="always show rendering in multiplanar" + " view" + ).tag(sync=True) + mesh_thickness_on_2D = CFloat(default_value=1.7976931348623157e+308, + help="2D slice views can show meshes within " + "this range. Meshes only visible in " + "slice_MM (world space) mode" + ).tag(sync=True) + drag_mode = UseEnum(DragModes, default_value=DragModes.contrast, + help='behavior for dragging ("none", "contrast", ' + '"measurement", "pan", "slicer_3D")' + ).tag(sync=True) + is_depth_pick_mesh = Bool(default_value=False, + help="when both voxel-based image and mesh is " + "loaded, will depth picking be able to " + "detect mesh or only voxels" + ).tag(sync=True) + is_corner_orientation_text = Bool(default_value=False, + help="should slice text be shown in the" + " upper right corner instead of the" + " center of left and top axes?" + ).tag(sync=True) + sagittal_nose_left = Bool(default_value=False, + help="should 2D sagittal slices show the " + "anterior direction toward the left or" + " right?" + ).tag(sync=True) + is_slice_MM = Bool(default_value=False, + help="are images aligned to voxel space (False) or" + " world space (True)" + ).tag(sync=True) + is_high_resolution_capable = Bool(default_value=True, + help="demand that high-dot-per-inch " + "displays use native voxel size" + ).tag(sync=True) + drawing_enabled = Bool(default_value=False, + help="allow user to create and edit voxel-based" + " drawings" + ).tag(sync=True) + pen_value = CFloat(default_value=1.7976931348623157e+308, + help="color of drawing when user drags mouse " + "(if drawingEnabled)" + ).tag(sync=True) + is_filled_pen = Bool(default_value=False, + help="create filled drawings when user drags mouse " + "(if drawingEnabled)" + ).tag(sync=True) + max_draw_undo_bitmaps = CInt(default_value=8, + help="number of possible undo steps (if " + "drawingEnabled)" + ).tag(sync=True) + thumbnail = Unicode(default_value="", + help="optional 2D png bitmap that can be rapidly " + "loaded to defer slow loading of 3D image" + ).tag(sync=True) + + slice_type = SliceType + + def __init__(self, *args, **kwargs): + '''Create an Niivue widget.''' + super(Niivue, self).__init__(*args, **kwargs) + self.on_msg(self._handle_frontend_msg) + #todo: convert volumes and meshes into traitlets so that updates on the python side can be reflected on the ts side + self.volumes = [] + self.meshes = [] + + def __str__(self): + return f'Niivue {self._model_id}' + + def __repr__(self): + return f'ipyniivue.{super().__repr__()}' + + def __dir__(self): + default = super().__dir__() + return [d for d in default if d not in dir(DOMWidget)] + + def _handle_frontend_msg(self, _, content, buffers): + print('_handle_frontend_msg:', content, buffers) + event_data = content.get('event', [None]) + if event_data[0] == 'customCodeResult': + code_id = event_data[1] + chunks_left = event_data[2] + if code_id not in self._custom_code_results: + self._custom_code_results[code_id] = { + 'chunks_left': -1, # placeholder. Correct value added + # after data processed. + 'result': b'' + } + + res = self._custom_code_results[code_id] + if len(buffers) > 0: + res['result'] += buffers[0].tobytes() + + if chunks_left == 0: + if len(buffers) == 0 or res['result'] == b'undefined': + loaded = None + else: + loaded = json.loads(res['result']) + res['result'] = loaded + + res['chunks_left'] = chunks_left + elif event_data[0] == 'updateVolumes': + partial_dict = json.loads(event_data[1]) + volumes = [{**d, "dataBuffer": s.tobytes()} for d, s in zip(partial_dict, buffers)] + self.volumes = [NVImage(v) for v in volumes] + elif event_data[0] == 'updateMeshes': + self.meshes = [NVMesh(m) for m in json.loads(event_data[1])] + + def _send_custom(self, command, buffers=[]): + self.send(command, buffers=buffers) + +
+[docs] + def save_scene(self, filename=''): + ''' + Save the webgl2 canvas as png format bitmap. + + Parameters: + ----------- + filename: str + for screen capture. + ''' + self._send_custom(['saveScene', [filename]])
+ + +
+[docs] + def add_volume_from_url(self, url): + ''' + Add an image from a url + + Parameters: + ----------- + url: str + The url link of the volume. Local paths and file urls are not + accepted. + ''' + self._send_custom(['addVolumeFromUrl', [str(url)]])
+ + +
+[docs] + def remove_volume_by_url(self, url): + ''' + Remove volume by url. Local paths and file urls are not accepted. + + Parameters: + ----------- + url: str + Volume added by url to remove. + ''' + self._send_custom(['removeVolumeByUrl', [str(url)]])
+ + +
+[docs] + def set_text_orientation(self, is_at_corner): + ''' + Set text appearance at corner (True) or sides of 2D slice (False). + + Parameters: + ----------- + is_at_corner: bool + does the text show at the corner (True) or sides of + 2D slice (False). + ''' + self._send_custom(['setCornerOrientationText', [is_at_corner]])
+ + +
+[docs] + def set_radiological_convention(self, is_radiological_convention): + ''' + Control whether 2D slices use radiological or neurological convention. + + Parameters: + ----------- + is_radiological_convention: bool + use radiological convention. + ''' + self._send_custom(['setRadiologicalConvention', + [is_radiological_convention]])
+ + +
+[docs] + def set_mesh_thickness_on_2D(self, mesh_thickness_on_2D): + ''' + Limit visibility of mesh in front of a 2D image. + Requires world-space mode. + + Parameters: + ----------- + mesh_thickness_on_2D: float + distance from voxels for clipping mesh. Use float('inf') to show + entire mesh or 0.0 to hide mesh. + ''' + if math.isinf(mesh_thickness_on_2D): + mesh_thickness_on_2D = 1.7976931348623157e+308 + self._send_custom(['setMeshThicknessOn2D', [mesh_thickness_on_2D]])
+ + +
+[docs] + def set_slice_mosaic_string(self, description): + ''' + Create a custom multi-slice mosaic (aka lightbox, montage) view. + + Parameters: + ----------- + description: str + description of mosaic. An example would be "A 0 20 C 30 S 42". + ''' + self._send_custom(['setSliceMosaicString', [description]])
+ + +
+[docs] + def set_slice_mm(self, is_slice_mm): + ''' + determine view mode (world space or voxel space) + + Parameters: + ----------- + is_slice_mm: bool + Control whether 2D slices use world space (True) or voxel space + (False). Beware that voxel space mode limits properties like + panning, zooming and mesh visibility. + ''' + self._send_custom(['setSliceMM', [is_slice_mm]])
+ + +
+[docs] + def set_high_resolution_capable(self, is_high_resolution_capable): + ''' + Force WebGL canvas to use high resolution display, regardless of + browser defaults. + + Parameters: + ----------- + is_high_resolution_capable: bool + allow high-DPI display + ''' + self._send_custom(['setHighResolutionCapable', + [is_high_resolution_capable]])
+ + + """ + def add_mesh(self, mesh): + ''' + todo: Add a new mesh to the canvas. + + Parameters: + ----------- + mesh (todo) + ''' + self._send_custom(['addMesh', [mesh]]) + """ + +
+[docs] + def undo_draw(self): + ''' + Restore drawing to previous state + ''' + self._send_custom(['drawUndo', []])
+ + +
+[docs] + def load_drawing_from_url(self, url, is_binarize=False): + ''' + Open drawing + + Parameters: + ----------- + url: str + the url + is_binarize: bool + binarize the drawing. Defaults to False. + ''' + self._send_custom(['loadDrawingFromUrl', [str(url), is_binarize]])
+ + +
+[docs] + def draw_otsu(self, levels): + ''' + Remove dark voxels in air + + Parameters: + ----------- + levels: int + (2-4) segment brain into this many types + ''' + self._send_custom(['drawOtsu', [levels]])
+ + +
+[docs] + def remove_haze(self, level=5, vol_index=0): + ''' + Remove dark voxels in air + + Parameters: + ----------- + level: int + (1-5) larger values for more preserved voxels + vol_index: int + volume to dehaze + ''' + self._send_custom(['removeHaze', [level, vol_index]])
+ + +
+[docs] + def save_image(self, filename, is_save_drawing=False): + ''' + Save voxel-based image to disk + + Parameters: + ----------- + filename: str + filename of NIfTI image to create + is_save_drawing: bool + determines whether drawing or background image is saved + ''' + self._send_custom(['saveImage', [filename, is_save_drawing]])
+ + +
+[docs] + def set_mesh_property(self, mesh_id, key, value): + ''' + Change property of mesh, tractogram or connectome + + Parameters: + ----------- + mesh_id: int + identity of mesh to change + key: str + attribute to change + value: float + for attribute + ''' + self._send_custom(['setMeshProperty', [mesh_id, key, value]])
+ + +
+[docs] + def reverse_faces(self, mesh_id): + ''' + Reverse triangle winding of mesh (swap front and back faces) + + Parameters: + ----------- + mesh_id: int + identity of mesh to change + ''' + self._send_custom(['reverseFaces', [mesh_id]])
+ + +
+[docs] + def set_mesh_layer_property(self, mesh_id, layer, key, val): + ''' + Reverse triangle winding of mesh (swap front and back faces) + + Parameters: + ----------- + mesh_id: int + identity of mesh to change + layer: int + selects the mesh overlay (e.g. GIfTI or STC file) + key: str + attribute to change + value: float + for attribute + ''' + self._send_custom(['setMeshLayerProperty', [mesh_id, layer, key, val]])
+ + +
+[docs] + def set_pan_2D_xyzmm(self, xyzmm_zoom): + ''' + Adjust offset position and scale of 2D sliceScale + + Parameters: + ----------- + xyzmm_zoom: list + first three components are spatial, fourth is scaling + ''' + self._send_custom(['setPan2Dxyzmm', [xyzmm_zoom]])
+ + +
+[docs] + def set_render_azimuth_elevation(self, azimuth, elevation): + ''' + Set rotation of 3D render view + + Parameters: + ----------- + azimuth: float + which direction/angle to face + elevation: float + how high up + ''' + self._send_custom(['setRenderAzimuthElevation', [azimuth, elevation]])
+ + + """ + #todo. Finish functions for adding volumes first. Model should also have + a volumes attribute. + def set_volume(self, volume, to_index = 0): + ''' + todo: Set the index of a volume. This will change it's ordering and + appearance if there are multiple volumes loaded. + + volume: todo + the volume to update + to_index: int + the index to move the volume to. The default is the background + (index 0) + ''' + self._send_custom(['setVolume', [volume, to_index]]) + """ + + """ + #todo. Finish functions for adding volumes first. Model should also have + a volumes attribute. + def remove_volume(self, volume): + ''' + todo: Remove a volume + + Parameters: + ----------- + volume: todo + volume to remove + ''' + self._send_custom(['removeVolume', [volume]]) + """ + +
+[docs] + def remove_volume_by_index(self, index): + ''' + Remove a volume by index + + Parameters: + ----------- + index: int + index of volume to remove + ''' + self._send_custom(['removeVolumeByIndex', [index]])
+ + + """ + #todo: Create a NVMesh class + def remove_mesh(self, mesh): + ''' + todo: Remove a triangulated mesh, connectome or tractogram + + Parameters: + ----------- + mesh: todo + mesh to delete + ''' + self._send_custom(['removeMesh', [mesh]]) + """ + +
+[docs] + def remove_mesh_by_url(self, url): + ''' + Remove a triangulated mesh, connectome or tractogram + + Parameters: + ----------- + url: str + URL of mesh to delete + ''' + self._send_custom(['removeMeshByUrl', [str(url)]])
+ + + """ + #todo: create an NVImage class + def move_volume_to_bottom(self, volume): + ''' + todo: Move a volume to the bottom of the stack of loaded volumes. The + volume will become the background + + Parameters: + ----------- + volume: todo + the volume to move + ''' + self._send_custom(['moveVolumeToBottom', [volume]]) + + def move_volume_up(self, volume): + ''' + todo: Move a volume up one index position in the stack of loaded + olumes. This moves it up one layer + + Parameters: + ----------- + volume: todo + the volume to move + ''' + self._send_custom(['moveVolumeUp', [volume]]) + + def move_volume_down(self, volume): + ''' + todo: Move a volume down one index position in the stack of loaded + volumes. This moves it down one layer + + Parameters: + ----------- + volume: todo + the volume to move + ''' + self._send_custom(['moveVolumeDown', [volume]]) + + def move_volume_to_top(self, volume): + ''' + todo: Move a volume to the top position in the stack of loaded + volumes. This will be the top layer + + Parameters: + ----------- + volume: todo + + ''' + self._send_custom(['moveVolumeToTop', [volume]]) + """ + +
+[docs] + def set_clip_plane(self, depth_azimuth_elevation): + ''' + Update the clip plane orientation in 3D view mode + + Parameters: + ----------- + depth_azimuth_elevation: list + a two component vector: [azimuth, elevation]. azimuth: camera + position in degrees around object, typically 0..360 + (or -180..+180). elevation: camera height in degrees, range -90..90 + ''' + self._send_custom(['setClipPlane', [depth_azimuth_elevation]])
+ + +
+[docs] + def set_crosshair_color(self, color): + ''' + Set the crosshair color + + Parameters: + ----------- + color: list + an RGBA array. Values range from 0 to 1 + ''' + self._send_custom(['setCrosshairColor', [color]])
+ + +
+[docs] + def set_crosshair_width(self, crosshair_width): + ''' + Set thickness of crosshair + + Parameters: + ----------- + crosshair_width: float + the crosshair width + ''' + self._send_custom(['setCrosshairWidth', [crosshair_width]])
+ + +
+[docs] + def set_drawing_enabled(self, drawing): + ''' + Does dragging over a 2D slice create a drawing? + + Parameters: + ----------- + drawing: bool + enabled (True) or not (False) + ''' + self._send_custom(['setDrawingEnabled', [drawing]])
+ + +
+[docs] + def set_pen_value(self, pen_value, is_filled_pen=False): + ''' + Determine color and style of drawing + + Parameters: + ----------- + pen_value: int + sets the color of the pen + is_filled_pen: bool + determines if dragging creates flood-filled shape + ''' + self._send_custom(['setPenValue', [pen_value, is_filled_pen]])
+ + +
+[docs] + def set_draw_opacity(self, opacity): + ''' + Control whether drawing is transparent (0), opaque (1) or translucent + (between 0 and 1). + + Parameters: + ----------- + opacity: float + translucency of drawing. Transparent (0), opaque (1) or + translucent (between 0 and 1). + ''' + self._send_custom(['setDrawOpacity', [opacity]])
+ + +
+[docs] + def set_selection_box_color(self, color): + ''' + Set the selection box color. A selection box is drawn when you right + click and drag to change image intensity + + Parameters: + ----------- + color: list + an RGBA array. Values range from 0 to 1. + ''' + self._send_custom(['setSelectionBoxColor', [color]])
+ + +
+[docs] + def set_slice_type(self, slice_type): + ''' + Set the slice type. This changes the view mode + + Parameters: + ----------- + slice_type: int + the slice type. Valid values are nv.slice_type.axial, + nv.slice_type.coronal, nv.slice_type.sagittal, + nv.slice_type.multiplanar, and nv.slice_type.render + These are enumerated, so you can also input the values directly + (0-4), or you can input the strings ("axial", "coronal", + "sagittal", "multiplanar", "render"). + + ''' + if isinstance(slice_type, str): + slice_type = slice_type.lower() + slice_type = getattr(self.slice_type, slice_type) + self._send_custom(['setSliceType', [slice_type]])
+ + +
+[docs] + def set_opacity(self, vol_idx, new_opacity): + ''' + Set the opacity of a volume given by volume index + + Parameters: + ----------- + vol_idx: int + the volume index of the volume to change + new_opacity: float + the opacity value. valid values range from 0 to 1. 0 will + effectively remove a volume from the scene + ''' + self._send_custom(['setOpacity', [vol_idx, new_opacity]])
+ + +
+[docs] + def set_scale(self, scale): + ''' + Set the scale of the 3D rendering. Larger numbers effectively zoom. + + Parameters: + ----------- + scale: float + the new scale value + ''' + self._send_custom(['setScale', [scale]])
+ + +
+[docs] + def set_clip_plane_color(self, color): + ''' + Set the color of the 3D clip plane + + Parameters: + ----------- + color: list + the new color. expects an array of RGBA values. values can range + from 0 to 1 + ''' + self._send_custom(['setClipPlaneColor', [color]])
+ + +
+[docs] + def load_document_from_url(self, url): + ''' + Load document from URL + + Parameters: + ----------- + url: str + URL of NVDocument + ''' + self._send_custom(['loadDocumentFromUrl', [str(url)]])
+ + +
+[docs] + def load_volumes(self, volume_list): + ''' + load an array of volume objects + + todo, allow for lists with mixed types (dictionaries and NVImage objects + + Parameters: + ----------- + volume_list: list + the array of objects to load + ''' + if not isinstance(volume_list, list): + raise TypeError('volume_list must be a list') + if type(volume_list[0]) not in (dict, NVImage): + raise TypeError('volume_list must be a list of dictionaries or NVImage objects') + + if len(volume_list) == 0: + return + + if isinstance(volume_list[0], NVImage): + volume_list = [dict(v) for v in volume_list] + self._send_custom(['loadVolumes', [volume_list]])
+ + +
+[docs] + def add_mesh_from_url(self, url): + ''' + Add mesh from url + + Parameters: + ----------- + url: str + url of mesh + ''' + self._send_custom(['addMeshFromUrl', [str(url)]])
+ + +
+[docs] + def load_meshes(self, mesh_list): + ''' + load an array of volume objects + + todo, allow for lists with mixed types (dictionaries and NVImage objects + + Parameters: + ----------- + mesh_list: list + the array of objects to load + ''' + if not isinstance(mesh_list, list): + raise TypeError('mesh_list must be a list') + if type(mesh_list[0]) not in (dict, NVMesh): + raise TypeError('mesh_list must be a list of dictionaries or NVMesh objects') + + if len(mesh_list) == 0: + return + + if isinstance(mesh_list[0], NVMesh): + mesh_list = [dict(v) for v in mesh_list] + self._send_custom(['loadMeshes', [mesh_list]])
+ + +
+[docs] + def load_connectome(self, connectome): + ''' + Load a connectome specified by dictionary/json + + Parameters: + ----------- + connectome: dict + connectome model + ''' + self._send_custom(['loadConnectome', [connectome]])
+ + +
+[docs] + def create_empty_drawing(self): + ''' + Generate a blank canvas for the pen tool + ''' + self._send_custom(['createEmptyDrawing', []])
+ + +
+[docs] + def draw_grow_cut(self): + ''' + Dilate drawing so all voxels are colored. works on drawing with + multiple colors + ''' + self._send_custom(['drawGrowCut', []])
+ + +
+[docs] + def set_mesh_shader(self, mesh_id, mesh_shader=2): + ''' + Select new shader for triangulated meshes and connectomes + + Parameters: + ----------- + mesh_id: int + id of mesh to change + mesh_shader (str/int): identify shader for usage + ''' + self._send_custom(['setMeshShader', [mesh_id, mesh_shader]])
+ + +
+[docs] + def set_custom_mesh_shader(self, fragment_shader_text="", name="Custom"): + ''' + Set custom shader for triangulated meshes and connectomes. + + Parameters: + ----------- + fragment_shader_text: str + custom fragment shader + name: str + title for new shader + ''' + self._send_custom(['setCustomMeshShader', + [fragment_shader_text, name]])
+ + +
+[docs] + def update_gl_volume(self): + ''' + update the webGL 2.0 scene after making changes to the array of + volumes. Use if altering one or more volumes manually (outside of + Niivue setter methods). + ''' + self._send_custom(['updateGLVolume', []])
+ + +
+[docs] + def set_color_map(self, ID, color_map): + ''' + Update the colormap of an image given its ID + + Parameters: + ----------- + ID: str + the ID of the image + color_map: str + the name of the color_map to use + ''' + self._send_custom(['setColorMap', [ID, color_map]])
+ + +
+[docs] + def set_color_map_negative(self, ID, color_map_negative): + ''' + Use given color map for negative voxels in image + + Parameters: + ----------- + ID: str + the ID of the image + color_map_negative: str + the name of the color_map to use + ''' + self._send_custom(['setColorMapNegative', [ID, color_map_negative]])
+ + +
+[docs] + def set_modulation_image(self, id_target, id_modulation, + modulate_alpha=False): + ''' + Modulate intensity of one image based on intensity of another + + Parameters: + ----------- + id_target: str + the ID of the image to be biased + id_modulation: str + the ID of the image that controls bias (None to disable modulation) + modulate_alpha: bool + the modulation influence alpha transparency (True) or RGB + color (False) components + ''' + self._send_custom(['setModulationImage', + [id_target, id_modulation, modulate_alpha]])
+ + +
+[docs] + def set_frame_4D(self, ID, frame_4D): + ''' + Show desired 3D volume from 4D time series + + Parameters: + ----------- + ID: the ID of the 4D image + frame_4D: to display (indexed from zero) + ''' + self._send_custom(['setFrame4D', [ID, frame_4D]])
+ + +
+[docs] + def set_interpolation(self, is_nearest): + ''' + Select between nearest and linear interpolation for voxel based images + + Parameters: + ----------- + is_nearest: bool + whether nearest neighbor interpolation is used, else linear + interpolation + ''' + self._send_custom(['setInterpolation', [is_nearest]])
+ + +
+[docs] + def move_crosshair_in_vox(self, x, y, z): + ''' + Move crosshair a fixed number of voxels (instead of mm) + + Parameters: + ----------- + x: float + translate left (-) or right (+) + y: float + translate posterior (-) or +anterior (+) + z: float + translate inferior (-) or superior (+) + ''' + self._send_custom(['moveCrosshairInVox', [x, y, z]])
+ + +
+[docs] + def draw_mosaic(self, mosaic_str): + ''' + Display a lightbox or montage view + + Parameters: + ----------- + mosaic_str: str + specifies orientation (A,C,S) and location of slices. + ''' + self._send_custom(['drawMosaic', [mosaic_str]])
+ + +
+[docs] + def add_volume(self, volume): + ''' + Add a new volume to the canvas + + Parameters: + ----------- + volume: str or dict or NVImage + the path to the file (either url or local path) + ''' + if isinstance(volume, str): + file = volume + if file.startswith('http://') or file.startswith('https://'): + self._send_custom(['addVolumeFromUrl', [{'url': str(file)}]]) + else: + if file.startswith('file://'): + parsed = urlparse(file) + file = url2pathname(parsed.path) + p = pathlib.Path(file) + name = p.name + filedata = p.read_bytes() + self._send_custom(['addVolumeFromBase64', [name]], [filedata]) + elif isinstance(volume, dict): + buffers = [] + if 'dataBuffer' in volume: + buffers = [volume.pop('dataBuffer')] + self._send_custom(['addVolume', [volume]], buffers) + elif isinstance(volume, NVImage): + dict_volume = dict(volume) + buffers = [] + if 'dataBuffer' in dict_volume: + buffers = [dict_volume.pop('dataBuffer')] + self._send_custom(['addVolume', [dict_volume]], buffers)
+ + +
+[docs] + def add_object(self, img): + ''' + Load a nibabel.nifti1.Nifti1Image object as a volume + + Parameters: + ----------- + img (nibabel.nifti1.Nifti1Image): Nifti1 image + ''' + filename = (img.get_filename() or + ''.join(random.choice(string.ascii_uppercase + + string.digits) + for _ in range(20)) + ) + self._send_custom(['addVolumeFromBase64', + [os.path.basename(filename)]], + [img.to_bytes()])
+ + + # getter functions start here # +
+[docs] + def run_custom_code(self, code, timeout=60, log=False): + ''' + Run a custom JavaScript code snippet + + Parameters: + ----------- + code: str + the code to run + timeout: int + the maximum time to wait for the code to finish (in seconds) + + Returns: + the result of the code + ''' + code_id = ''.join(random.choice(string.ascii_uppercase + + string.digits) + for _ in range(20)) + self._send_custom(['runCustomCode', [code_id]], [code.encode('utf-8')]) + + start = time.time() + i = 1 + with ui_events() as poll: + while True: + poll(1) + # https://math.stackexchange.com/a/2678903 + num = int(((i+2) % 3) + 1) + if log: + print(num * '.' + ' ', end='\r') + i += 0.25 + time.sleep(0.1) + if time.time() - start > timeout or ( + code_id in self._custom_code_results + and self._custom_code_results[code_id]["chunks_left"] == 0 + ): + break + if log: + print("Done.") + result = self._custom_code_results.pop(code_id, {}) + return result.get('result', None)
+ + +
+[docs] + def get_descriptives(self, layer, masks): + ''' + basic statistics for selected voxel-based image + + Parameters: + ----------- + layer: str + the ID of the image + masks: str + the ID of the mask + + Returns: + -------- + list + ''' + code = f'this.nv.getDescriptives({layer}, {masks})' + return self.run_custom_code(code)
+ + +
+[docs] + def get_frame_4D(self, ID): + ''' + determine active 3D volume from 4D time series + + Parameters: + ----------- + ID: str + the ID of the 4D image + + Returns: + -------- + int + ''' + return self.run_custom_code(f'this.nv.getFrame4D({ID})')
+ + +
+[docs] + def get_media_by_url(self, url): + ''' + Find media by url + + Parameters: + ----------- + url: str + + Returns: + -------- + NVImage or NVMesh + ''' + return self.run_custom_code(f'this.nv.getMediaByUrl({url})')
+ + +
+[docs] + def get_overlay_index_by_ID(self, ID): + ''' + get the index of an overlay by its unique id. unique ids are assigned + to the NVImage.id property when a new NVImage is created. + + Parameters: + ----------- + ID: str + the ID of the overlay + + Returns: + -------- + int + ''' + return self.run_custom_code(f'this.nv.getOverlayIndexByID({ID})')
+ + +
+[docs] + def get_radiological_convention(self): + ''' + Detect if display is using radiological or neurological convention. + + Returns: + -------- + bool + ''' + return self.run_custom_code('this.nv.getRadiologicalConvention()')
+ + +
+[docs] + def get_volume_index_by_ID(self, ID): + ''' + get the index of a volume by its unique id. unique ids are assigned to + the NVImage.id property when a new NVImage is created. + + Parameters: + ----------- + ID: str + the ID of the volume + + Returns: + -------- + int + ''' + return self.run_custom_code(f'this.nv.getVolumeIndexByID({ID})')
+ + +
+[docs] + def is_mesh_ext(self, url): + ''' + Returns boolean: true if filename ends with mesh + extension (TRK, pial, etc.) + + Parameters: + ----------- + url: str + the url or filepath of the mesh + + Returns: + -------- + bool + ''' + return self.run_custom_code(f'this.nv.isMeshExt({url})')
+
+ +
+ +
+ + + +
+ +
+ +
+
+
+ +
+ +
+ +
+ + + + +
+
+ +
+ +
+
+
+ + + + + + + + \ No newline at end of file diff --git a/_sources/development-notes/py-ts-messaging.rst.txt b/_sources/development-notes/py-ts-messaging.rst.txt index 00e1cca..0e8182c 100644 --- a/_sources/development-notes/py-ts-messaging.rst.txt +++ b/_sources/development-notes/py-ts-messaging.rst.txt @@ -51,7 +51,7 @@ The ``Niivue.run_custom_code`` function displays this implementation. .. code:: py - >>> colormaps = nv.run_custom_code('nv.colorMaps()') + >>> colormaps = nv.run_custom_code('nv.colormaps()') Done. >>> print(colormaps) diff --git a/_static/basic.css b/_static/basic.css index 6157296..e760386 100644 --- a/_static/basic.css +++ b/_static/basic.css @@ -237,6 +237,10 @@ a.headerlink { visibility: hidden; } +a:visited { + color: #551A8B; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -670,6 +674,16 @@ dd { margin-left: 30px; } +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + dl > dd:last-child, dl > dd:last-child > :last-child { margin-bottom: 0; @@ -738,6 +752,14 @@ abbr, acronym { cursor: help; } +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + /* -- code displays --------------------------------------------------------- */ pre { diff --git a/_static/documentation_options.js b/_static/documentation_options.js index 1231d09..ace8aca 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -1,5 +1,4 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), +const DOCUMENTATION_OPTIONS = { VERSION: '1.1.0', LANGUAGE: 'en', COLLAPSE_INDEX: false, diff --git a/_static/searchtools.js b/_static/searchtools.js index 97d56a7..7918c3f 100644 --- a/_static/searchtools.js +++ b/_static/searchtools.js @@ -57,12 +57,12 @@ const _removeChildren = (element) => { const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string -const _displayItem = (item, searchTerms) => { +const _displayItem = (item, searchTerms, highlightTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; - const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; const [docName, title, anchor, descr, score, _filename] = item; @@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => { if (dirname.match(/\/index\/$/)) dirname = dirname.substring(0, dirname.length - 6); else if (dirname === "index/") dirname = ""; - requestUrl = docUrlRoot + dirname; + requestUrl = contentRoot + dirname; linkUrl = requestUrl; } else { // normal html builders - requestUrl = docUrlRoot + docName + docFileSuffix; + requestUrl = contentRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } let linkEl = listItem.appendChild(document.createElement("a")); linkEl.href = linkUrl + anchor; linkEl.dataset.score = score; linkEl.innerHTML = title; - if (descr) + if (descr) { listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) @@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => { listItem.appendChild( Search.makeSearchSummary(data, searchTerms) ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); }); Search.output.appendChild(listItem); }; @@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => { const _displayNextItem = ( results, resultCount, - searchTerms + searchTerms, + highlightTerms, ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { - _displayItem(results.pop(), searchTerms); + _displayItem(results.pop(), searchTerms, highlightTerms); setTimeout( - () => _displayNextItem(results, resultCount, searchTerms), + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), 5 ); } @@ -360,7 +368,7 @@ const Search = { // console.info("search results:", Search.lastresults); // print the results - _displayNextItem(results, results.length, searchTerms); + _displayNextItem(results, results.length, searchTerms, highlightTerms); }, /** diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js index aae669d..8a96c69 100644 --- a/_static/sphinx_highlight.js +++ b/_static/sphinx_highlight.js @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => { } span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); parent.insertBefore( span, parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), + rest, node.nextSibling ) ); node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); if (isInSVG) { const rect = document.createElementNS( @@ -140,5 +145,10 @@ const SphinxHighlight = { }, }; -_ready(SphinxHighlight.highlightSearchWords); -_ready(SphinxHighlight.initEscapeListener); +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/api.html b/api.html index 86ec194..e8e5986 100644 --- a/api.html +++ b/api.html @@ -28,7 +28,7 @@ - + @@ -36,13 +36,13 @@ - - - + + + - + @@ -378,7 +378,1206 @@
-

API Reference#

+

API Reference#

+
+
+class ipyniivue.Niivue(**kwargs: Any)[source]#
+

Niivue class.

+
+

Parameters:#

+
+
text_height: float

the text height for orientation labels (0 to 1). Zero for no text +labels. Default is 0.06.

+
+
colorbar_height: float

size of colorbar. 0 for no colorbars, fraction of Nifti j dimension. +Default is 0.05.

+
+
colorbar_margin: float

padding around colorbar when displayed. Default is 0.05.

+
+
crosshair_width: float

crosshair size. Zero for no crosshair. Default is 1.

+
+
ruler_width: float

ruler size. 0 for no ruler. Default is 4.

+
+
back_color: list

the background color. RGBA values from 0 to 1. Default is +black ([0,0,0,1]).

+
+
crosshair_color: list

the crosshair color. RGBA values from 0 to 1. Default is +red ([1,0,0,1]).

+
+
selection_box_color: list

the selection box color when the intensty selection box is shown +(right click and drag). RGBA values from 0 to 1. Default is +transparent white ([1,1,1,0.5]).

+
+
clip_plane_color: list

the color of the visible clip plane. RGBA values from 0 to 1. +Default is white ([1,1,1,0.5]).

+
+
ruler_color: list

the color of the ruler. RGBA values from 0 to 1. Default is +translucent red ([1, 0, 0, 0.8]).

+
+
show_3D_crosshair: bool

True/False whether crosshairs are shown on 3D rendering. +Default is False.

+
+
trust_cal_min_max: bool

True/False whether to trust the nifti header values for +cal_min and cal_max. Trusting them results in faster loading +because we skip computing these values from the data. +Default is True.

+
+
clip_plane_hot_key: str

the keyboard key used to cycle through clip plane orientations. +Default is “KeyC”.

+
+
view_mode_hot_key: str

the keyboard key used to cycle through view modes. Default is “KeyV”.

+
+
key_debounce_time: float

the keyUp debounce time in milliseconds You must wait this long before +a new hot-key keystroke will be registered by the event listener. +The default is 50 ms.

+
+
double_touch_timeout: float

the maximum time in milliseconds for a double touch to be detected. +The default is 500 ms.

+
+
long_touch_timeout: float

the minimum time in milliseconds for a touch to count as long touch. +The default is 1000 ms.

+
+
is_radiological_convention: bool

whether or not to use radiological convention in the display. +Default is False.

+
+
loading_text: str

the loading text to display when there is a blank canvas and no images. +Default is “waiting on images…”.

+
+
drag_and_drop_enabled: bool

whether or not to allow file and url drag and drop on the canvas. +Default is True.

+
+
is_nearest_interpolation: bool

whether nearest neighbor interpolation is used, else linear +interpolation. Default is False.

+
+
is_atlas_outline: bool

whether atlas maps are only visible at the boundary of regions. +Default is False.

+
+
is_ruler: bool

whether a 10cm ruler is displayed. Default is False.

+
+
is_colorbar: bool

whether colorbar(s) are shown illustrating values for color maps. +Default is False.

+
+
is_orient_cube: bool

whether orientation cube is shown for 3D renderings. Default is False.

+
+
multiplanar_pad_pixels: int

spacing between tiles of a multiplanar view. Default is 0.

+
+
mesh_thickness_on_2D: float

2D slice views can show meshes within this range. Meshes only visible +in sliceMM (world space) mode. Default is Infinity.

+
+
drag_mode(str/int):

behavior for dragging. string (“none”, “contrast”, +“measurement”, “pan”, “slicer_3D”) or integer (0, 1, 2, 3, 4). +Default is “contrast” or 1.

+
+
is_depth_pick_mesh: bool

when both voxel-based image and mesh is loaded, will depth picking be +able to detect mesh or only voxels. Default is False.

+
+
is_corner_orientation_text: bool

should slice text be shown in the upper right corner instead of the +center of left and top axes?. Default is False.

+
+
sagittal_nose_left: bool

should 2D sagittal slices show the anterior direction toward the +left?. Default is False.

+
+
is_slice_MM: bool

are images aligned to voxel space (False) or world space (True). +Default is False.

+
+
is_high_resolution_capable: bool

demand that high-dot-per-inch displays use native voxel size. +Default is True.

+
+
drawing_enabled: bool

allow user to create and edit voxel-based drawings. +Default is False.

+
+
pen_value: float

if drawing_enabled, color of drawing when user drags mouse. +Default is Infinity.

+
+
is_filled_pen: bool

if drawing_enabled, create filled drawings when user drags mouse. +Default is False.

+
+
max_draw_undo_bitmaps: int

if drawing_enabled, number of possible undo steps. Default is 8.

+
+
thumbnail: str

optional 2D png bitmap that can be rapidly loaded to defer slow +loading of 3D image. Default is “”.

+
+
+
+
+add_mesh_from_url(url)[source]#
+

Add mesh from url

+
+

Parameters:#

+
+
url: str

url of mesh

+
+
+
+
+ +
+
+add_object(img)[source]#
+

Load a nibabel.nifti1.Nifti1Image object as a volume

+
+

Parameters:#

+

img (nibabel.nifti1.Nifti1Image): Nifti1 image

+
+
+ +
+
+add_volume(volume)[source]#
+

Add a new volume to the canvas

+
+

Parameters:#

+
+
volume: str or dict or NVImage

the path to the file (either url or local path)

+
+
+
+
+ +
+
+add_volume_from_url(url)[source]#
+

Add an image from a url

+
+

Parameters:#

+
+
url: str

The url link of the volume. Local paths and file urls are not +accepted.

+
+
+
+
+ +
+
+back_color#
+

the background color. RGBA values from 0 to 1. Default is black

+
+ +
+
+clip_plane_color#
+

the color of the visible clip plane. RGBA values from 0 to 1. Default is white

+
+ +
+
+clip_plane_hot_key#
+

the keyboard key used to cycle through clip plane orientations

+
+ +
+
+colorbar_height#
+

size of colorbar. 0 for no colorbars, fraction of Nifti j dimension

+
+ +
+
+colorbar_margin#
+

padding around colorbar when displayed

+
+ +
+
+create_empty_drawing()[source]#
+

Generate a blank canvas for the pen tool

+
+ +
+
+crosshair_color#
+

the crosshair color. RGBA values from 0 to 1. Default is red

+
+ +
+
+crosshair_width#
+

crosshair size. Zero for no crosshair

+
+ +
+
+double_touch_timeout#
+

the maximum time in milliseconds for a double touch to be detected. The default is 500 ms

+
+ +
+
+drag_and_drop_enabled#
+

whether or not to allow file and url drag and drop on the canvas

+
+ +
+
+drag_mode#
+

behavior for dragging (“none”, “contrast”, “measurement”, “pan”, “slicer_3D”)

+
+ +
+
+draw_grow_cut()[source]#
+

Dilate drawing so all voxels are colored. works on drawing with +multiple colors

+
+ +
+
+draw_mosaic(mosaic_str)[source]#
+

Display a lightbox or montage view

+
+

Parameters:#

+
+
mosaic_str: str

specifies orientation (A,C,S) and location of slices.

+
+
+
+
+ +
+
+draw_otsu(levels)[source]#
+

Remove dark voxels in air

+
+

Parameters:#

+
+
levels: int

(2-4) segment brain into this many types

+
+
+
+
+ +
+
+drawing_enabled#
+

allow user to create and edit voxel-based drawings

+
+ +
+
+font_color#
+

the font color. RGBA values from 0 to 1. Default is gray

+
+ +
+
+get_descriptives(layer, masks)[source]#
+

basic statistics for selected voxel-based image

+
+

Parameters:#

+
+
layer: str

the ID of the image

+
+
masks: str

the ID of the mask

+
+
+
+
+

Returns:#

+

list

+
+
+ +
+
+get_frame_4D(ID)[source]#
+

determine active 3D volume from 4D time series

+
+

Parameters:#

+
+
ID: str

the ID of the 4D image

+
+
+
+
+

Returns:#

+

int

+
+
+ +
+
+get_media_by_url(url)[source]#
+

Find media by url

+
+

Parameters:#

+

url: str

+
+
+

Returns:#

+

NVImage or NVMesh

+
+
+ +
+
+get_overlay_index_by_ID(ID)[source]#
+

get the index of an overlay by its unique id. unique ids are assigned +to the NVImage.id property when a new NVImage is created.

+
+

Parameters:#

+
+
ID: str

the ID of the overlay

+
+
+
+
+

Returns:#

+

int

+
+
+ +
+
+get_radiological_convention()[source]#
+

Detect if display is using radiological or neurological convention.

+
+

Returns:#

+

bool

+
+
+ +
+
+get_volume_index_by_ID(ID)[source]#
+

get the index of a volume by its unique id. unique ids are assigned to +the NVImage.id property when a new NVImage is created.

+
+

Parameters:#

+
+
ID: str

the ID of the volume

+
+
+
+
+

Returns:#

+

int

+
+
+ +
+
+is_atlas_outline#
+

whether atlas maps are only visible at the boundary of regions

+
+ +
+
+is_colorbar#
+

whether colorbar(s) are shown illustrating values for color maps

+
+ +
+
+is_corner_orientation_text#
+

should slice text be shown in the upper right corner instead of the center of left and top axes?

+
+ +
+
+is_depth_pick_mesh#
+

when both voxel-based image and mesh is loaded, will depth picking be able to detect mesh or only voxels

+
+ +
+
+is_filled_pen#
+

create filled drawings when user drags mouse (if drawingEnabled)

+
+ +
+
+is_high_resolution_capable#
+

demand that high-dot-per-inch displays use native voxel size

+
+ +
+
+is_mesh_ext(url)[source]#
+
+
Returns boolean: true if filename ends with mesh

extension (TRK, pial, etc.)

+
+
+
+

Parameters:#

+
+
url: str

the url or filepath of the mesh

+
+
+
+
+

Returns:#

+

bool

+
+
+ +
+
+is_nearest_interpolation#
+

whether nearest neighbor interpolation is used, else linear interpolation

+
+ +
+
+is_orient_cube#
+

whether orientation cube is shown for 3D renderings

+
+ +
+
+is_radiological_convention#
+

whether or not to use radiological convention in the display

+
+ +
+
+is_ruler#
+

whether a 10cm ruler is displayed

+
+ +
+
+is_slice_MM#
+

are images aligned to voxel space (False) or world space (True)

+
+ +
+
+key_debounce_time#
+

the keyUp debounce time in milliseconds. The default is 50 ms. You must wait this long before a new hot-key keystroke will be registered by the event listener

+
+ +
+
+load_connectome(connectome)[source]#
+

Load a connectome specified by dictionary/json

+
+

Parameters:#

+
+
connectome: dict

connectome model

+
+
+
+
+ +
+
+load_document_from_url(url)[source]#
+

Load document from URL

+
+

Parameters:#

+
+
url: str

URL of NVDocument

+
+
+
+
+ +
+
+load_drawing_from_url(url, is_binarize=False)[source]#
+

Open drawing

+
+

Parameters:#

+
+
url: str

the url

+
+
is_binarize: bool

binarize the drawing. Defaults to False.

+
+
+
+
+ +
+
+load_meshes(mesh_list)[source]#
+

load an array of volume objects

+

todo, allow for lists with mixed types (dictionaries and NVImage objects

+
+

Parameters:#

+
+
mesh_list: list

the array of objects to load

+
+
+
+
+ +
+
+load_volumes(volume_list)[source]#
+

load an array of volume objects

+

todo, allow for lists with mixed types (dictionaries and NVImage objects

+
+

Parameters:#

+
+
volume_list: list

the array of objects to load

+
+
+
+
+ +
+
+loading_text#
+

the loading text to display when there is a blank canvas and no images

+
+ +
+
+long_touch_timeout#
+

the minimum time in milliseconds for a touch to count as long touch. The default is 1000 ms

+
+ +
+
+max_draw_undo_bitmaps#
+

number of possible undo steps (if drawingEnabled)

+
+ +
+
+mesh_thickness_on_2D#
+

2D slice views can show meshes within this range. Meshes only visible in slice_MM (world space) mode

+
+ +
+
+move_crosshair_in_vox(x, y, z)[source]#
+

Move crosshair a fixed number of voxels (instead of mm)

+
+

Parameters:#

+
+
x: float

translate left (-) or right (+)

+
+
y: float

translate posterior (-) or +anterior (+)

+
+
z: float

translate inferior (-) or superior (+)

+
+
+
+
+ +
+
+multiplanar_force_render#
+

always show rendering in multiplanar view

+
+ +
+
+multiplanar_pad_pixels#
+

spacing between tiles of a multiplanar view

+
+ +
+
+pen_value#
+

color of drawing when user drags mouse (if drawingEnabled)

+
+ +
+
+remove_haze(level=5, vol_index=0)[source]#
+

Remove dark voxels in air

+
+

Parameters:#

+
+
level: int

(1-5) larger values for more preserved voxels

+
+
vol_index: int

volume to dehaze

+
+
+
+
+ +
+
+remove_mesh_by_url(url)[source]#
+

Remove a triangulated mesh, connectome or tractogram

+
+

Parameters:#

+
+
url: str

URL of mesh to delete

+
+
+
+
+ +
+
+remove_volume_by_index(index)[source]#
+

Remove a volume by index

+
+

Parameters:#

+
+
index: int

index of volume to remove

+
+
+
+
+ +
+
+remove_volume_by_url(url)[source]#
+

Remove volume by url. Local paths and file urls are not accepted.

+
+

Parameters:#

+
+
url: str

Volume added by url to remove.

+
+
+
+
+ +
+
+reverse_faces(mesh_id)[source]#
+

Reverse triangle winding of mesh (swap front and back faces)

+
+

Parameters:#

+
+
mesh_id: int

identity of mesh to change

+
+
+
+
+ +
+
+ruler_color#
+

the color of the ruler. RGBA values from 0 to 1. Default is translucent red

+
+ +
+
+ruler_width#
+

ruler size. 0 for no ruler

+
+ +
+
+run_custom_code(code, timeout=60, log=False)[source]#
+

Run a custom JavaScript code snippet

+
+

Parameters:#

+
+
code: str

the code to run

+
+
timeout: int

the maximum time to wait for the code to finish (in seconds)

+
+
+
+
returns:
+

the result of the code

+
+
+
+
+ +
+
+sagittal_nose_left#
+

should 2D sagittal slices show the anterior direction toward the left or right?

+
+ +
+
+save_image(filename, is_save_drawing=False)[source]#
+

Save voxel-based image to disk

+
+

Parameters:#

+
+
filename: str

filename of NIfTI image to create

+
+
is_save_drawing: bool

determines whether drawing or background image is saved

+
+
+
+
+ +
+
+save_scene(filename='')[source]#
+

Save the webgl2 canvas as png format bitmap.

+
+

Parameters:#

+
+
filename: str

for screen capture.

+
+
+
+
+ +
+
+selection_box_color#
+

the selection box color when the intensty selection box is shown (right click and drag). RGBA values from 0 to 1. Default is transparent white

+
+ +
+
+set_clip_plane(depth_azimuth_elevation)[source]#
+

Update the clip plane orientation in 3D view mode

+
+

Parameters:#

+
+
depth_azimuth_elevation: list

a two component vector: [azimuth, elevation]. azimuth: camera +position in degrees around object, typically 0..360 +(or -180..+180). elevation: camera height in degrees, range -90..90

+
+
+
+
+ +
+
+set_clip_plane_color(color)[source]#
+

Set the color of the 3D clip plane

+
+

Parameters:#

+
+
color: list

the new color. expects an array of RGBA values. values can range +from 0 to 1

+
+
+
+
+ +
+
+set_color_map(ID, color_map)[source]#
+

Update the colormap of an image given its ID

+
+

Parameters:#

+
+
ID: str

the ID of the image

+
+
color_map: str

the name of the color_map to use

+
+
+
+
+ +
+
+set_color_map_negative(ID, color_map_negative)[source]#
+

Use given color map for negative voxels in image

+
+

Parameters:#

+
+
ID: str

the ID of the image

+
+
color_map_negative: str

the name of the color_map to use

+
+
+
+
+ +
+
+set_crosshair_color(color)[source]#
+

Set the crosshair color

+
+

Parameters:#

+
+
color: list

an RGBA array. Values range from 0 to 1

+
+
+
+
+ +
+
+set_crosshair_width(crosshair_width)[source]#
+

Set thickness of crosshair

+
+

Parameters:#

+
+
crosshair_width: float

the crosshair width

+
+
+
+
+ +
+
+set_custom_mesh_shader(fragment_shader_text='', name='Custom')[source]#
+

Set custom shader for triangulated meshes and connectomes.

+
+

Parameters:#

+
+
fragment_shader_text: str

custom fragment shader

+
+
name: str

title for new shader

+
+
+
+
+ +
+
+set_draw_opacity(opacity)[source]#
+

Control whether drawing is transparent (0), opaque (1) or translucent +(between 0 and 1).

+
+

Parameters:#

+
+
opacity: float

translucency of drawing. Transparent (0), opaque (1) or +translucent (between 0 and 1).

+
+
+
+
+ +
+
+set_drawing_enabled(drawing)[source]#
+

Does dragging over a 2D slice create a drawing?

+
+

Parameters:#

+
+
drawing: bool

enabled (True) or not (False)

+
+
+
+
+ +
+
+set_frame_4D(ID, frame_4D)[source]#
+

Show desired 3D volume from 4D time series

+
+

Parameters:#

+
+
ID: the ID of the 4D image

frame_4D: to display (indexed from zero)

+
+
+
+
+ +
+
+set_high_resolution_capable(is_high_resolution_capable)[source]#
+

Force WebGL canvas to use high resolution display, regardless of +browser defaults.

+
+

Parameters:#

+
+
is_high_resolution_capable: bool

allow high-DPI display

+
+
+
+
+ +
+
+set_interpolation(is_nearest)[source]#
+

Select between nearest and linear interpolation for voxel based images

+
+

Parameters:#

+
+
is_nearest: bool

whether nearest neighbor interpolation is used, else linear +interpolation

+
+
+
+
+ +
+
+set_mesh_layer_property(mesh_id, layer, key, val)[source]#
+

Reverse triangle winding of mesh (swap front and back faces)

+
+

Parameters:#

+
+
mesh_id: int

identity of mesh to change

+
+
layer: int

selects the mesh overlay (e.g. GIfTI or STC file)

+
+
key: str

attribute to change

+
+
value: float

for attribute

+
+
+
+
+ +
+
+set_mesh_property(mesh_id, key, value)[source]#
+

Change property of mesh, tractogram or connectome

+
+

Parameters:#

+
+
mesh_id: int

identity of mesh to change

+
+
key: str

attribute to change

+
+
value: float

for attribute

+
+
+
+
+ +
+
+set_mesh_shader(mesh_id, mesh_shader=2)[source]#
+

Select new shader for triangulated meshes and connectomes

+
+

Parameters:#

+
+
mesh_id: int

id of mesh to change +mesh_shader (str/int): identify shader for usage

+
+
+
+
+ +
+
+set_mesh_thickness_on_2D(mesh_thickness_on_2D)[source]#
+

Limit visibility of mesh in front of a 2D image. +Requires world-space mode.

+
+

Parameters:#

+
+
mesh_thickness_on_2D: float

distance from voxels for clipping mesh. Use float(‘inf’) to show +entire mesh or 0.0 to hide mesh.

+
+
+
+
+ +
+
+set_modulation_image(id_target, id_modulation, modulate_alpha=False)[source]#
+

Modulate intensity of one image based on intensity of another

+
+

Parameters:#

+
+
id_target: str

the ID of the image to be biased

+
+
id_modulation: str

the ID of the image that controls bias (None to disable modulation)

+
+
modulate_alpha: bool

the modulation influence alpha transparency (True) or RGB +color (False) components

+
+
+
+
+ +
+
+set_opacity(vol_idx, new_opacity)[source]#
+

Set the opacity of a volume given by volume index

+
+

Parameters:#

+
+
vol_idx: int

the volume index of the volume to change

+
+
new_opacity: float

the opacity value. valid values range from 0 to 1. 0 will +effectively remove a volume from the scene

+
+
+
+
+ +
+
+set_pan_2D_xyzmm(xyzmm_zoom)[source]#
+

Adjust offset position and scale of 2D sliceScale

+
+

Parameters:#

+
+
xyzmm_zoom: list

first three components are spatial, fourth is scaling

+
+
+
+
+ +
+
+set_pen_value(pen_value, is_filled_pen=False)[source]#
+

Determine color and style of drawing

+
+

Parameters:#

+
+
pen_value: int

sets the color of the pen

+
+
is_filled_pen: bool

determines if dragging creates flood-filled shape

+
+
+
+
+ +
+
+set_radiological_convention(is_radiological_convention)[source]#
+

Control whether 2D slices use radiological or neurological convention.

+
+

Parameters:#

+
+
is_radiological_convention: bool

use radiological convention.

+
+
+
+
+ +
+
+set_render_azimuth_elevation(azimuth, elevation)[source]#
+

Set rotation of 3D render view

+
+

Parameters:#

+
+
azimuth: float

which direction/angle to face

+
+
elevation: float

how high up

+
+
+
+
+ +
+
+set_scale(scale)[source]#
+

Set the scale of the 3D rendering. Larger numbers effectively zoom.

+
+

Parameters:#

+
+
scale: float

the new scale value

+
+
+
+
+ +
+
+set_selection_box_color(color)[source]#
+

Set the selection box color. A selection box is drawn when you right +click and drag to change image intensity

+
+

Parameters:#

+
+
color: list

an RGBA array. Values range from 0 to 1.

+
+
+
+
+ +
+
+set_slice_mm(is_slice_mm)[source]#
+

determine view mode (world space or voxel space)

+
+

Parameters:#

+
+
is_slice_mm: bool

Control whether 2D slices use world space (True) or voxel space +(False). Beware that voxel space mode limits properties like +panning, zooming and mesh visibility.

+
+
+
+
+ +
+
+set_slice_mosaic_string(description)[source]#
+

Create a custom multi-slice mosaic (aka lightbox, montage) view.

+
+

Parameters:#

+
+
description: str

description of mosaic. An example would be “A 0 20 C 30 S 42”.

+
+
+
+
+ +
+
+set_slice_type(slice_type)[source]#
+

Set the slice type. This changes the view mode

+
+

Parameters:#

+
+
slice_type: int

the slice type. Valid values are nv.slice_type.axial, +nv.slice_type.coronal, nv.slice_type.sagittal, +nv.slice_type.multiplanar, and nv.slice_type.render +These are enumerated, so you can also input the values directly +(0-4), or you can input the strings (“axial”, “coronal”, +“sagittal”, “multiplanar”, “render”).

+
+
+
+
+ +
+
+set_text_orientation(is_at_corner)[source]#
+

Set text appearance at corner (True) or sides of 2D slice (False).

+
+

Parameters:#

+
+
is_at_corner: bool

does the text show at the corner (True) or sides of +2D slice (False).

+
+
+
+
+ +
+
+show_3D_crosshair#
+

True/False whether crosshairs are shown on 3D rendering

+
+ +
+
+slice_type#
+

alias of SliceType

+
+ +
+
+text_height#
+

the text height for orientation labels (0 to 1). Zero for no text labels

+
+ +
+
+thumbnail#
+

optional 2D png bitmap that can be rapidly loaded to defer slow loading of 3D image

+
+ +
+
+trust_cal_min_max#
+

True/False whether to trust the nifti header values for cal_min and cal_max. Trusting them results in faster loading because we skip computing these values from the data

+
+ +
+
+undo_draw()[source]#
+

Restore drawing to previous state

+
+ +
+
+update_gl_volume()[source]#
+

update the webGL 2.0 scene after making changes to the array of +volumes. Use if altering one or more volumes manually (outside of +Niivue setter methods).

+
+ +
+
+view_mode_hot_key#
+

the keyboard key used to cycle through view modes

+
+ +
+
+
@@ -413,6 +1612,118 @@

API Reference diff --git a/examples/index.html b/examples/index.html index 2d2d02f..6a556a7 100644 --- a/examples/index.html +++ b/examples/index.html @@ -28,7 +28,7 @@ - + @@ -36,13 +36,13 @@ - - - + + + - + @@ -390,7 +390,7 @@
-

Examples#

+

Examples#

This section contains several examples generated from Jupyter notebooks. The widgets have been embedded into the page for demonstrative purposes.

@@ -487,7 +487,7 @@

Examples

- Created using Sphinx 7.0.1. + Created using Sphinx 7.2.2.

diff --git a/examples/introduction.html b/examples/introduction.html index accf3e7..46fc3e7 100644 --- a/examples/introduction.html +++ b/examples/introduction.html @@ -28,7 +28,7 @@ - + @@ -37,13 +37,13 @@ - - - + + + - + @@ -396,10 +396,10 @@
-

Introduction#

+

Introduction#

This notebook show how ipyniivue can be used to visualize a MRI volumes.

-

Installation#

+

Installation#

This notebook can be run on a local server or on a virtualized environement like Google Colab.

[1]:
@@ -446,7 +446,7 @@ 

Installation -

Imports#

+

Imports#

-

Displaying a volume from the internet#

+

Displaying a volume from the internet#

Objects stored remotely can be displayed directly, without first downloading them to a local directory.

[8]:
@@ -538,16 +538,12 @@ 

Displaying a volume from the internet -
+
[8]:
+
----------------------------------------------------------------------------
-AttributeError                            Traceback (most recent call last)
-Cell In[8], line 1
-----> 1 nv.volumes
-
-AttributeError: 'Niivue' object has no attribute 'volumes'
+[]
 
@@ -559,20 +555,16 @@

Displaying a volume from the internet -
+
[9]:
+
----------------------------------------------------------------------------
-AttributeError                            Traceback (most recent call last)
-Cell In[9], line 1
-----> 1 nv.meshes
-
-AttributeError: 'Niivue' object has no attribute 'meshes'
+[]
 

@@ -670,7 +662,7 @@

Displaying a volume from the internet

- Created using Sphinx 7.0.1. + Created using Sphinx 7.2.2.

diff --git a/examples/introduction.ipynb b/examples/introduction.ipynb index ed69588..1f5548d 100644 --- a/examples/introduction.ipynb +++ b/examples/introduction.ipynb @@ -26,10 +26,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2023-07-23T18:50:31.081802Z", - "iopub.status.busy": "2023-07-23T18:50:31.081433Z", - "iopub.status.idle": "2023-07-23T18:50:33.757145Z", - "shell.execute_reply": "2023-07-23T18:50:33.756540Z" + "iopub.execute_input": "2023-08-18T19:49:53.648996Z", + "iopub.status.busy": "2023-08-18T19:49:53.648564Z", + "iopub.status.idle": "2023-08-18T19:49:56.549920Z", + "shell.execute_reply": "2023-08-18T19:49:56.549083Z" }, "id": "SJi60qlC4-W8", "tags": [] @@ -60,10 +60,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2023-07-23T18:50:33.794857Z", - "iopub.status.busy": "2023-07-23T18:50:33.793934Z", - "iopub.status.idle": "2023-07-23T18:50:40.769758Z", - "shell.execute_reply": "2023-07-23T18:50:40.768991Z" + "iopub.execute_input": "2023-08-18T19:49:56.591580Z", + "iopub.status.busy": "2023-08-18T19:49:56.590977Z", + "iopub.status.idle": "2023-08-18T19:50:04.718610Z", + "shell.execute_reply": "2023-08-18T19:50:04.717488Z" }, "tags": [] }, @@ -103,10 +103,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2023-07-23T18:50:40.772507Z", - "iopub.status.busy": "2023-07-23T18:50:40.772171Z", - "iopub.status.idle": "2023-07-23T18:50:41.022797Z", - "shell.execute_reply": "2023-07-23T18:50:41.022018Z" + "iopub.execute_input": "2023-08-18T19:50:04.721993Z", + "iopub.status.busy": "2023-08-18T19:50:04.721703Z", + "iopub.status.idle": "2023-08-18T19:50:05.028637Z", + "shell.execute_reply": "2023-08-18T19:50:05.027497Z" }, "id": "q99CIADR4-W-", "tags": [] @@ -143,10 +143,10 @@ ] }, "execution": { - "iopub.execute_input": "2023-07-23T18:50:41.025962Z", - "iopub.status.busy": "2023-07-23T18:50:41.025555Z", - "iopub.status.idle": "2023-07-23T18:50:41.048077Z", - "shell.execute_reply": "2023-07-23T18:50:41.046518Z" + "iopub.execute_input": "2023-08-18T19:50:05.032476Z", + "iopub.status.busy": "2023-08-18T19:50:05.032147Z", + "iopub.status.idle": "2023-08-18T19:50:05.057691Z", + "shell.execute_reply": "2023-08-18T19:50:05.057064Z" }, "id": "4M9w2ro0nnmV", "outputId": "0656c479-2f00-4ae6-f86f-f17974129b76", @@ -156,7 +156,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "b2dcc3e33c9046f6b642b1aeb689bd11", + "model_id": "2e63615cc1f541fbb0ff1b3c92a108c3", "version_major": 2, "version_minor": 0 }, @@ -183,10 +183,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2023-07-23T18:50:41.051617Z", - "iopub.status.busy": "2023-07-23T18:50:41.051016Z", - "iopub.status.idle": "2023-07-23T18:50:41.054189Z", - "shell.execute_reply": "2023-07-23T18:50:41.053691Z" + "iopub.execute_input": "2023-08-18T19:50:05.062632Z", + "iopub.status.busy": "2023-08-18T19:50:05.061971Z", + "iopub.status.idle": "2023-08-18T19:50:05.067565Z", + "shell.execute_reply": "2023-08-18T19:50:05.066869Z" }, "tags": [] }, @@ -217,10 +217,10 @@ ] }, "execution": { - "iopub.execute_input": "2023-07-23T18:50:41.056824Z", - "iopub.status.busy": "2023-07-23T18:50:41.056232Z", - "iopub.status.idle": "2023-07-23T18:50:41.062948Z", - "shell.execute_reply": "2023-07-23T18:50:41.062478Z" + "iopub.execute_input": "2023-08-18T19:50:05.070292Z", + "iopub.status.busy": "2023-08-18T19:50:05.070072Z", + "iopub.status.idle": "2023-08-18T19:50:05.078178Z", + "shell.execute_reply": "2023-08-18T19:50:05.077536Z" }, "id": "9Fa9BSYXxAYn", "outputId": "bf1fd586-14a6-41f0-ee8c-a191dd138c2e", @@ -230,7 +230,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "c6f8d84640e14efdbba5d9cb90b4f2d0", + "model_id": "0ca6f28cb1674863a9e04190c10d4cc5", "version_major": 2, "version_minor": 0 }, @@ -273,10 +273,10 @@ ] }, "execution": { - "iopub.execute_input": "2023-07-23T18:50:41.065542Z", - "iopub.status.busy": "2023-07-23T18:50:41.065001Z", - "iopub.status.idle": "2023-07-23T18:50:41.071274Z", - "shell.execute_reply": "2023-07-23T18:50:41.070781Z" + "iopub.execute_input": "2023-08-18T19:50:05.081551Z", + "iopub.status.busy": "2023-08-18T19:50:05.081200Z", + "iopub.status.idle": "2023-08-18T19:50:05.087979Z", + "shell.execute_reply": "2023-08-18T19:50:05.087381Z" }, "id": "tglgqcZY4-W-", "outputId": "e36be9ae-0053-47ad-b673-8af3c201b537", @@ -286,7 +286,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "a365f7ffeca24e0dafff264dacb11e88", + "model_id": "e4ce2e63ecdf4ab3885d313fac2f4021", "version_major": 2, "version_minor": 0 }, @@ -310,24 +310,23 @@ "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2023-07-23T18:50:41.073726Z", - "iopub.status.busy": "2023-07-23T18:50:41.073225Z", - "iopub.status.idle": "2023-07-23T18:50:41.255087Z", - "shell.execute_reply": "2023-07-23T18:50:41.254128Z" + "iopub.execute_input": "2023-08-18T19:50:05.090755Z", + "iopub.status.busy": "2023-08-18T19:50:05.090369Z", + "iopub.status.idle": "2023-08-18T19:50:05.094853Z", + "shell.execute_reply": "2023-08-18T19:50:05.094158Z" }, "tags": [] }, "outputs": [ { - "ename": "AttributeError", - "evalue": "'Niivue' object has no attribute 'volumes'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[8], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mnv\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mvolumes\u001b[49m\n", - "\u001b[0;31mAttributeError\u001b[0m: 'Niivue' object has no attribute 'volumes'" - ] + "data": { + "text/plain": [ + "[]" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ @@ -339,23 +338,22 @@ "execution_count": 9, "metadata": { "execution": { - "iopub.execute_input": "2023-07-23T18:50:41.258863Z", - "iopub.status.busy": "2023-07-23T18:50:41.258519Z", - "iopub.status.idle": "2023-07-23T18:50:41.272205Z", - "shell.execute_reply": "2023-07-23T18:50:41.271608Z" + "iopub.execute_input": "2023-08-18T19:50:05.097527Z", + "iopub.status.busy": "2023-08-18T19:50:05.097146Z", + "iopub.status.idle": "2023-08-18T19:50:05.101295Z", + "shell.execute_reply": "2023-08-18T19:50:05.100587Z" } }, "outputs": [ { - "ename": "AttributeError", - "evalue": "'Niivue' object has no attribute 'meshes'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[9], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mnv\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmeshes\u001b[49m\n", - "\u001b[0;31mAttributeError\u001b[0m: 'Niivue' object has no attribute 'meshes'" - ] + "data": { + "text/plain": [ + "[]" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ @@ -387,124 +385,18 @@ "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { - "0b89c634b0414162bb939c37a1682906": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "6a3d0411a6a84ea897c37652f7dbe0dc": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "a365f7ffeca24e0dafff264dacb11e88": { + "0ca6f28cb1674863a9e04190c10d4cc5": { "model_module": "ipyniivue", - "model_module_version": "^1.0.2", + "model_module_version": "^1.1.0", "model_name": "NiivueModel", "state": { "_dom_classes": [], "_model_module": "ipyniivue", - "_model_module_version": "^1.0.2", + "_model_module_version": "^1.1.0", "_model_name": "NiivueModel", "_view_count": null, "_view_module": "ipyniivue", - "_view_module_version": "^1.0.2", + "_view_module_version": "^1.1.0", "_view_name": "NiivueView", "back_color": [ 0.0, @@ -551,7 +443,7 @@ "is_ruler": false, "is_slice_MM": false, "key_debounce_time": 50.0, - "layout": "IPY_MODEL_0b89c634b0414162bb939c37a1682906", + "layout": "IPY_MODEL_ff24c5008d7549f5a55df3bbfdf42ec2", "loading_text": "waiting on images...", "long_touch_timeout": 1000.0, "max_draw_undo_bitmaps": 8, @@ -583,18 +475,18 @@ "width": 640 } }, - "b2dcc3e33c9046f6b642b1aeb689bd11": { + "2e63615cc1f541fbb0ff1b3c92a108c3": { "model_module": "ipyniivue", - "model_module_version": "^1.0.2", + "model_module_version": "^1.1.0", "model_name": "NiivueModel", "state": { "_dom_classes": [], "_model_module": "ipyniivue", - "_model_module_version": "^1.0.2", + "_model_module_version": "^1.1.0", "_model_name": "NiivueModel", "_view_count": null, "_view_module": "ipyniivue", - "_view_module_version": "^1.0.2", + "_view_module_version": "^1.1.0", "_view_name": "NiivueView", "back_color": [ 0.0, @@ -641,7 +533,7 @@ "is_ruler": false, "is_slice_MM": false, "key_debounce_time": 50.0, - "layout": "IPY_MODEL_c5920afa0b8447d3ba0af3e92d23836d", + "layout": "IPY_MODEL_f90c3d2a452f467f9ffcf231a1f2a283", "loading_text": "waiting on images...", "long_touch_timeout": 1000.0, "max_draw_undo_bitmaps": 8, @@ -673,7 +565,7 @@ "width": 640 } }, - "c5920afa0b8447d3ba0af3e92d23836d": { + "b0b16c3f227b4314a1e17569cca96f70": { "model_module": "@jupyter-widgets/base", "model_module_version": "2.0.0", "model_name": "LayoutModel", @@ -726,18 +618,18 @@ "width": null } }, - "c6f8d84640e14efdbba5d9cb90b4f2d0": { + "e4ce2e63ecdf4ab3885d313fac2f4021": { "model_module": "ipyniivue", - "model_module_version": "^1.0.2", + "model_module_version": "^1.1.0", "model_name": "NiivueModel", "state": { "_dom_classes": [], "_model_module": "ipyniivue", - "_model_module_version": "^1.0.2", + "_model_module_version": "^1.1.0", "_model_name": "NiivueModel", "_view_count": null, "_view_module": "ipyniivue", - "_view_module_version": "^1.0.2", + "_view_module_version": "^1.1.0", "_view_name": "NiivueView", "back_color": [ 0.0, @@ -784,7 +676,7 @@ "is_ruler": false, "is_slice_MM": false, "key_debounce_time": 50.0, - "layout": "IPY_MODEL_6a3d0411a6a84ea897c37652f7dbe0dc", + "layout": "IPY_MODEL_b0b16c3f227b4314a1e17569cca96f70", "loading_text": "waiting on images...", "long_touch_timeout": 1000.0, "max_draw_undo_bitmaps": 8, @@ -815,6 +707,112 @@ "view_mode_hot_key": "KeyV", "width": 640 } + }, + "f90c3d2a452f467f9ffcf231a1f2a283": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "2.0.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "2.0.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "2.0.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border_bottom": null, + "border_left": null, + "border_right": null, + "border_top": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "ff24c5008d7549f5a55df3bbfdf42ec2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "2.0.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "2.0.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "2.0.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border_bottom": null, + "border_left": null, + "border_right": null, + "border_top": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } } }, "version_major": 2, diff --git a/genindex.html b/genindex.html index 0dd683e..ff276f2 100644 --- a/genindex.html +++ b/genindex.html @@ -27,7 +27,7 @@ - + @@ -35,13 +35,13 @@ - - - + + + - + @@ -349,8 +349,351 @@

Index

+ A + | B + | C + | D + | F + | G + | I + | K + | L + | M + | N + | P + | R + | S + | T + | U + | V
+

A

+ + + +
+ +

B

+ + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

F

+ + +
+ +

G

+ + + +
+ +

I

+ + + +
+ +

K

+ + +
+ +

L

+ + + +
+ +

M

+ + + +
+ +

N

+ + +
+ +

P

+ + +
+ +

R

+ + + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

U

+ + + +
+ +

V

+ + +
+
@@ -403,7 +746,7 @@

Index

diff --git a/index.html b/index.html index fb9aff2..c129250 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@ - + @@ -36,13 +36,13 @@ - - - + + + - + @@ -352,11 +352,11 @@
-

ipyniivue#

+

ipyniivue#

Version: 1.1.0

Jupyter-Niivue bridge

-

Quickstart#

+

Quickstart#

To get started with ipyniivue, install with pip:

pip install ipyniivue
 
@@ -367,7 +367,7 @@

Quickstart -

Contents#

+

Contents#

Installation and usage

@@ -486,7 +489,7 @@

Contents

- Created using Sphinx 7.0.1. + Created using Sphinx 7.2.2.

diff --git a/installing.html b/installing.html index 725e756..ebd04bd 100644 --- a/installing.html +++ b/installing.html @@ -28,7 +28,7 @@ - + @@ -36,13 +36,13 @@ - - - + + + - + @@ -379,7 +379,7 @@
-

Installation#

+

Installation#

The simplest way to install ipyniivue is via pip:

pip install ipyniivue
 
@@ -487,7 +487,7 @@ diff --git a/introduction.html b/introduction.html index b6461ae..c759aeb 100644 --- a/introduction.html +++ b/introduction.html @@ -28,7 +28,7 @@ - + @@ -36,13 +36,13 @@ - - - + + + - + @@ -379,7 +379,7 @@
diff --git a/objects.inv b/objects.inv index edb92635ef2612cc77b99aa6e11740d83a9cf04a..a1a41639a03d96203004c862ad1bc1fd13fe5c21 100644 GIT binary patch delta 3193 zcmaLVX*d*$8V7JOF@+er>`RtG*(Kx@gDiuw?~}4KW2ex_Zla8(?0fdI42C1i*wYXq zWZwoMdl?M3bMB{epL_3@-}^l8`|bVzb7;mnlR{9odMVRQptd!OGWVb09czZ2Z#XGK z@Mc1ww!OUH)T6okFfzQ>dKduL*K33BAubzThFRP5V}!jNon*0;qZ>~v(30*I_0i5S2Xs`F6!Zd9>l|T^ zM%8~@0S{l#6$Pnl`(W72Xql`nzK^+bcK4Kni)2}wKQM=h`yWbH>xX9T3s8S9 zNLN*s^0c4ues^}Dv6d{mh<%-)rnzu3iasQ9$ZYR=5B=J+x~8hKXmoSg{Rw*JN2xXM z!G@6c6YGnT0jd3W-kX+>zo_C2wOKd0p`Yaw{J2v#LkyJjo)A+K&33C!w?_f?L~#Ba zqeIh235=LY85Rw3*L~gIZ(AwoqP3CrDL~$o=Ze?KtNxik$_FxFit7brt4meBRwxMM zEy3!=&ksUU^YSWCLA|heT_@}F#*jzLd8Y32ylJv78n;TCUxKZ&XyK&3LQf<|AosM? zuQg~pqM1bmr^s&qsX`Ja;~JaRQrYf?hKA0?J$vGlX}W*ev=sb$WTIL%e&5;e1DTwKt$as4^5V@^gHp-bE!xh2FUp!Y(8~dXEAt$ypE6A= z19jY}0}UZg#nunLw89q)N6GGUk3qF49Ae zxQ5@J$@e>Ld#+8kp^^UVw5yKmt@xT{Et&`ONiKge zd3L`2iD*a?9#rG`gc>2?&t}cL9;*8jsQ|E#Ary1gZSjp*c{_8m8zt#-?-^x8lI9M* z!mKHYt~L^+B0b1Uy-jwzCcU(v&Hb<&B>eLdb=YnxiB;?DY6*#+noKl20BMCrjdr}D z{vfMjsi0z{@V9v?Q9Sw#Y%gW*@ms3&0-nQ3TYr$YP;e3lGa!Pso{F_TlJ&7ZBam(6 z8VktQr)D9S-YLvHwp1J44m%CAN`EEF=HLaw=P(r6!G$Ce3eA z{~rI;o2NsT`yq(u9*F0EiCMyrM?(Ao5dWzE6p+Uhti=Zhg;78N7MCO`ZK-Mi-k0y5 z#9**)jDTFja3ak@T&{v~JvT3W5_O}a$ibn9e^`johTlp3l~eH+C@wM8*Q|BT2+iEt zYbBv2yvWbUmF&A`9-bcjoc8Ik4jqHgu{^afo~B6F=2&Z0CNi2^jP7LI&z4$EawS}5 zR|;P=y8G~fy;#A91i$PXamkfG9EV%A9Oc&G0yI(2gPsUrV%YWeJAqFuBv3HUCwO@r zqiD++rmKq*&Yb(%O6kGpjc{*2v7q*!$tlgT@LnVHmcW#hFO+Z-{=8GRRLppEG&dvl z(2}vEFU|AGq|_GyrQO}Mw!=by6rx^adjk`YxyBy+dynZQg-8JQLtv6+Rf$>E{bROe z7!MU8U#W~P&ykfI2q3p)MV26Ju$%?g zi9(0$nxLgCg_MD+?~A+?+s|ZhNIROjV+pU#jC4Z?K*=|O*HU;RI5n(d?O3wwsi+&M znO>brbHr=YxkH$5HToodxs?Rqi$bHcftW--eZQ{TQWiDIG+T4y)xx(Dl7jlKreWCs zTHkAdm(`>ARi{#PhNf(>5t)%9Cj#||&8T>N1jS_3il5R6quig21dgHa2$rQAK^Q=u zbQ-Bqh&M+$bG@&ir+S1%Z~y+4=INq-eOpFEudj+tRapkl@3%QSwRU+6q=N?U%+5fD zRR2yZ*T7MeiT8JD-pc+^5;EZc#Yv^sO}|6+K9~|<kj)~_j2 z7M_!xYeUcQdWBU`9$S)hUUJqF5n)?4CXMrf08`d@GD65Hx4-EM8y3>MMxu9SX_``rLk zg=n81eDX#|7j7gC-%C?^2bTVhs0r^{#3MZ-66sn4n%6MECh_zwPC=#ln*;&HzT^*- zQRebpuC)3dq1)8N;`t7Oj@r~Q_aP9oaCa#^!rPDkS59@9`;cS!({V=%{}#nq5thhR z9{z7$K$n{D6gA?hJGmLje9!SES0=205m{Y1{*Rm6(tFVGZZ^` zcDf{4!XMak2(-LY_h~#bnUZXyVGP6v?^a(4R1=%%B-c~Ol+xl8EWhrx0LHR~C=?%( z*!bl0iFOoSH-WFF-+jIoJF-42RymZ-B zb^$emv{D{PxaB2TBm?r?m4OP+%cd>9s3xY{nb*gF@=Ou@@$~+HILT-B$;);nLuVb? zJ9VS#GtUqPsoPQm?v6S-Y^YVsl8weTV(nh3srwRA;;{9!mNbe6BOOG@h?bT?mu1}n z((uK+cmsVct73QKQPouH{k`LaPn+fwHge5g4w&Jq3bB*cVLZCPtNfeNNmBh+nwt*0!xca{2l=0amIv){xIf$}=)53YQH@^UkL8+1)?S`U5w z)MpoKc8VY?{>d?*d~9sEA$e3+%@5-@3qZZ>m(> zhPNM79D`FEx92NW$028uM`0&jOJpa{MhMxXM)^((Qc%K#`RjXLOGQSx7BBkqIlhAe zz8DR>w2~oG)s7YQ;E^a{XWyh^-$goq*=-}t=jDO`ACuXe@}@>K^E5)g$;*NcaRfnZ ze_640cVCLthSg_HXnCGs+&3F!?6dF^9X3u*#v7T0Exn!j3wp>-j8(4q&DWimo7E#e zBKkN!ax*SJ#R={F*e{OGIP=8ndWEIX2_Ln)2(+D(oPem2EP_)*NurEbOgy!Bh;q>Q zZ3FLYzNJo}V4j29n#gsYyT2}))@6i&?N5TgT;PoNu+6EgI@1B9wPPe#7q~-Z-P@B) zzggjgwtc38h-tib033oGJnrL4P`+-w4&%AXQj!sARl|89I6s$V5N`|c5hUi}^dCiu zLh3_ka~97&>L!gCBOl|9qFVWjI$$4JSM0=6i@&1ULE? Ut9;$WVo@IR+hm3i*oMo$0DG492LJ#7 delta 815 zcmV+~1JL}{8J!1^dw*BKa@!yfz56SeQLiMEYj2sP)A1plH0d;FENyJY2vop!{P#r& zBqSpVIXMZI_uek-g5Z`^^hPR;lrFwAvH^zh9jc8xT{3k4yhbnZ4ib0{t6K-o%oj^< zj#CGiflvWQV4}j5D@_=?j9>_`(L6RrkjR;%LRsNq-a0QG;eU)fD}igwg$6YmcK`_^ zug&OJZ5|QJF03i?5mt)BTcWk3n}Y^ih+LUA-=<6{&THn`_R+hLs0A)^pLJbqRB)$q zbzl>ci$czUF|5u!H~5s5>f!AQy*3@Ru8Yd-1%>W&DU?DF2AbqEbM2;5YY9xO1g?>4 zaY%D|%OkGNSbr;Af>LCgxKKliU8^VGMH|p30FIu|dM7v{yg+}>6{uX&N+*Vp<+}sl z*J@Y9(vcrrBh_mGo5Qy5VckZIwZN5~iUZG=b~LC|?MIKZtM+PfNDIH59+x_$Eocq$ zx{y8hXY);U+4it21wThq3c=*B3Mp0li_1}cVii62b${6^o(R?U{5!!$iF^|qkWoD?MRCYA75s*880Gs> z!2oH)TL+eD$*iENV&q&`9KlDy4kh4sDN3w&U`}C^Q4TuQarT&`)}atV4GPsLWKhVX zX5yx0C4Zz=$&sxc-hJoPn`;)SZRsvTQrMYw*4Y*~3rGv{eWY+|(!)ef7%nAsiAr|; zcOdcfvi1^g$fVT{Av5F>yc*kH!LFj!nNxZ^gy1X}rXct*)4?Wc0S~SbvRlbfdWVR* z|97DI-lS5Fh8;qFx6N9^RzUR95sbMF8&*r7nSasZZjx;QLxmt|5%1Fn#*jTxp_kP` zM+?)u!YtX`ejLnEqU7C;w%2_zjfN*r*6vq zA7bce@{b!mm`2!>WxfU8d2S2ZTRp)vR~G?B&#du(#&ExW>+jZXxbI`)h!~su%#=$} tL@1_gvgij~1`UCMn|v@jLvv~Fu@w-R@A|~X=IXNPXK)qm - + @@ -34,13 +34,13 @@ - - - + + + - + @@ -427,7 +427,7 @@

Search

diff --git a/searchindex.js b/searchindex.js index 5f77e77..9480dc4 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["api", "develop-install", "development-notes", "development-notes/attribute-docstrings", "development-notes/cell-syncing", "development-notes/py-ts-messaging", "examples/index", "examples/introduction", "index", "installing", "introduction"], "filenames": ["api.rst", "develop-install.rst", "development-notes.rst", "development-notes/attribute-docstrings.rst", "development-notes/cell-syncing.rst", "development-notes/py-ts-messaging.rst", "examples/index.rst", "examples/introduction.nblink", "index.rst", "installing.rst", "introduction.rst"], "titles": ["API Reference", "Developer install", "Development Notes", "Docstrings for attributes", "Syncing Instances Across Cells", "Messaging between Python and Typescript", "Examples", "Introduction", "ipyniivue", "Installation", "Introduction"], "terms": {"To": [1, 5, 8], "version": [1, 8, 9], "ipyniivu": [1, 3, 4, 5, 7, 9], "you": [1, 3, 5, 7, 9], "first": [1, 7], "need": [1, 5, 7, 9], "clone": 1, "repositori": 1, "git": 1, "http": [1, 5, 7], "github": [1, 7], "com": [1, 5], "niivu": [1, 3, 4, 5, 7, 8], "cd": 1, "next": [1, 5], "us": [1, 3, 5, 6, 7, 9], "pip": [1, 7, 8, 9], "e": [1, 4], "If": [1, 4, 9], "ar": [1, 3, 4, 5, 6, 9], "plan": 1, "work": 1, "j": 1, "frontend": 1, "code": 1, "should": [1, 3, 9], "also": [1, 7, 9], "do": [1, 3, 5], "link": [1, 6], "extens": [1, 9], "jupyt": [1, 3, 5, 6, 8, 9], "nbextens": [1, 9], "sy": [1, 9], "prefix": [1, 9], "user": [1, 9], "system": [1, 9], "symlink": 1, "py": [1, 9], "enabl": [1, 9], "appropri": [1, 9], "flag": [1, 7, 9], "Or": 1, "jupyterlab": [1, 9], "labextens": [1, 9], "docstr": [2, 8], "attribut": [2, 7, 8], "sync": [2, 8], "instanc": [2, 8], "across": [2, 8], "cell": [2, 5, 7, 8], "messag": [2, 8], "between": [2, 8], "python": [2, 8], "typescript": [2, 8], "In": [3, 7], "2": [3, 4, 5, 7], "commonli": 3, "wai": [3, 9], "get": [3, 8], "inform": 3, "an": [3, 4, 5, 7], "object": [3, 7], "1": [3, 4, 5, 7, 8], "help": 3, "function": [3, 5], "exampl": [3, 5, 7, 8], "append": 3, "put": 3, "end": [3, 5, 9], "test": [3, 7], "These": 3, "implement": [3, 4, 5], "here": [3, 5, 10], "some": [3, 5], "from": [3, 5, 6], "import": [3, 6], "back_color": 3, "thumbnail": 3, "add_volum": [3, 7], "howev": 3, "when": [3, 5], "follow": [3, 5], "nv": [3, 5, 7], "The": [3, 4, 5, 6, 9], "doe": 3, "show": [3, 5, 7], "thi": [3, 4, 5, 6, 7], "i": [3, 4, 5, 6, 9], "intend": 3, "behavior": 3, "sinc": 3, "option": 3, "widget": [3, 5, 6], "modifi": 3, "directli": [3, 7], "instead": [3, 5], "setter": 3, "ha": [4, 7], "alreadi": 4, "been": [4, 6], "displai": [4, 5, 6], "again": 4, "differ": 4, "older": 4, "": [4, 5], "becom": 4, "non": 4, "interact": [4, 5], "reason": [4, 5], "current": 4, "ani": 4, "callback": [4, 5], "state": [4, 5], "save": [4, 5], "transfer": [4, 5], "each": [4, 5], "new": 4, "niivueview": 4, "previou": 4, "view": [4, 6], "niivuemodel": 4, "frozen": 4, "allow": 4, "progress": 4, "over": [4, 5], "commun": 5, "side": 5, "On": 5, "domwidget": 5, "send": 5, "command": [5, 9], "buffer": 5, "domwidgetmodel": 5, "content": 5, "custom": 5, "name": 5, "arg": 5, "where": 5, "call": [5, 7], "list": 5, "larg": 5, "data": 5, "save_scen": 5, "which": 5, "webgl2": 5, "canva": 5, "png": 5, "format": 5, "bitmap": 5, "savescen": 5, "filenam": 5, "process": 5, "0": [5, 7, 8], "run": [5, 7, 9], "note": [5, 7, 8], "out": 5, "case": [5, 7], "switch": 5, "statement": 5, "someth": 5, "like": [5, 7], "appli": 5, "await": 5, "all": 5, "would": 5, "result": 5, "perform": 5, "drop": 5, "describ": 5, "stackoverflow": 5, "55276645": 5, "respons": 5, "back": 5, "run_custom_cod": 5, "colormap": 5, "done": 5, "print": 5, "actc": 5, "bcgwhw": 5, "bcgwhw_dark": 5, "blue": 5, "blue2r": 5, "bluegrn": 5, "bone": 5, "bronz": 5, "cividi": 5, "cool": 5, "copper": 5, "copper2": 5, "ct_airwai": 5, "ct_arteri": 5, "ct_bone": 5, "ct_brain": 5, "ct_brain_grai": 5, "ct_cardiac": 5, "ct_head": 5, "ct_kidnei": 5, "ct_liver": 5, "ct_muscl": 5, "ct_scalp": 5, "ct_skull": 5, "ct_soft": 5, "ct_soft_tissu": 5, "ct_surfac": 5, "ct_vessel": 5, "ct_w_contrast": 5, "cubehelix": 5, "electric_blu": 5, "freesurf": 5, "ge_color": 5, "gold": 5, "grai": 5, "green": 5, "hot": 5, "hotiron": 5, "hsv": 5, "inferno": 5, "jet": 5, "linspec": 5, "magma": 5, "mako": 5, "nih": 5, "plasma": 5, "random": 5, "red": 5, "redyel": 5, "rocket": 5, "surfac": 5, "turbo": 5, "violet": 5, "viridi": 5, "warm": 5, "winter": 5, "x_rain": 5, "eval": 5, "evalu": 5, "javascript": 5, "ui": 5, "poll": 5, "librari": [5, 7], "block": 5, "while": 5, "without": [5, 7], "loop": 5, "prevent": 5, "come": 5, "5mb": 5, "disconnect": 5, "greater": 5, "than": 5, "10mb": 5, "sent": 5, "see": 5, "ipywidget": 5, "2522": 5, "straightforward": 5, "error": 5, "on_msg": 5, "_handle_frontend_msg": 5, "shown": 5, "log": 5, "retriev": 5, "look": 5, "traffic": 5, "open": 5, "develop": 5, "tool": 5, "network": 5, "w": 5, "Then": 5, "find": 5, "connect": 5, "about": 5, "down": 5, "arrow": 5, "incom": 5, "up": 5, "outgo": 5, "chrome": 5, "after": 5, "correct": 5, "tab": 5, "through": 5, "channel": 5, "iopub": 5, "msg_type": 5, "below": 5, "right": 5, "click": 5, "traceback": [5, 7], "under": 5, "copi": 5, "valu": 5, "go": 5, "consol": 5, "defin": 5, "variabl": 5, "set": 5, "just": [5, 9], "For": 5, "purpos": [5, 6, 10], "demonstr": [5, 6], "let": 5, "assum": 5, "can": [5, 7], "const": 5, "section": 6, "contain": 6, "sever": 6, "gener": 6, "notebook": [6, 7, 9], "have": [6, 7, 9], "embed": 6, "page": 6, "add": [6, 10], "folder": 6, "similar": 6, "initi": 6, "one": 6, "manual": 6, "step": 6, "ensur": 6, "onli": 6, "those": 6, "suit": 6, "inclus": 6, "introduct": [6, 8], "instal": 6, "local": 6, "mri": 6, "volum": 6, "internet": 6, "how": 7, "visual": 7, "server": 7, "virtual": 7, "environ": 7, "googl": 7, "colab": 7, "build": 7, "sourc": 7, "try": 7, "q": 7, "silenc": 7, "output": 7, "remov": 7, "debug": 7, "issu": 7, "enable_custom_widget_manag": 7, "except": 7, "pass": 7, "mai": 7, "restart": 7, "kernel": 7, "updat": 7, "packag": 7, "other": 7, "demo": 7, "nibabel": 7, "pytest": 7, "3": [7, 9], "pathlib": 7, "path": 7, "nib": 7, "data_path": 7, "store": 7, "part": 7, "file": 7, "we": 7, "add_object": 7, "method": 7, "becaus": 7, "4": 7, "example_4d_fnam": 7, "example4d": 7, "nii": 7, "gz": 7, "img": 7, "load": 7, "crosshair_color": 7, "5": [7, 9], "is_colorbar": 7, "true": 7, "could": 7, "6": 7, "str": 7, "remot": 7, "download": 7, "them": [7, 9], "directori": 7, "7": 7, "io": 7, "imag": 7, "mni152": 7, "8": 7, "attributeerror": 7, "most": 7, "recent": 7, "last": 7, "line": 7, "gt": 7, "39": 7, "9": 7, "mesh": 7, "bridg": 8, "start": 8, "conda": [8, 9], "simplest": 9, "via": 9, "configur": 9, "front": 9, "well": 9, "classic": 9, "oppos": 9, "unnecessari": 9, "same": 9, "make": 9, "sure": 9, "choos": 9, "prose": 10, "explain": 10, "project": 10, "usag": 10}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"api": [0, 8], "refer": [0, 8], "develop": [1, 2, 8], "instal": [1, 7, 8, 9], "note": 2, "docstr": 3, "attribut": 3, "sync": 4, "instanc": 4, "across": 4, "cell": 4, "messag": 5, "between": 5, "python": 5, "typescript": 5, "setter": 5, "getter": 5, "wait": 5, "websocket": 5, "chunk": 5, "debug": 5, "exampl": 6, "todo": [6, 10], "introduct": [7, 10], "import": 7, "view": 7, "local": 7, "mri": 7, "volum": 7, "displai": 7, "from": 7, "internet": 7, "ipyniivu": 8, "quickstart": 8, "content": 8, "usag": 8}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "nbsphinx": 4, "sphinx": 57}, "alltitles": {"API Reference": [[0, "api-reference"], [8, null]], "Developer install": [[1, "developer-install"]], "Development Notes": [[2, "development-notes"]], "Docstrings for attributes": [[3, "docstrings-for-attributes"]], "Syncing Instances Across Cells": [[4, "syncing-instances-across-cells"]], "Messaging between Python and Typescript": [[5, "messaging-between-python-and-typescript"]], "Setters": [[5, "setters"]], "Getters": [[5, "getters"]], "Wait for Websocket messages": [[5, "wait-for-websocket-messages"]], "Chunking": [[5, "chunking"]], "Debugging TypeScript to Python messages": [[5, "debugging-typescript-to-python-messages"]], "Examples": [[6, "examples"]], "Todo": [[6, "id1"], [10, "id1"]], "Introduction": [[7, "Introduction"], [10, "introduction"]], "Installation": [[7, "Installation"], [9, "installation"]], "Imports": [[7, "Imports"]], "Viewing a local MRI volume": [[7, "Viewing-a-local-MRI-volume"]], "Displaying a volume from the internet": [[7, "Displaying-a-volume-from-the-internet"]], "ipyniivue": [[8, "ipyniivue"]], "Quickstart": [[8, "quickstart"]], "Contents": [[8, "contents"]], "Installation and usage": [[8, null]], "Development": [[8, null]]}, "indexentries": {}}) \ No newline at end of file +Search.setIndex({"docnames": ["api", "develop-install", "development-notes", "development-notes/attribute-docstrings", "development-notes/cell-syncing", "development-notes/py-ts-messaging", "examples/index", "examples/introduction", "index", "installing", "introduction"], "filenames": ["api.rst", "develop-install.rst", "development-notes.rst", "development-notes/attribute-docstrings.rst", "development-notes/cell-syncing.rst", "development-notes/py-ts-messaging.rst", "examples/index.rst", "examples/introduction.nblink", "index.rst", "installing.rst", "introduction.rst"], "titles": ["API Reference", "Developer install", "Development Notes", "Docstrings for attributes", "Syncing Instances Across Cells", "Messaging between Python and Typescript", "Examples", "Introduction", "ipyniivue", "Installation", "Introduction"], "terms": {"class": 0, "ipyniivu": [0, 1, 3, 4, 5, 7, 9], "niivu": [0, 1, 3, 4, 5, 7, 8], "kwarg": 0, "ani": [0, 4], "sourc": [0, 7], "text_height": 0, "float": 0, "text": 0, "height": 0, "orient": 0, "label": 0, "0": [0, 5, 7, 8], "1": [0, 3, 4, 5, 7, 8], "zero": 0, "default": 0, "i": [0, 3, 4, 5, 6, 9], "06": 0, "colorbar_height": 0, "size": 0, "colorbar": 0, "fraction": 0, "nifti": 0, "j": [0, 1], "dimens": 0, "05": 0, "colorbar_margin": 0, "pad": 0, "around": 0, "when": [0, 3, 5], "displai": [0, 4, 5, 6], "crosshair_width": 0, "crosshair": 0, "ruler_width": 0, "ruler": 0, "4": [0, 7], "back_color": [0, 3], "list": [0, 5], "background": 0, "color": 0, "rgba": 0, "valu": [0, 5], "from": [0, 3, 5, 6], "black": 0, "crosshair_color": [0, 7], "red": [0, 5], "selection_box_color": 0, "select": 0, "box": 0, "intensti": 0, "shown": [0, 5], "right": [0, 5], "click": [0, 5], "drag": 0, "transpar": 0, "white": 0, "5": [0, 7, 9], "clip_plane_color": 0, "visibl": 0, "clip": 0, "plane": 0, "ruler_color": 0, "transluc": 0, "8": [0, 7], "show_3d_crosshair": 0, "bool": 0, "true": [0, 7], "fals": 0, "whether": 0, "ar": [0, 1, 3, 4, 5, 6, 9], "3d": 0, "render": 0, "trust_cal_min_max": 0, "trust": 0, "header": 0, "cal_min": 0, "cal_max": 0, "them": [0, 7, 9], "result": [0, 5], "faster": 0, "load": [0, 7], "becaus": [0, 7], "we": [0, 7], "skip": 0, "comput": 0, "data": [0, 5], "clip_plane_hot_kei": 0, "str": [0, 7], "keyboard": 0, "kei": 0, "us": [0, 1, 3, 5, 6, 7, 9], "cycl": 0, "through": [0, 5], "keyc": 0, "view_mode_hot_kei": 0, "view": [0, 4, 6], "mode": 0, "keyv": 0, "key_debounce_tim": 0, "keyup": 0, "debounc": 0, "time": 0, "millisecond": 0, "you": [0, 1, 3, 5, 7, 9], "must": 0, "wait": 0, "thi": [0, 3, 4, 5, 6, 7], "long": 0, "befor": 0, "new": [0, 4], "hot": [0, 5], "keystrok": 0, "regist": 0, "event": 0, "listen": 0, "The": [0, 3, 4, 5, 6, 9], "50": 0, "m": 0, "double_touch_timeout": 0, "maximum": 0, "doubl": 0, "touch": 0, "detect": 0, "500": 0, "long_touch_timeout": 0, "minimum": 0, "count": 0, "1000": 0, "is_radiological_convent": 0, "radiolog": 0, "convent": 0, "loading_text": 0, "blank": 0, "canva": [0, 5], "imag": [0, 7], "drag_and_drop_en": 0, "allow": [0, 4], "file": [0, 7], "url": 0, "drop": [0, 5], "is_nearest_interpol": 0, "nearest": 0, "neighbor": 0, "interpol": 0, "els": 0, "linear": 0, "is_atlas_outlin": 0, "atla": 0, "map": 0, "onli": [0, 6], "boundari": 0, "region": 0, "is_rul": 0, "10cm": 0, "is_colorbar": [0, 7], "": [0, 4, 5], "illustr": 0, "is_orient_cub": 0, "cube": 0, "multiplanar_pad_pixel": 0, "int": 0, "space": 0, "between": [0, 2, 8], "tile": 0, "multiplanar": 0, "mesh_thickness_on_2d": 0, "2d": 0, "slice": 0, "can": [0, 5, 7], "show": [0, 3, 5, 7], "mesh": [0, 7], "within": 0, "rang": 0, "slicemm": 0, "world": 0, "infin": 0, "drag_mod": 0, "behavior": [0, 3], "string": 0, "none": 0, "contrast": 0, "measur": 0, "pan": 0, "slicer_3d": 0, "integ": 0, "2": [0, 3, 4, 5, 7], "3": [0, 7, 9], "is_depth_pick_mesh": 0, "both": 0, "voxel": 0, "base": 0, "depth": 0, "pick": 0, "abl": 0, "is_corner_orientation_text": 0, "should": [0, 1, 3, 9], "upper": 0, "corner": 0, "instead": [0, 3, 5], "center": 0, "left": 0, "top": 0, "ax": 0, "sagittal_nose_left": 0, "sagitt": 0, "anterior": 0, "direct": 0, "toward": 0, "is_slice_mm": 0, "align": 0, "is_high_resolution_cap": 0, "demand": 0, "high": 0, "dot": 0, "per": 0, "inch": 0, "nativ": 0, "drawing_en": 0, "user": [0, 1, 9], "creat": 0, "edit": 0, "draw": 0, "pen_valu": 0, "mous": 0, "is_filled_pen": 0, "fill": 0, "max_draw_undo_bitmap": 0, "number": 0, "possibl": 0, "undo": 0, "step": [0, 6], "thumbnail": [0, 3], "option": [0, 3], "png": [0, 5], "bitmap": [0, 5], "rapidli": 0, "defer": 0, "slow": 0, "add_mesh_from_url": 0, "add": [0, 6, 10], "add_object": [0, 7], "img": [0, 7], "nibabel": [0, 7], "nifti1": 0, "nifti1imag": 0, "object": [0, 3, 7], "volum": [0, 6], "add_volum": [0, 3, 7], "dict": 0, "nvimag": 0, "path": [0, 7], "either": 0, "local": [0, 6], "add_volume_from_url": 0, "an": [0, 3, 4, 5, 7], "link": [0, 1, 6], "accept": 0, "create_empty_draw": 0, "gener": [0, 6], "pen": 0, "tool": [0, 5], "draw_grow_cut": 0, "dilat": 0, "so": 0, "all": [0, 5], "work": [0, 1], "multipl": 0, "draw_mosa": 0, "mosaic_str": 0, "lightbox": 0, "montag": 0, "specifi": 0, "A": 0, "c": 0, "locat": 0, "draw_otsu": 0, "level": 0, "remov": [0, 7], "dark": 0, "air": 0, "segment": 0, "brain": 0, "mani": 0, "type": 0, "font_color": 0, "font": 0, "grai": [0, 5], "get_descript": 0, "layer": 0, "mask": 0, "basic": 0, "statist": 0, "id": 0, "get_frame_4d": 0, "determin": 0, "activ": 0, "4d": 0, "seri": 0, "get_media_by_url": 0, "find": [0, 5], "media": 0, "nvmesh": 0, "get_overlay_index_by_id": 0, "get": [0, 3, 8], "index": 0, "overlai": 0, "its": 0, "uniqu": 0, "assign": 0, "properti": 0, "get_radiological_convent": 0, "neurolog": 0, "get_volume_index_by_id": 0, "drawingen": 0, "is_mesh_ext": 0, "boolean": 0, "filenam": [0, 5], "end": [0, 3, 5, 9], "extens": [0, 1, 9], "trk": 0, "pial": 0, "etc": 0, "filepath": 0, "load_connectom": 0, "connectom": 0, "dictionari": 0, "json": 0, "model": 0, "load_document_from_url": 0, "document": 0, "nvdocument": 0, "load_drawing_from_url": 0, "is_binar": 0, "open": [0, 5], "binar": 0, "load_mesh": 0, "mesh_list": 0, "arrai": 0, "todo": 0, "mix": 0, "load_volum": 0, "volume_list": 0, "slice_mm": 0, "move_crosshair_in_vox": 0, "x": 0, "y": 0, "z": 0, "move": 0, "fix": 0, "mm": 0, "translat": 0, "posterior": 0, "inferior": 0, "superior": 0, "multiplanar_force_rend": 0, "alwai": 0, "remove_haz": 0, "vol_index": 0, "larger": 0, "more": 0, "preserv": 0, "dehaz": 0, "remove_mesh_by_url": 0, "triangul": 0, "tractogram": 0, "delet": 0, "remove_volume_by_index": 0, "remove_volume_by_url": 0, "ad": 0, "reverse_fac": 0, "mesh_id": 0, "revers": 0, "triangl": 0, "wind": 0, "swap": 0, "front": [0, 9], "back": [0, 5], "face": 0, "ident": 0, "chang": 0, "run_custom_cod": [0, 5], "code": [0, 1], "timeout": 0, "60": 0, "log": [0, 5], "run": [0, 5, 7, 9], "custom": [0, 5], "javascript": [0, 5], "snippet": 0, "finish": 0, "second": 0, "save_imag": 0, "is_save_draw": 0, "save": [0, 4, 5], "disk": 0, "save_scen": [0, 5], "webgl2": [0, 5], "format": [0, 5], "screen": 0, "captur": 0, "set_clip_plan": 0, "depth_azimuth_elev": 0, "updat": [0, 7], "two": 0, "compon": 0, "vector": 0, "azimuth": 0, "elev": 0, "camera": 0, "posit": 0, "degre": 0, "typic": 0, "360": 0, "180": 0, "90": 0, "set_clip_plane_color": 0, "set": [0, 5], "expect": 0, "set_color_map": 0, "color_map": 0, "colormap": [0, 5], "given": 0, "name": [0, 5], "set_color_map_neg": 0, "color_map_neg": 0, "neg": 0, "set_crosshair_color": 0, "set_crosshair_width": 0, "thick": 0, "width": 0, "set_custom_mesh_shad": 0, "fragment_shader_text": 0, "shader": 0, "fragment": 0, "titl": 0, "set_draw_opac": 0, "opac": 0, "control": 0, "opaqu": 0, "set_drawing_en": 0, "doe": [0, 3], "over": [0, 4, 5], "enabl": [0, 1, 9], "set_frame_4d": 0, "frame_4d": 0, "desir": 0, "set_high_resolution_cap": 0, "forc": 0, "webgl": 0, "resolut": 0, "regardless": 0, "browser": 0, "dpi": 0, "set_interpol": 0, "is_nearest": 0, "set_mesh_layer_properti": 0, "val": 0, "e": [0, 1, 4], "g": 0, "gifti": 0, "stc": 0, "attribut": [0, 2, 8], "set_mesh_properti": 0, "set_mesh_shad": 0, "mesh_shad": 0, "identifi": 0, "usag": [0, 10], "set_mesh_thickness_on_2d": 0, "limit": 0, "requir": 0, "distanc": 0, "inf": 0, "entir": 0, "hide": 0, "set_modulation_imag": 0, "id_target": 0, "id_modul": 0, "modulate_alpha": 0, "modul": 0, "intens": 0, "one": [0, 6], "anoth": 0, "bias": 0, "bia": 0, "disabl": 0, "influenc": 0, "alpha": 0, "rgb": 0, "set_opac": 0, "vol_idx": 0, "new_opac": 0, "valid": 0, "effect": 0, "scene": 0, "set_pan_2d_xyzmm": 0, "xyzmm_zoom": 0, "adjust": 0, "offset": 0, "scale": 0, "slicescal": 0, "first": [0, 1, 7], "three": 0, "spatial": 0, "fourth": 0, "set_pen_valu": 0, "style": 0, "flood": 0, "shape": 0, "set_radiological_convent": 0, "set_render_azimuth_elev": 0, "rotat": 0, "which": [0, 5], "angl": 0, "how": [0, 7], "up": [0, 5], "set_scal": 0, "zoom": 0, "set_selection_box_color": 0, "drawn": 0, "set_slice_mm": 0, "bewar": 0, "like": [0, 5, 7], "set_slice_mosaic_str": 0, "descript": 0, "multi": 0, "mosaic": 0, "aka": 0, "exampl": [0, 3, 5, 7, 8], "would": [0, 5], "20": 0, "30": 0, "42": 0, "set_slice_typ": 0, "slice_typ": 0, "nv": [0, 3, 5, 7], "axial": 0, "coron": 0, "These": [0, 3], "enumer": 0, "also": [0, 1, 7, 9], "input": 0, "directli": [0, 3, 7], "set_text_orient": 0, "is_at_corn": 0, "appear": 0, "side": [0, 5], "alia": 0, "slicetyp": 0, "undo_draw": 0, "restor": 0, "previou": [0, 4], "state": [0, 4, 5], "update_gl_volum": 0, "after": [0, 5], "make": [0, 9], "alter": 0, "manual": [0, 6], "outsid": 0, "setter": [0, 3], "method": [0, 7], "To": [1, 5, 8], "version": [1, 8, 9], "need": [1, 5, 7, 9], "clone": 1, "repositori": 1, "git": 1, "http": [1, 5, 7], "github": [1, 7], "com": [1, 5], "cd": 1, "next": [1, 5], "pip": [1, 7, 8, 9], "If": [1, 4, 9], "plan": 1, "frontend": 1, "do": [1, 3, 5], "jupyt": [1, 3, 5, 6, 8, 9], "nbextens": [1, 9], "sy": [1, 9], "prefix": [1, 9], "system": [1, 9], "symlink": 1, "py": [1, 9], "appropri": [1, 9], "flag": [1, 7, 9], "Or": 1, "jupyterlab": [1, 9], "labextens": [1, 9], "docstr": [2, 8], "sync": [2, 8], "instanc": [2, 8], "across": [2, 8], "cell": [2, 5, 8], "messag": [2, 8], "python": [2, 8], "typescript": [2, 8], "In": 3, "commonli": 3, "wai": [3, 9], "inform": 3, "help": 3, "function": [3, 5], "append": 3, "put": 3, "test": [3, 7], "implement": [3, 4, 5], "here": [3, 5, 10], "some": [3, 5], "import": [3, 6], "howev": 3, "follow": [3, 5], "intend": 3, "sinc": 3, "widget": [3, 5, 6], "modifi": 3, "ha": 4, "alreadi": 4, "been": [4, 6], "again": 4, "differ": 4, "older": 4, "becom": 4, "non": 4, "interact": [4, 5], "reason": [4, 5], "current": 4, "callback": [4, 5], "transfer": [4, 5], "each": [4, 5], "niivueview": 4, "niivuemodel": 4, "frozen": 4, "progress": 4, "commun": 5, "On": 5, "domwidget": 5, "send": 5, "command": [5, 9], "buffer": 5, "domwidgetmodel": 5, "content": 5, "arg": 5, "where": 5, "call": 5, "larg": 5, "savescen": 5, "process": 5, "note": [5, 7, 8], "out": 5, "case": [5, 7], "switch": 5, "statement": 5, "someth": 5, "appli": 5, "await": 5, "perform": 5, "describ": 5, "stackoverflow": 5, "55276645": 5, "respons": 5, "done": 5, "print": 5, "actc": 5, "bcgwhw": 5, "bcgwhw_dark": 5, "blue": 5, "blue2r": 5, "bluegrn": 5, "bone": 5, "bronz": 5, "cividi": 5, "cool": 5, "copper": 5, "copper2": 5, "ct_airwai": 5, "ct_arteri": 5, "ct_bone": 5, "ct_brain": 5, "ct_brain_grai": 5, "ct_cardiac": 5, "ct_head": 5, "ct_kidnei": 5, "ct_liver": 5, "ct_muscl": 5, "ct_scalp": 5, "ct_skull": 5, "ct_soft": 5, "ct_soft_tissu": 5, "ct_surfac": 5, "ct_vessel": 5, "ct_w_contrast": 5, "cubehelix": 5, "electric_blu": 5, "freesurf": 5, "ge_color": 5, "gold": 5, "green": 5, "hotiron": 5, "hsv": 5, "inferno": 5, "jet": 5, "linspec": 5, "magma": 5, "mako": 5, "nih": 5, "plasma": 5, "random": 5, "redyel": 5, "rocket": 5, "surfac": 5, "turbo": 5, "violet": 5, "viridi": 5, "warm": 5, "winter": 5, "x_rain": 5, "eval": 5, "evalu": 5, "ui": 5, "poll": 5, "librari": [5, 7], "block": 5, "while": 5, "without": [5, 7], "loop": 5, "prevent": 5, "come": 5, "5mb": 5, "disconnect": 5, "greater": 5, "than": 5, "10mb": 5, "sent": 5, "see": 5, "ipywidget": 5, "2522": 5, "straightforward": 5, "error": 5, "on_msg": 5, "_handle_frontend_msg": 5, "retriev": 5, "look": 5, "traffic": 5, "develop": 5, "network": 5, "w": 5, "Then": 5, "connect": 5, "about": 5, "down": 5, "arrow": 5, "incom": 5, "outgo": 5, "chrome": 5, "correct": 5, "tab": 5, "channel": 5, "iopub": 5, "msg_type": 5, "below": 5, "traceback": 5, "under": 5, "copi": 5, "go": 5, "consol": 5, "defin": 5, "variabl": 5, "just": [5, 9], "For": 5, "purpos": [5, 6, 10], "demonstr": [5, 6], "let": 5, "assum": 5, "const": 5, "section": 6, "contain": 6, "sever": 6, "notebook": [6, 7, 9], "have": [6, 7, 9], "embed": 6, "page": 6, "folder": 6, "similar": 6, "initi": 6, "ensur": 6, "those": 6, "suit": 6, "inclus": 6, "introduct": [6, 8], "instal": 6, "mri": 6, "internet": 6, "visual": 7, "server": 7, "virtual": 7, "environ": 7, "googl": 7, "colab": 7, "build": 7, "try": 7, "q": 7, "silenc": 7, "output": 7, "debug": 7, "issu": 7, "enable_custom_widget_manag": 7, "except": 7, "pass": 7, "mai": 7, "restart": 7, "kernel": 7, "packag": 7, "other": 7, "demo": 7, "pytest": 7, "pathlib": 7, "nib": 7, "data_path": 7, "store": 7, "part": 7, "example_4d_fnam": 7, "example4d": 7, "nii": 7, "gz": 7, "could": 7, "6": 7, "remot": 7, "download": 7, "directori": 7, "7": 7, "io": 7, "mni152": 7, "9": 7, "bridg": 8, "start": 8, "conda": [8, 9], "simplest": 9, "via": 9, "configur": 9, "well": 9, "classic": 9, "oppos": 9, "unnecessari": 9, "same": 9, "sure": 9, "choos": 9, "prose": 10, "explain": 10, "project": 10}, "objects": {"ipyniivue": [[0, 0, 1, "", "Niivue"]], "ipyniivue.Niivue": [[0, 1, 1, "", "add_mesh_from_url"], [0, 1, 1, "", "add_object"], [0, 1, 1, "", "add_volume"], [0, 1, 1, "", "add_volume_from_url"], [0, 2, 1, "", "back_color"], [0, 2, 1, "", "clip_plane_color"], [0, 2, 1, "", "clip_plane_hot_key"], [0, 2, 1, "", "colorbar_height"], [0, 2, 1, "", "colorbar_margin"], [0, 1, 1, "", "create_empty_drawing"], [0, 2, 1, "", "crosshair_color"], [0, 2, 1, "", "crosshair_width"], [0, 2, 1, "", "double_touch_timeout"], [0, 2, 1, "", "drag_and_drop_enabled"], [0, 2, 1, "", "drag_mode"], [0, 1, 1, "", "draw_grow_cut"], [0, 1, 1, "", "draw_mosaic"], [0, 1, 1, "", "draw_otsu"], [0, 2, 1, "", "drawing_enabled"], [0, 2, 1, "", "font_color"], [0, 1, 1, "", "get_descriptives"], [0, 1, 1, "", "get_frame_4D"], [0, 1, 1, "", "get_media_by_url"], [0, 1, 1, "", "get_overlay_index_by_ID"], [0, 1, 1, "", "get_radiological_convention"], [0, 1, 1, "", "get_volume_index_by_ID"], [0, 2, 1, "", "is_atlas_outline"], [0, 2, 1, "", "is_colorbar"], [0, 2, 1, "", "is_corner_orientation_text"], [0, 2, 1, "", "is_depth_pick_mesh"], [0, 2, 1, "", "is_filled_pen"], [0, 2, 1, "", "is_high_resolution_capable"], [0, 1, 1, "", "is_mesh_ext"], [0, 2, 1, "", "is_nearest_interpolation"], [0, 2, 1, "", "is_orient_cube"], [0, 2, 1, "", "is_radiological_convention"], [0, 2, 1, "", "is_ruler"], [0, 2, 1, "", "is_slice_MM"], [0, 2, 1, "", "key_debounce_time"], [0, 1, 1, "", "load_connectome"], [0, 1, 1, "", "load_document_from_url"], [0, 1, 1, "", "load_drawing_from_url"], [0, 1, 1, "", "load_meshes"], [0, 1, 1, "", "load_volumes"], [0, 2, 1, "", "loading_text"], [0, 2, 1, "", "long_touch_timeout"], [0, 2, 1, "", "max_draw_undo_bitmaps"], [0, 2, 1, "", "mesh_thickness_on_2D"], [0, 1, 1, "", "move_crosshair_in_vox"], [0, 2, 1, "", "multiplanar_force_render"], [0, 2, 1, "", "multiplanar_pad_pixels"], [0, 2, 1, "", "pen_value"], [0, 1, 1, "", "remove_haze"], [0, 1, 1, "", "remove_mesh_by_url"], [0, 1, 1, "", "remove_volume_by_index"], [0, 1, 1, "", "remove_volume_by_url"], [0, 1, 1, "", "reverse_faces"], [0, 2, 1, "", "ruler_color"], [0, 2, 1, "", "ruler_width"], [0, 1, 1, "", "run_custom_code"], [0, 2, 1, "", "sagittal_nose_left"], [0, 1, 1, "", "save_image"], [0, 1, 1, "", "save_scene"], [0, 2, 1, "", "selection_box_color"], [0, 1, 1, "", "set_clip_plane"], [0, 1, 1, "", "set_clip_plane_color"], [0, 1, 1, "", "set_color_map"], [0, 1, 1, "", "set_color_map_negative"], [0, 1, 1, "", "set_crosshair_color"], [0, 1, 1, "", "set_crosshair_width"], [0, 1, 1, "", "set_custom_mesh_shader"], [0, 1, 1, "", "set_draw_opacity"], [0, 1, 1, "", "set_drawing_enabled"], [0, 1, 1, "", "set_frame_4D"], [0, 1, 1, "", "set_high_resolution_capable"], [0, 1, 1, "", "set_interpolation"], [0, 1, 1, "", "set_mesh_layer_property"], [0, 1, 1, "", "set_mesh_property"], [0, 1, 1, "", "set_mesh_shader"], [0, 1, 1, "", "set_mesh_thickness_on_2D"], [0, 1, 1, "", "set_modulation_image"], [0, 1, 1, "", "set_opacity"], [0, 1, 1, "", "set_pan_2D_xyzmm"], [0, 1, 1, "", "set_pen_value"], [0, 1, 1, "", "set_radiological_convention"], [0, 1, 1, "", "set_render_azimuth_elevation"], [0, 1, 1, "", "set_scale"], [0, 1, 1, "", "set_selection_box_color"], [0, 1, 1, "", "set_slice_mm"], [0, 1, 1, "", "set_slice_mosaic_string"], [0, 1, 1, "", "set_slice_type"], [0, 1, 1, "", "set_text_orientation"], [0, 2, 1, "", "show_3D_crosshair"], [0, 2, 1, "", "slice_type"], [0, 2, 1, "", "text_height"], [0, 2, 1, "", "thumbnail"], [0, 2, 1, "", "trust_cal_min_max"], [0, 1, 1, "", "undo_draw"], [0, 1, 1, "", "update_gl_volume"], [0, 2, 1, "", "view_mode_hot_key"]]}, "objtypes": {"0": "py:class", "1": "py:method", "2": "py:attribute"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"], "2": ["py", "attribute", "Python attribute"]}, "titleterms": {"api": [0, 8], "refer": [0, 8], "paramet": 0, "return": 0, "develop": [1, 2, 8], "instal": [1, 7, 8, 9], "note": 2, "docstr": 3, "attribut": 3, "sync": 4, "instanc": 4, "across": 4, "cell": 4, "messag": 5, "between": 5, "python": 5, "typescript": 5, "setter": 5, "getter": 5, "wait": 5, "websocket": 5, "chunk": 5, "debug": 5, "exampl": 6, "todo": [6, 10], "introduct": [7, 10], "import": 7, "view": 7, "local": 7, "mri": 7, "volum": 7, "displai": 7, "from": 7, "internet": 7, "ipyniivu": 8, "quickstart": 8, "content": 8, "usag": 8}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx.ext.intersphinx": 1, "sphinx.ext.todo": 2, "nbsphinx": 4, "sphinx": 60}, "alltitles": {"API Reference": [[0, "api-reference"], [8, null]], "Parameters:": [[0, "parameters"], [0, "id1"], [0, "id2"], [0, "id3"], [0, "id4"], [0, "id5"], [0, "id6"], [0, "id7"], [0, "id8"], [0, "id10"], [0, "id12"], [0, "id15"], [0, "id17"], [0, "id19"], [0, "id20"], [0, "id21"], [0, "id22"], [0, "id23"], [0, "id24"], [0, "id25"], [0, "id26"], [0, "id27"], [0, "id28"], [0, "id29"], [0, "id30"], [0, "id31"], [0, "id32"], [0, "id33"], [0, "id34"], [0, "id35"], [0, "id36"], [0, "id37"], [0, "id38"], [0, "id39"], [0, "id40"], [0, "id41"], [0, "id42"], [0, "id43"], [0, "id44"], [0, "id45"], [0, "id46"], [0, "id47"], [0, "id48"], [0, "id49"], [0, "id50"], [0, "id51"], [0, "id52"], [0, "id53"], [0, "id54"], [0, "id55"], [0, "id56"], [0, "id57"], [0, "id58"], [0, "id59"], [0, "id60"]], "Returns:": [[0, "returns"], [0, "id9"], [0, "id11"], [0, "id13"], [0, "id14"], [0, "id16"], [0, "id18"]], "Developer install": [[1, "developer-install"]], "Development Notes": [[2, "development-notes"]], "Docstrings for attributes": [[3, "docstrings-for-attributes"]], "Syncing Instances Across Cells": [[4, "syncing-instances-across-cells"]], "Messaging between Python and Typescript": [[5, "messaging-between-python-and-typescript"]], "Setters": [[5, "setters"]], "Getters": [[5, "getters"]], "Wait for Websocket messages": [[5, "wait-for-websocket-messages"]], "Chunking": [[5, "chunking"]], "Debugging TypeScript to Python messages": [[5, "debugging-typescript-to-python-messages"]], "Examples": [[6, "examples"]], "Todo": [[6, "id1"], [10, "id1"]], "Introduction": [[7, "Introduction"], [10, "introduction"]], "Installation": [[7, "Installation"], [9, "installation"]], "Imports": [[7, "Imports"]], "Viewing a local MRI volume": [[7, "Viewing-a-local-MRI-volume"]], "Displaying a volume from the internet": [[7, "Displaying-a-volume-from-the-internet"]], "ipyniivue": [[8, "ipyniivue"]], "Quickstart": [[8, "quickstart"]], "Contents": [[8, "contents"]], "Installation and usage": [[8, null]], "Development": [[8, null]]}, "indexentries": {"niivue (class in ipyniivue)": [[0, "ipyniivue.Niivue"]], "add_mesh_from_url() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.add_mesh_from_url"]], "add_object() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.add_object"]], "add_volume() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.add_volume"]], "add_volume_from_url() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.add_volume_from_url"]], "back_color (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.back_color"]], "clip_plane_color (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.clip_plane_color"]], "clip_plane_hot_key (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.clip_plane_hot_key"]], "colorbar_height (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.colorbar_height"]], "colorbar_margin (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.colorbar_margin"]], "create_empty_drawing() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.create_empty_drawing"]], "crosshair_color (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.crosshair_color"]], "crosshair_width (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.crosshair_width"]], "double_touch_timeout (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.double_touch_timeout"]], "drag_and_drop_enabled (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.drag_and_drop_enabled"]], "drag_mode (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.drag_mode"]], "draw_grow_cut() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.draw_grow_cut"]], "draw_mosaic() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.draw_mosaic"]], "draw_otsu() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.draw_otsu"]], "drawing_enabled (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.drawing_enabled"]], "font_color (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.font_color"]], "get_descriptives() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.get_descriptives"]], "get_frame_4d() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.get_frame_4D"]], "get_media_by_url() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.get_media_by_url"]], "get_overlay_index_by_id() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.get_overlay_index_by_ID"]], "get_radiological_convention() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.get_radiological_convention"]], "get_volume_index_by_id() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.get_volume_index_by_ID"]], "is_atlas_outline (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_atlas_outline"]], "is_colorbar (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_colorbar"]], "is_corner_orientation_text (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_corner_orientation_text"]], "is_depth_pick_mesh (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_depth_pick_mesh"]], "is_filled_pen (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_filled_pen"]], "is_high_resolution_capable (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_high_resolution_capable"]], "is_mesh_ext() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.is_mesh_ext"]], "is_nearest_interpolation (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_nearest_interpolation"]], "is_orient_cube (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_orient_cube"]], "is_radiological_convention (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_radiological_convention"]], "is_ruler (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_ruler"]], "is_slice_mm (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.is_slice_MM"]], "key_debounce_time (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.key_debounce_time"]], "load_connectome() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.load_connectome"]], "load_document_from_url() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.load_document_from_url"]], "load_drawing_from_url() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.load_drawing_from_url"]], "load_meshes() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.load_meshes"]], "load_volumes() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.load_volumes"]], "loading_text (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.loading_text"]], "long_touch_timeout (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.long_touch_timeout"]], "max_draw_undo_bitmaps (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.max_draw_undo_bitmaps"]], "mesh_thickness_on_2d (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.mesh_thickness_on_2D"]], "move_crosshair_in_vox() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.move_crosshair_in_vox"]], "multiplanar_force_render (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.multiplanar_force_render"]], "multiplanar_pad_pixels (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.multiplanar_pad_pixels"]], "pen_value (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.pen_value"]], "remove_haze() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.remove_haze"]], "remove_mesh_by_url() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.remove_mesh_by_url"]], "remove_volume_by_index() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.remove_volume_by_index"]], "remove_volume_by_url() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.remove_volume_by_url"]], "reverse_faces() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.reverse_faces"]], "ruler_color (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.ruler_color"]], "ruler_width (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.ruler_width"]], "run_custom_code() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.run_custom_code"]], "sagittal_nose_left (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.sagittal_nose_left"]], "save_image() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.save_image"]], "save_scene() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.save_scene"]], "selection_box_color (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.selection_box_color"]], "set_clip_plane() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_clip_plane"]], "set_clip_plane_color() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_clip_plane_color"]], "set_color_map() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_color_map"]], "set_color_map_negative() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_color_map_negative"]], "set_crosshair_color() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_crosshair_color"]], "set_crosshair_width() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_crosshair_width"]], "set_custom_mesh_shader() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_custom_mesh_shader"]], "set_draw_opacity() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_draw_opacity"]], "set_drawing_enabled() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_drawing_enabled"]], "set_frame_4d() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_frame_4D"]], "set_high_resolution_capable() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_high_resolution_capable"]], "set_interpolation() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_interpolation"]], "set_mesh_layer_property() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_mesh_layer_property"]], "set_mesh_property() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_mesh_property"]], "set_mesh_shader() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_mesh_shader"]], "set_mesh_thickness_on_2d() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_mesh_thickness_on_2D"]], "set_modulation_image() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_modulation_image"]], "set_opacity() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_opacity"]], "set_pan_2d_xyzmm() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_pan_2D_xyzmm"]], "set_pen_value() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_pen_value"]], "set_radiological_convention() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_radiological_convention"]], "set_render_azimuth_elevation() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_render_azimuth_elevation"]], "set_scale() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_scale"]], "set_selection_box_color() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_selection_box_color"]], "set_slice_mm() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_slice_mm"]], "set_slice_mosaic_string() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_slice_mosaic_string"]], "set_slice_type() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_slice_type"]], "set_text_orientation() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.set_text_orientation"]], "show_3d_crosshair (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.show_3D_crosshair"]], "slice_type (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.slice_type"]], "text_height (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.text_height"]], "thumbnail (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.thumbnail"]], "trust_cal_min_max (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.trust_cal_min_max"]], "undo_draw() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.undo_draw"]], "update_gl_volume() (ipyniivue.niivue method)": [[0, "ipyniivue.Niivue.update_gl_volume"]], "view_mode_hot_key (ipyniivue.niivue attribute)": [[0, "ipyniivue.Niivue.view_mode_hot_key"]]}}) \ No newline at end of file