Skip to main content

Fast multi-dimensional array viewer

Project description

arrayview

Documentation

A viewer for multi-dimensional arrays.

  • CLI and Python
  • Jupyter / VS Code
  • Browser / native
  • SSH / tunnels

CLI

uvx arrayview scan.nii.gz
uvx arrayview --window browser scan.npy
uvx arrayview                            # demo

Python

from arrayview import view
view(arr)

MATLAB

Add the matlab/ directory to your MATLAB path, then:

addpath('/path/to/arrayview/matlab')

A = rand(100, 200, 10);
arrayview(A)

Requires arrayview installed in MATLAB's Python environment:

pip install arrayview

Arrays are passed zero-copy via the buffer protocol (in-process Python). arrayview() enables this automatically — just call it before any other py.* call in your MATLAB session.

PyTorch / Deep Learning

from arrayview import view_batch, TrainingMonitor

# Browse a DataLoader batch
view_batch(train_loader)
view_batch(train_loader, overlay='label')

# Live training monitor — updates every N epochs
monitor = TrainingMonitor(every=5, samples=3)
for epoch in range(100):
    for batch in val_loader:
        pred = model(batch['image'])
        monitor.step(input=batch['image'], target=batch['label'],
                     prediction=pred, epoch=epoch)

view_batch() accepts DataLoaders, Datasets, dicts, tuples, or raw tensors. TrainingMonitor opens a compare window and calls handle.update() automatically. PyTorch is not required at import time.

Formats

.npy .npz .nii .nii.gz .zarr .pt .h5 .tif .mat

Once open

Navigation: scroll slices · h/l cycle dims · j/k slices · =/- zoom · drag pan Views: v 3-plane · z mosaic · q qMRI · n compare · = immersive Display: c/C colormaps · d/D dynamic range · f FFT · m complex · p projections · L log Tools: S segmentation · u ruler · s screenshot · ? help

nnInteractive Segmentation

S starts AI-assisted 3D segmentation (requires CUDA). Click/draw to segment, Enter to accept.

[nninteractive]
url = "http://gpu-server:1527"   # skip auto-launch, use running server

Or: ARRAYVIEW_NNINTERACTIVE_URL=http://gpu-server:1527

Config

~/.arrayview/config.toml:

[viewer]
colormaps = ["gray", "viridis", "plasma"]   # colormaps cycled by 'c'

[window]
default = "browser"                         # browser | native | vscode | inline

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arrayview-0.11.0.tar.gz (528.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arrayview-0.11.0-py3-none-any.whl (286.4 kB view details)

Uploaded Python 3

File details

Details for the file arrayview-0.11.0.tar.gz.

File metadata

  • Download URL: arrayview-0.11.0.tar.gz
  • Upload date:
  • Size: 528.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arrayview-0.11.0.tar.gz
Algorithm Hash digest
SHA256 95d8609a24092dde3de79dbef2642fb4ac0d9d7c72009de2ee0f113c43bfd50a
MD5 ab9ebaf6cf37a4c0ed731c50fe31d45b
BLAKE2b-256 ab573628f68f5741f85354753781cd0e2128ab878e758076e4c08cd76bbcb156

See more details on using hashes here.

Provenance

The following attestation bundles were made for arrayview-0.11.0.tar.gz:

Publisher: python-publish.yml on oscarvanderheide/arrayview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arrayview-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: arrayview-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 286.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arrayview-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15bb4a5b299f862a0fa9adffc165682dddc7201a6ee68568794dbfc821fbff2b
MD5 80979cf782c84bcc991ee6b8989fbb02
BLAKE2b-256 505902e541e4f83e5a4f31f65ca00ef43c990b9f6e4568fe9cb10670e06ea50d

See more details on using hashes here.

Provenance

The following attestation bundles were made for arrayview-0.11.0-py3-none-any.whl:

Publisher: python-publish.yml on oscarvanderheide/arrayview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page