Skip to content

Commit

Permalink
Merge pull request #7 from funkelab/array-overhaul
Browse files Browse the repository at this point in the history
Array overhaul
  • Loading branch information
pattonw authored Aug 30, 2024
2 parents 8f44cff + 2c3e5a9 commit f218bf0
Show file tree
Hide file tree
Showing 8 changed files with 445 additions and 408 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python Black

on: [push, pull_request]

jobs:
lint:
name: Python Lint
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Setup checkout
uses: actions/checkout@master
- name: Lint with Black
run: |
pip install black
black funlib/show/neuroglancer --diff --check
34 changes: 34 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish

on:
push:
tags: ["*"]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
29 changes: 29 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,32 @@ Currently contains:
- a modified ``video_tool.py`` to work with ``LocalVolume``

- a convenience method to add daisy-like arrays to a neuroglancer context

Usage
-----

You can use terminal glob syntax to select multiple volumes for visualization:

`neuroglancer path/to/your/data.zarr/and/volumes/*`

Extra optional arguments are:

- `--no-browser`
- `--bind-address`
- `--port`


We also have slicing support (This command will select only the first channel of raw from every crop):

`neuroglancer data.zarr/crop_*/raw[0]`

This can lead to a conflict if you want to use glob expansion to select multiple arrays.
Here it is unclear if you want to visualize the arrays `raw_1`, `raw_3`, `raw_4` and `raw_5`,
or if you want to visualize channel `1345` of the array `raw_`.

`neuroglancer data.zarr/raw_[1345]`

To make this less ambiguous, we allow the use of the `:` character to separate the array glob from the
slicing patter. So the following command will select the arrays `raw_1`, `raw_3`, `raw_4` and `raw_5`:

`neuroglancer data.zarr/raw_[1345]:`
10 changes: 7 additions & 3 deletions funlib/show/neuroglancer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from .video_tool import RenderArgs, run_edit, run_render
from .scale_pyramid import ScalePyramid
from .add_layer import add_layer
from .video_tool import (
RenderArgs as RenderArgs,
run_edit as run_edit,
run_render as run_render,
)
from .scale_pyramid import ScalePyramid as ScalePyramid
from .add_layer import add_layer as add_layer
Loading

0 comments on commit f218bf0

Please sign in to comment.