How msoechting/lexcube works
Lexcube turns a three-dimensional NumPy or xarray dataset into an interactive Jupyter cube. The workflow starts with a notebook user creating a widget, which starts a tile server; the browser client requests and renders tiles, while interaction and controls support exploration. Documented capabilities include voxel rendering, time series, GeoJSON overlays, colormaps, range boundaries, and figure export. The graph reflects the sampled code and README; several feature modules are indexed but not excerpted, so their internal call relationships are not asserted.
Main entry points: interaction.ts Cube interaction · client.ts Client context · tiledata.ts Tile data · rendering.ts Cube rendering
Components 27
Python widget and data
- Cube widget
lexcube/cube3d.py - Tile server
lexcube/lexcube_server/src/tile_server.py - Widget backend
lexcube/lexcube_server/src/lexcube_widget.py
Browser client
- Jupyter widget view
src/widget.ts - Client context
src/lexcube-client/src/client/client.ts - Tile networking
src/lexcube-client/src/client/networking.ts - Cube interaction
src/lexcube-client/src/client/interaction.ts - Camera controls
src/lexcube-client/src/client/interaction/camera-controls.ts - Dimension sliders
src/lexcube-client/src/client/ui/slider-ui.ts - Colormap controls
src/lexcube-client/src/client/ui/colormap-ui.ts - Animation controls
src/lexcube-client/src/client/ui/animation-ui.ts
Cube state and tiles
- Dimensions
src/lexcube-client/src/client/core/dimensions.ts - Parameters
src/lexcube-client/src/client/core/parameters.ts - Selection ranges
src/lexcube-client/src/client/core/selection.ts - Time animation
src/lexcube-client/src/client/core/animation.ts - Tile data
src/lexcube-client/src/client/tiledata.ts - Tile definitions
src/lexcube-client/src/client/core/tiles.ts - Tile storage
src/lexcube-client/src/client/services/tile-storage.ts - Tile decompression
src/lexcube-client/src/client/services/tile-decompression.ts
Rendering and features
- Cube rendering
src/lexcube-client/src/client/rendering.ts - Voxel rendering
src/lexcube-client/src/client/rendering/volume-rendering.ts - Tile texture views
src/lexcube-client/src/client/rendering/tile-texture-views.ts - GeoJSON overlays
src/lexcube-client/src/client/rendering/region-borders.ts - GeoJSON processing
src/lexcube-client/src/client/rendering/geojson-loader.worker.ts - Figure export
src/lexcube-client/src/client/rendering/export-recorder.ts
Other components
- Notebook user
- 3D dataset
Connections 28
- Notebook user → Cube widget: creates widget
- 3D dataset → Cube widget: provides data
- Cube widget → Tile server: starts serving
lexcube/cube3d.py - Cube widget → Widget backend: configures view
lexcube/cube3d.py - Widget backend → Tile server: uses tile server
lexcube/lexcube_server/src/lexcube_widget.py - Jupyter widget view → Client context: creates context
src/widget.ts - Client context → Tile networking: creates networking
src/lexcube-client/src/client/client.ts - Client context → Tile data: creates tile data
src/lexcube-client/src/client/client.ts - Client context → Cube rendering: creates renderer
src/lexcube-client/src/client/client.ts - Client context → Cube interaction: creates interaction
src/lexcube-client/src/client/client.ts - Tile networking → Tile server: requests tiles
- Cube interaction → Camera controls: uses controls
src/lexcube-client/src/client/interaction.ts - Cube interaction → Dimensions: reads dimensions
src/lexcube-client/src/client/interaction.ts - Cube interaction → Parameters: uses parameters
src/lexcube-client/src/client/interaction.ts - Cube interaction → Selection ranges: uses selection
src/lexcube-client/src/client/interaction.ts - Cube interaction → Time animation: uses animation
src/lexcube-client/src/client/interaction.ts - Cube interaction → Dimension sliders: creates controls
src/lexcube-client/src/client/interaction.ts - Cube interaction → Colormap controls: creates controls
src/lexcube-client/src/client/interaction.ts - Cube interaction → Animation controls: creates controls
src/lexcube-client/src/client/interaction.ts - Tile data → Tile decompression: creates decompressor
src/lexcube-client/src/client/tiledata.ts - Tile data → Tile storage: creates storage
src/lexcube-client/src/client/tiledata.ts - Tile data → Tile networking: requests time tiles
src/lexcube-client/src/client/tiledata.ts - Tile data → Tile definitions: uses tile types
src/lexcube-client/src/client/tiledata.ts - Cube rendering → Voxel rendering: uses renderer
src/lexcube-client/src/client/rendering.ts - Cube rendering → Tile texture views: uses texture views
src/lexcube-client/src/client/rendering.ts - Cube rendering → GeoJSON overlays: uses borders
src/lexcube-client/src/client/rendering.ts - Cube rendering → Figure export: uses recorder
src/lexcube-client/src/client/rendering.ts - GeoJSON overlays → GeoJSON processing: parses GeoJSON
src/lexcube-client/src/client/rendering/region-borders.ts