Skip to main content

Fast multi-dimensional array viewer

Project description

arrayview

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

Full documentation →

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.9.0.tar.gz (515.9 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.9.0-py3-none-any.whl (277.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for arrayview-0.9.0.tar.gz
Algorithm Hash digest
SHA256 ed27bb19b9b7ccd4dc032935ad35e5734d7d2723624479ed8103deb56fec4e7d
MD5 12f3ceb491d88c89125ef6f1f5042617
BLAKE2b-256 856414817926aaf1cb567ee6be0dfd7fb9e52f7a9ce09a88f3f266c550fd87bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for arrayview-0.9.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.9.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for arrayview-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a153f01214c03eb0c0b3c911e4b0caf59e8ed7b4ccc0a5e8b971aed99f71ce1
MD5 cad789cbdd6186b18b7304c9732ff1fd
BLAKE2b-256 5123188eb45e63fd39f0f8343338d8552f5818573b13b72dd302a7a84ee2fb5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for arrayview-0.9.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