@biongff/vizarr 0.3.0-dev.2025-11-12.283baee9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +1 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- package/.github/ISSUE_TEMPLATE/documentation_update.md +16 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/.github/ISSUE_TEMPLATE/maintenance.md +19 -0
- package/.github/ISSUE_TEMPLATE/optimisation_request.md +23 -0
- package/.github/ISSUE_TEMPLATE/support_request.md +25 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +21 -0
- package/.github/dependabot.yml +13 -0
- package/.github/workflows/build_and_deploy.yml +29 -0
- package/.github/workflows/npm-publish-dev.yml +49 -0
- package/.github/workflows/npm-publish.yml +20 -0
- package/.github/workflows/release.yml +37 -0
- package/.github/workflows/test.yml +21 -0
- package/.releaserc.json +29 -0
- package/CITATION.cff +56 -0
- package/CONTRIBUTING.md +82 -0
- package/LICENSE +21 -0
- package/README.md +85 -0
- package/assets/favicon.ico +0 -0
- package/assets/favicon.png +0 -0
- package/assets/logo-wide.png +0 -0
- package/assets/logo-wide.svg +60 -0
- package/assets/logo.png +0 -0
- package/assets/logo.svg +36 -0
- package/assets/robots.txt +3 -0
- package/assets/screenshot.png +0 -0
- package/biome.json +34 -0
- package/index.html +24 -0
- package/main.ts +52 -0
- package/package.json +55 -0
- package/patches/@vivjs__loaders@0.17.2.patch +13 -0
- package/python/.python-version +1 -0
- package/python/README.md +14 -0
- package/python/Untitled.ipynb +40 -0
- package/python/deno.json +22 -0
- package/python/notebooks/IDR_example.ipynb +86 -0
- package/python/notebooks/README.md +35 -0
- package/python/notebooks/create_fixture.py +72 -0
- package/python/notebooks/getting_started.ipynb +217 -0
- package/python/notebooks/mandelbrot.ipynb +211 -0
- package/python/notebooks/spatial_transformations.ipynb +139 -0
- package/python/pyproject.toml +18 -0
- package/python/src/vizarr/__init__.py +10 -0
- package/python/src/vizarr/_widget.js +113 -0
- package/python/src/vizarr/_widget.py +67 -0
- package/python/uv.lock +2495 -0
- package/src/ZarrPixelSource.ts +182 -0
- package/src/codecs/jpeg2k.ts +22 -0
- package/src/codecs/register.ts +2 -0
- package/src/components/LayerController/AcquisitionController.tsx +46 -0
- package/src/components/LayerController/AddChannelButton.tsx +122 -0
- package/src/components/LayerController/AxisOptions.tsx +93 -0
- package/src/components/LayerController/AxisSlider.tsx +86 -0
- package/src/components/LayerController/AxisSliders.tsx +29 -0
- package/src/components/LayerController/ChannelController.tsx +84 -0
- package/src/components/LayerController/ChannelOptions.tsx +183 -0
- package/src/components/LayerController/ColorPalette.tsx +40 -0
- package/src/components/LayerController/Content.tsx +71 -0
- package/src/components/LayerController/Header.tsx +48 -0
- package/src/components/LayerController/Labels.tsx +73 -0
- package/src/components/LayerController/LayerFitToViewportButton.tsx +43 -0
- package/src/components/LayerController/LayerVisibilityButton.tsx +32 -0
- package/src/components/LayerController/OpacitySlider.tsx +25 -0
- package/src/components/LayerController/index.tsx +42 -0
- package/src/components/Menu.tsx +54 -0
- package/src/components/Viewer.tsx +136 -0
- package/src/hooks.ts +29 -0
- package/src/index.tsx +138 -0
- package/src/io.ts +276 -0
- package/src/layers/grid-layer.ts +214 -0
- package/src/layers/label-layer.ts +446 -0
- package/src/layers/viv-layers.ts +55 -0
- package/src/lru-store.ts +57 -0
- package/src/ome.ts +388 -0
- package/src/state.ts +202 -0
- package/src/theme.ts +80 -0
- package/src/types.ts +112 -0
- package/src/utils.ts +655 -0
- package/tsconfig.json +14 -0
- package/vite.config.js +47 -0
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*ipynb linguist-vendored
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report a problem with the software
|
|
4
|
+
title: "[Bug] "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the bug**
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
**To Reproduce**
|
|
13
|
+
Steps to reproduce the behavior:
|
|
14
|
+
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '...'
|
|
17
|
+
3. See error
|
|
18
|
+
|
|
19
|
+
**Expected behavior**
|
|
20
|
+
A clear and concise description of what you expected to happen.
|
|
21
|
+
|
|
22
|
+
**Screenshots (if applicable)**
|
|
23
|
+
If applicable, add screenshots to help explain the problem.
|
|
24
|
+
|
|
25
|
+
**Environment (please complete the following information):**
|
|
26
|
+
|
|
27
|
+
- OS: [e.g., Windows, macOS, Linux]
|
|
28
|
+
- Python/Node/Django/etc. version: [e.g., Python 3.9]
|
|
29
|
+
- Browser (if applicable): [e.g., Chrome, Firefox]
|
|
30
|
+
|
|
31
|
+
**Additional context**
|
|
32
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Documentation Update
|
|
3
|
+
about: Request changes or improvements to the documentation
|
|
4
|
+
title: "[Docs] "
|
|
5
|
+
labels: documentation
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**What needs updating?**
|
|
10
|
+
Describe what section of the documentation needs improvement.
|
|
11
|
+
|
|
12
|
+
**Where should this be updated?**
|
|
13
|
+
Provide links or file paths if possible.
|
|
14
|
+
|
|
15
|
+
**Additional context**
|
|
16
|
+
Add any other relevant context about the documentation request.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest a new feature or improvement
|
|
4
|
+
title: "[Feature] "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Is your feature request related to a problem? Please describe.**
|
|
10
|
+
A clear and concise description of what the problem is.
|
|
11
|
+
|
|
12
|
+
**Describe the solution you'd like**
|
|
13
|
+
A clear and concise description of what you want to happen.
|
|
14
|
+
|
|
15
|
+
**Describe alternatives you've considered**
|
|
16
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
**Additional context**
|
|
19
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Maintenance Task
|
|
3
|
+
about: Request or propose refactoring, dependency updates, or tooling improvements
|
|
4
|
+
title: "[Maintenance] "
|
|
5
|
+
labels: maintenance, refactor
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the task**
|
|
10
|
+
What needs to be maintained, refactored, or updated?
|
|
11
|
+
|
|
12
|
+
**Reason for change**
|
|
13
|
+
Why is this maintenance needed (e.g., outdated dependency, code clarity, build speed)?
|
|
14
|
+
|
|
15
|
+
**Proposed approach**
|
|
16
|
+
How might this be done?
|
|
17
|
+
|
|
18
|
+
**Additional context**
|
|
19
|
+
Any links, dependencies, or related issues.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Optimisation Request
|
|
3
|
+
about: Suggest a performance or efficiency improvement
|
|
4
|
+
title: "[Optimisation] "
|
|
5
|
+
labels: optimisation, enhancement
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Is your optimisation request related to a specific problem?**
|
|
10
|
+
A clear and concise description of the inefficiency or area for improvement.
|
|
11
|
+
|
|
12
|
+
**Describe the proposed solution**
|
|
13
|
+
A clear and concise description of how the optimisation could be achieved.
|
|
14
|
+
(For example: refactoring code, reducing memory usage, improving response time, etc.)
|
|
15
|
+
|
|
16
|
+
**Current performance**
|
|
17
|
+
(Optional) If available, provide benchmarks, logs, or profiling data showing current performance.
|
|
18
|
+
|
|
19
|
+
**Expected performance improvement**
|
|
20
|
+
(Optional) If possible, describe the expected impact of the optimisation.
|
|
21
|
+
|
|
22
|
+
**Additional context**
|
|
23
|
+
Add any other context or references (e.g., related issues, profiling tools used).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Support Request
|
|
3
|
+
about: Ask for help with using or configuring the software
|
|
4
|
+
title: "[Support] "
|
|
5
|
+
labels: question, support
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**What are you trying to do?**
|
|
10
|
+
Describe your goal clearly.
|
|
11
|
+
|
|
12
|
+
**What have you tried so far?**
|
|
13
|
+
List steps or commands you've already attempted.
|
|
14
|
+
|
|
15
|
+
**What issue are you encountering?**
|
|
16
|
+
Include error messages, logs, or unexpected behaviour.
|
|
17
|
+
|
|
18
|
+
**Environment:**
|
|
19
|
+
|
|
20
|
+
- OS: [e.g., Windows, macOS, Linux]
|
|
21
|
+
- Software version: [e.g., 1.2.3]
|
|
22
|
+
- Runtime version: [e.g., Python 3.11]
|
|
23
|
+
|
|
24
|
+
**Additional context:**
|
|
25
|
+
Add any relevant details, such as configuration files or links to documentation you’ve followed.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Description
|
|
2
|
+
|
|
3
|
+
Give a brief summary of changes...
|
|
4
|
+
|
|
5
|
+
Fixes # (issue)
|
|
6
|
+
Related to # (if applicable)
|
|
7
|
+
|
|
8
|
+
## Type of change
|
|
9
|
+
|
|
10
|
+
- [ ] 🐛 Bug fix (non-breaking change that resolves an issue)
|
|
11
|
+
- [ ] ✨ New feature (non-breaking change that adds functionality)
|
|
12
|
+
- [ ] ⚡ Optimisation (non-breaking improvement to performance or efficiency)
|
|
13
|
+
- [ ] 🧩 Documentation (adds or improves documentation)
|
|
14
|
+
- [ ] 🧱 Maintenance (refactor, dependency update, CI/CD, etc.)
|
|
15
|
+
- [ ] 🔥 Breaking change (fix or feature that causes existing functionality to change)
|
|
16
|
+
|
|
17
|
+
## Checklist
|
|
18
|
+
|
|
19
|
+
- [ ] All tests pass (eg. `npm test`)
|
|
20
|
+
- [ ] Pre-commit hooks run successfully (eg. `pre-commit run --all-files`)
|
|
21
|
+
- [ ] Documentation updated (if required)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Maintain dependencies for GitHub Actions
|
|
4
|
+
- package-ecosystem: "github-actions"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "monthly"
|
|
8
|
+
|
|
9
|
+
# Maintain dependencies for npm
|
|
10
|
+
- package-ecosystem: "npm"
|
|
11
|
+
directory: "/"
|
|
12
|
+
schedule:
|
|
13
|
+
interval: "monthly"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Build and Deploy
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build-and-deploy:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v5
|
|
15
|
+
- uses: pnpm/action-setup@v4
|
|
16
|
+
with:
|
|
17
|
+
run_install: true
|
|
18
|
+
- run: |
|
|
19
|
+
pnpm build
|
|
20
|
+
touch dist/.nojekyll
|
|
21
|
+
|
|
22
|
+
- name: Deploy 🚀
|
|
23
|
+
uses: JamesIves/github-pages-deploy-action@3.7.1
|
|
24
|
+
with:
|
|
25
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
BRANCH: gh-pages
|
|
27
|
+
FOLDER: dist
|
|
28
|
+
CLEAN: true
|
|
29
|
+
CLEAN_EXCLUDE: '["v0.1", "v0.2", "v0.3"]' # Manually add endpoints to keep
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: publish-dev
|
|
2
|
+
# Publishes a pre-release (dev) version of the package to npmjs.org
|
|
3
|
+
# whenever changes are pushed to the "dev" branch.
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [dev]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Setup Node.js
|
|
21
|
+
uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: 22
|
|
24
|
+
|
|
25
|
+
- name: Install pnpm
|
|
26
|
+
run: npm install -g pnpm@9
|
|
27
|
+
|
|
28
|
+
- name: Update prerelease version
|
|
29
|
+
id: pre-release-version
|
|
30
|
+
uses: adobe/update-prerelease-npm-version@v1.0.0
|
|
31
|
+
with:
|
|
32
|
+
pre-release-tag: "dev"
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: pnpm install
|
|
36
|
+
|
|
37
|
+
- name: Build package
|
|
38
|
+
run: pnpm run build
|
|
39
|
+
|
|
40
|
+
- name: Configure npm authentication
|
|
41
|
+
run: |
|
|
42
|
+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
43
|
+
env:
|
|
44
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
45
|
+
|
|
46
|
+
- name: Publish to npm
|
|
47
|
+
env:
|
|
48
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
49
|
+
run: pnpm publish --tag dev --access public --no-git-checks
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
# This workflow publishes the package to npmjs.org whenever a release is published.
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v3
|
|
11
|
+
# Setup .npmrc file to publish to npm
|
|
12
|
+
- uses: actions/setup-node@v3
|
|
13
|
+
with:
|
|
14
|
+
node-version: '18.x'
|
|
15
|
+
registry-url: 'https://registry.npmjs.org'
|
|
16
|
+
- run: npm ci
|
|
17
|
+
- run: npm run build
|
|
18
|
+
- run: npm publish
|
|
19
|
+
env:
|
|
20
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
token: ${{ secrets.GH_PAT }}
|
|
22
|
+
|
|
23
|
+
- name: Setup Node.js
|
|
24
|
+
uses: actions/setup-node@v4
|
|
25
|
+
with:
|
|
26
|
+
node-version: 22
|
|
27
|
+
|
|
28
|
+
- name: Install pnpm
|
|
29
|
+
run: npm install -g pnpm@9
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: pnpm install
|
|
33
|
+
|
|
34
|
+
- name: Run Semantic Release
|
|
35
|
+
env:
|
|
36
|
+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
|
37
|
+
run: pnpm exec semantic-release
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Node CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
|
|
11
|
+
build:
|
|
12
|
+
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v5
|
|
17
|
+
- uses: pnpm/action-setup@v4
|
|
18
|
+
with:
|
|
19
|
+
run_install: true
|
|
20
|
+
- run: pnpm check
|
|
21
|
+
- run: pnpm lint
|
package/.releaserc.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": ["main"],
|
|
3
|
+
"repositoryUrl": "https://github.com/BioNGFF/vizarr.git",
|
|
4
|
+
"plugins": [
|
|
5
|
+
"@semantic-release/commit-analyzer",
|
|
6
|
+
"@semantic-release/release-notes-generator",
|
|
7
|
+
[
|
|
8
|
+
"@semantic-release/changelog",
|
|
9
|
+
{
|
|
10
|
+
"changelogFile": "CHANGELOG.md",
|
|
11
|
+
"changelogTitle": "# Changelog"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
"@semantic-release/npm",
|
|
16
|
+
{
|
|
17
|
+
"npmPublish": false
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"@semantic-release/git",
|
|
22
|
+
{
|
|
23
|
+
"assets": ["package.json", "package-lock.json", "CHANGELOG.md"],
|
|
24
|
+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
["@semantic-release/github", { "releaseNameTemplate": "<%= nextRelease.version %>" }]
|
|
28
|
+
]
|
|
29
|
+
}
|
package/CITATION.cff
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it using these metadata."
|
|
3
|
+
authors:
|
|
4
|
+
- given-names: "Trevor"
|
|
5
|
+
family-names: "Manz"
|
|
6
|
+
affiliation: "Harvard Medical School"
|
|
7
|
+
- given-names: "Will"
|
|
8
|
+
family-names: "Moore"
|
|
9
|
+
affiliation: "Open Microscopy Environment"
|
|
10
|
+
title: "Vizarr"
|
|
11
|
+
url: "https://github.com/hms-dbmi/vizarr"
|
|
12
|
+
preferred-citation:
|
|
13
|
+
type: article
|
|
14
|
+
title: "Viv: multiscale visualization of high-resolution multiplexed bioimaging data on the web"
|
|
15
|
+
authors:
|
|
16
|
+
- given-names: "Trevor"
|
|
17
|
+
family-names: "Manz"
|
|
18
|
+
orcid: "https://orcid.org/0000-0001-7694-5164"
|
|
19
|
+
affiliation: "Harvard Medical School"
|
|
20
|
+
- given-names: "Ilan"
|
|
21
|
+
family-names: "Gold"
|
|
22
|
+
orcid: "https://orcid.org/0000-0002-5823-1026"
|
|
23
|
+
affiliation: "Harvard Medical School"
|
|
24
|
+
- given-names: "Nathan Heath"
|
|
25
|
+
family-names: "Patterson"
|
|
26
|
+
affiliation: "Vanderbilt University"
|
|
27
|
+
orcid: "https://orcid.org/0000-0002-0064-1583"
|
|
28
|
+
- given-names: "Chuck"
|
|
29
|
+
family-names: "McCallum"
|
|
30
|
+
affiliation: "Harvard Medical School"
|
|
31
|
+
orcid: "https://orcid.org/0000-0003-4039-9768"
|
|
32
|
+
- given-names: "Mark S."
|
|
33
|
+
family-names: "Keller"
|
|
34
|
+
affiliation: "Harvard Medical School"
|
|
35
|
+
orcid: "https://orcid.org/0000-0003-3003-874X"
|
|
36
|
+
- given-names: "Bruce W."
|
|
37
|
+
family-names: "Herr"
|
|
38
|
+
name-suffix: "II"
|
|
39
|
+
affiliation: "Indiana University"
|
|
40
|
+
orcid: "https://orcid.org/0000-0002-6703-7647"
|
|
41
|
+
- given-names: "Kay"
|
|
42
|
+
family-names: "Börner"
|
|
43
|
+
affiliation: "Indiana University"
|
|
44
|
+
orcid: "https://orcid.org/0000-0002-3321-6137"
|
|
45
|
+
- given-names: "Jeffrey M."
|
|
46
|
+
family-names: "Spraggins"
|
|
47
|
+
affiliation: "Vanderbilt University"
|
|
48
|
+
orcid: "https://orcid.org/0000-0001-9198-5498"
|
|
49
|
+
- given-names: "Nils"
|
|
50
|
+
family-names: "Gehlenborg"
|
|
51
|
+
affiliation: "Harvard Medical School"
|
|
52
|
+
orcid: "https://orcid.org/0000-0003-0327-8297"
|
|
53
|
+
doi: "10.1038/s41592-022-01482-7"
|
|
54
|
+
journal: "Nature Methods"
|
|
55
|
+
month: 5
|
|
56
|
+
year: 2022
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
## Feedback and Contribution
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in `vizarr`! I welcome any input, feedback, bug reports, and contributions.
|
|
4
|
+
Please do not hesitate to reach out if you have any questions!
|
|
5
|
+
|
|
6
|
+
### Setting up a development environment
|
|
7
|
+
|
|
8
|
+
In order to make changes to `vizarr`, you will need to fork the repository. Clone your fork
|
|
9
|
+
of the repository to your local machine and change directories:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/your-username/vizarr.git
|
|
13
|
+
cd vizarr
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Set the `upstream` remote to the base `vizarr` repository:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
git remote add upstream https://github.com/hms-dbmi/vizarr.git
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Install the dependencies to develop and build `vizarr` via `pnpm`.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm install
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> Note: You need to have [Node.js](https://nodejs.org/en/) (v20.0 or later) to build
|
|
29
|
+
> and develop `vizarr`. I recommend using [`nvm`](https://github.com/nvm-sh/nvm) or
|
|
30
|
+
> [`fnm`](https://github.com/Schniz/fnm) to manage different version of Node.js
|
|
31
|
+
> on your machine.
|
|
32
|
+
|
|
33
|
+
### Running the development server
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm dev
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The `dev` command will start a development server on `http://localhost:5173`
|
|
40
|
+
which you can navigate to in your web browser. You can "live" edit the contents
|
|
41
|
+
of any of the files within `src/` or `public/` when running this server;
|
|
42
|
+
changes are reflected instantly in the browser. Stop the development server
|
|
43
|
+
when you are done making changes.
|
|
44
|
+
|
|
45
|
+
- `src/` - contains all TypeScript source code
|
|
46
|
+
- `public/` - contains all static assets required for the site
|
|
47
|
+
|
|
48
|
+
Have a look at the other `script` commands in `package.json` for the project. These are standard to any JS
|
|
49
|
+
build and can be executed by running `pnpm <command>`.
|
|
50
|
+
|
|
51
|
+
### Making changes
|
|
52
|
+
|
|
53
|
+
Create a new feature branch:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git checkout main -b your-feature-branch-name
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Add and commit your changed files.
|
|
60
|
+
|
|
61
|
+
### Sharing your changes
|
|
62
|
+
|
|
63
|
+
Update your remote branch:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
git push -u origin your-feature-branch-name
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
You can then make a pull-request to `vizarr`'s `main` branch. When making a
|
|
70
|
+
pull-request, your code will be checked for linting with `biome`. Please run
|
|
71
|
+
`pnpm fix` to automatically format your code when making a pull-request.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### (Note to self) Building and publishing `vizarr`
|
|
75
|
+
|
|
76
|
+
Build a production version of the site:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pnpm version [<new version> | major | minor | patch]
|
|
80
|
+
pnpm publish
|
|
81
|
+
```
|
|
82
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Trevor Manz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<h1>
|
|
2
|
+
<p align="center">
|
|
3
|
+
<img src="./assets/logo-wide.svg" alt="vizarr" width="200">
|
|
4
|
+
</h1>
|
|
5
|
+
<samp>
|
|
6
|
+
<p align="center">
|
|
7
|
+
<span>view multiscale zarr images online and in notebooks</span>
|
|
8
|
+
<br>
|
|
9
|
+
<br>
|
|
10
|
+
<a href="https://hms-dbmi.github.io/vizarr/?source=https://minio-dev.openmicroscopy.org/idr/v0.3/idr0062-blin-nuclearsegmentation/6001240.zarr">standalone app</a> .
|
|
11
|
+
<a href="./python/notebooks/getting_started.ipynb">python api</a> .
|
|
12
|
+
<a href="https://colab.research.google.com/github/hms-dbmi/vizarr/blob/main/python/notebooks/mandelbrot.ipynb">open in colab</a>
|
|
13
|
+
</p>
|
|
14
|
+
</samp>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
## About
|
|
18
|
+
|
|
19
|
+
**Vizarr** is a minimal, purely client-side program for viewing zarr-based images.
|
|
20
|
+
|
|
21
|
+
- ⚡ **GPU accelerated rendering** with [Viv](https://github.com/hms-dbmi/viv)
|
|
22
|
+
- 💻 Purely **client-side** zarr access with [zarrita.js](https://github.com/manzt/zarrita.js)
|
|
23
|
+
- 🌎 A **standalone [web app](https://hms-dbmi/vizarr)** for viewing entirely in the browser.
|
|
24
|
+
- 🐍 An [anywidget](https://github.com/manzt/anywidget) **Python API** for
|
|
25
|
+
programmatic control in notebooks.
|
|
26
|
+
- 📦 Supports any `zarr-python` [store](https://zarr.readthedocs.io/en/stable/api/storage.html)
|
|
27
|
+
as a backend.
|
|
28
|
+
|
|
29
|
+
<p align="center">
|
|
30
|
+
<img src="./assets/screenshot.png" alt="Multiscale OME-Zarr in Jupyter Notebook with Vizarr" width="500">
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
## Getting started
|
|
34
|
+
|
|
35
|
+
**Vizarr** provides two primary interfaces for interacting with the core viewer:
|
|
36
|
+
|
|
37
|
+
### 1. Standalone Web App
|
|
38
|
+
|
|
39
|
+
You can use the standalone web app by copying and pasting a URL to a Zarr store as the `?source` query parameter in the [web app](https://hms-dbmi.github.io/vizarr).
|
|
40
|
+
|
|
41
|
+
For example, to view [this dataset](https://minio-dev.openmicroscopy.org/idr/v0.3/idr0062-blin-nuclearsegmentation/6001240.zarr) from the IDR, navigate to the following URL:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
https://hms-dbmi.github.io/vizarr/?source=https://minio-dev.openmicroscopy.org/idr/v0.3/idr0062-blin-nuclearsegmentation/6001240.zarr
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2. Python API
|
|
48
|
+
|
|
49
|
+
The Python API is an [anywidget](https://github.com/manzt/anywidget), allowing programatic control of the viewer in computational notebooks like Jupyter, JupyterLab, Colab, and VS Code. The easiest way to get started is to open a Zarr store and load it into the viewer.
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import vizarr
|
|
53
|
+
import zarr
|
|
54
|
+
|
|
55
|
+
store = zarr.open("./path/to/ome.zarr")
|
|
56
|
+
viewer = vizarr.Viewer()
|
|
57
|
+
viewer.add_image(store)
|
|
58
|
+
viewer
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
To learn more, see the [getting started](./python/notebooks/getting_started.ipynb) notebook.
|
|
62
|
+
|
|
63
|
+
## Data types
|
|
64
|
+
|
|
65
|
+
**Vizarr** supports viewing 2D slices of n-Dimensional Zarr arrays, allowing
|
|
66
|
+
users to choose a single channel or blended composites of multiple channels
|
|
67
|
+
during analysis. It has special support for the developing OME-NGFF format for
|
|
68
|
+
multiscale and multimodal images. Currently, Viv supports `int8`, `int16`,
|
|
69
|
+
`int32`, `uint8`, `uint16`, `uint32`, `float32`, `float64` arrays, but
|
|
70
|
+
contributions are welcome to support more np.dtypes!
|
|
71
|
+
|
|
72
|
+
## Limitations
|
|
73
|
+
|
|
74
|
+
`vizarr` was built to support the registration use case above where multiple, pyramidal OME-Zarr images
|
|
75
|
+
are viewed within a Jupyter Notebook. Support for other Zarr arrays is supported but not as well tested.
|
|
76
|
+
More information regarding the viewing of generic Zarr arrays can be found in the example notebooks.
|
|
77
|
+
|
|
78
|
+
## Citation
|
|
79
|
+
|
|
80
|
+
If you are using Vizarr in your research, please cite our paper:
|
|
81
|
+
|
|
82
|
+
> Trevor Manz, Ilan Gold, Nathan Heath Patterson, Chuck McCallum, Mark S Keller, Bruce W Herr II, Katy Börner, Jeffrey M Spraggins, Nils Gehlenborg,
|
|
83
|
+
> "[Viv: multiscale visualization of high-resolution multiplexed bioimaging data on the web](https://www.nature.com/articles/s41592-022-01482-7)."
|
|
84
|
+
> **Nature Methods** (2022), [doi:10.31219/10.1038/s41592-022-01482-7](https://doi.org/10.1038/s41592-022-01482-7)
|
|
85
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|