Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
02c8ec6
Ichnaea working code on top of v2.40.1
Jul 1, 2025
558713e
fix rebase
Jul 1, 2025
416dcd6
Merge pull request #1 from r2dliu/ichnaea
r2dliu Jul 1, 2025
43f63cf
fix merge
Jul 1, 2025
f2fc549
more cleanup
Jul 1, 2025
04bf252
remove old test
Jul 1, 2025
a507e70
fix additional missed merge files
r2dliu Jul 7, 2025
8ba1c05
fix uint64t migration
r2dliu Jul 7, 2025
ea9e9ea
remove voxel offset
r2dliu Aug 19, 2025
129697d
Refactor brush & eraser functionality
r2dliu Aug 26, 2025
d850b49
fix lint
r2dliu Aug 27, 2025
183ed69
fix more lint errors
r2dliu Aug 27, 2025
a505caf
fix: restore working package-lock.json from upstream base
r2dliu Aug 27, 2025
80bfcfd
fix issue with empty arrays
r2dliu Sep 10, 2025
d9570f9
remove console log
r2dliu Sep 18, 2025
a1d1574
update console logs
r2dliu Oct 3, 2025
e370da5
color override support
r2dliu Oct 7, 2025
f8f2f96
add new delete segment property function
r2dliu Oct 8, 2025
9020a84
Colormaps and sliders
s-n-i Nov 16, 2024
516a1f9
clean up types
r2dliu Jan 8, 2026
99893e9
Merge remote-tracking branch 'origin/master'
r2dliu Jan 30, 2026
12962d8
use canonical voxels to fit brush cursor footprint
r2dliu Feb 11, 2026
a7a75a6
Invalidate shard index cache when chunk source cache is invalidated
r2dliu Feb 11, 2026
806c8bb
fix: omero now reads correctly for OME-Zarr 0.5
r2dliu Feb 19, 2026
eab81aa
fix broken color parsing as a result of fixing the metadata read
r2dliu Feb 19, 2026
1671a47
fix glsl variable
r2dliu May 18, 2026
d8cc9e4
remove log
r2dliu May 19, 2026
61e7b69
expose clipping planes
r2dliu May 19, 2026
6ca37fa
use interpolated value for 3d rendering
r2dliu May 20, 2026
1a70837
remove default volume depth
r2dliu May 21, 2026
88457ec
fix LUT and shader interactions
r2dliu May 26, 2026
3603d30
remove sentinel checks. use different logic
r2dliu May 27, 2026
0a3b249
move around brush stroke zyx ordering
r2dliu May 28, 2026
8879730
working soft invalidation, keep chunks in memory before loading new o…
r2dliu May 29, 2026
9d6e8de
brush strokes work on 3d cross sections now
r2dliu May 29, 2026
3768a88
loads actual colors and works for multiple segmentation layers
r2dliu May 29, 2026
8af8621
fixed eraser offset issue
r2dliu May 29, 2026
96956a8
fix scaling issues with eraser
r2dliu May 29, 2026
60ca142
remove debug logs
r2dliu May 29, 2026
e4be3ab
hide cursor on exit
r2dliu May 29, 2026
8da52ae
fix lint issues, get brush and eraser to interpolate while dragging
r2dliu May 30, 2026
ad19b43
cleanup
r2dliu May 30, 2026
129d93a
small fixes for refetching voxels and eraser / brush render
r2dliu Jun 1, 2026
3c7abaa
highlight individual instances
r2dliu Jun 4, 2026
5fe5116
fix eraser and brush boundaries
r2dliu Jun 4, 2026
9eed60c
add dim / highlight
r2dliu Jun 9, 2026
a8f8845
Fix voxel offset issues
r2dliu Jun 10, 2026
4b95097
cleanup unused render layer
r2dliu Jun 10, 2026
73a3cc0
feat: build custom annotation tool, which allows for drawing arbitrar…
r2dliu Jun 17, 2026
0f270fb
fix gizmo rendering during drag
r2dliu Jun 22, 2026
5745b3b
allow ichnaea to controll annotation state
r2dliu Jun 22, 2026
1f54d9d
support individual region visibility and culling. fix some rotation bugs
r2dliu Jun 23, 2026
9e8e4ac
remove ichnaea specific logic
r2dliu Jun 23, 2026
6cb1141
fix: use the center of the box for calculating gizmo appearance inste…
r2dliu Jun 30, 2026
0b3cc9f
fix: no longer get stuck in dragging state
r2dliu Jun 30, 2026
8b430ed
fix reversed x and z in gizmo
r2dliu Jul 7, 2026
487f085
brush and eraser can now handle oblique planes
r2dliu Jul 8, 2026
aead85e
fix pin holes
r2dliu Jul 9, 2026
e9a75b4
add show meshes toggle. make meshes respect clipping planes
r2dliu Jul 27, 2026
eca5d89
output proper typescript types
r2dliu Jul 28, 2026
a895643
fix import
r2dliu Jul 28, 2026
fe63038
Feat/vectorize (#12)
r2dliu Oct 1, 2026
6fee32f
lint files, remove unusable preview files
r2dliu Oct 1, 2026
140efcc
update test snapshots
r2dliu Oct 1, 2026
25e63ce
fix region not rendering in foreground
r2dliu Oct 5, 2026
68b1e2a
chore: remove debug comments
r2dliu Oct 6, 2026
6b65376
clip dataset properly
r2dliu Oct 19, 2026
3b5e8f0
refactor: tools declare primary actions instead of hard coding controls
r2dliu Oct 23, 2026
5c3ffbc
new binding pattern
r2dliu Oct 27, 2026
e29bc7f
Segment attribute rendering and layer-mesh features
r2dliu Nov 6, 2026
b6f643a
Fork-review fixes: soft refetch, mesh queue, picking, mesh feature ids
r2dliu Nov 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build

Check warning on line 1 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

build.yml:1: overly broad permissions: default permissions used due to no permissions: block

on:
push:
Expand All @@ -16,7 +16,7 @@
default: false

jobs:
client:

Check warning on line 19 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

build.yml:19: overly broad permissions: default permissions used due to no permissions: block
strategy:
matrix:
os:
Expand All @@ -25,23 +25,23 @@
- "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

Check failure on line 28 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 28 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

build.yml:28: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
# Need full history to determine version number.
fetch-depth: 0
- uses: actions/setup-node@v4

Check failure on line 32 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 32 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

build.yml:32: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
node-version: 22.x
cache: "npm"
cache-dependency-path: |
package-lock.json
# uv required for javascript tests
- uses: astral-sh/setup-uv@v5

Check failure on line 39 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 39 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

build.yml:39: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
enable-cache: false
# go needed for fake_gcs_server used by the javascript tests
- name: Setup go
uses: actions/setup-go@v5

Check failure on line 44 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 44 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

build.yml:44: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
go-version: "stable"
- run: npm ci
Expand Down Expand Up @@ -71,23 +71,23 @@
- name: Run JavaScript benchmarks
run: npm run benchmark
- name: Upload NPM package as artifact
uses: actions/upload-artifact@v4

Check failure on line 74 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 74 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

build.yml:74: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
name: npm-package
path: dist/package
if: ${{ runner.os == 'Linux' }}
- name: Upload client as artifact
uses: actions/upload-artifact@v4

Check failure on line 80 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 80 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

build.yml:80: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
name: client
path: dist/client
if: ${{ runner.os == 'Linux' }}
example-project-test:

Check warning on line 85 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

build.yml:85: overly broad permissions: default permissions used due to no permissions: block
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Check failure on line 88 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 88 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

build.yml:88: unpinned action reference: action is not pinned to a hash (required by blanket policy)
- name: Install pnpm
uses: pnpm/action-setup@v4

Check failure on line 90 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

build.yml:90: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
version: 10
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -118,11 +118,11 @@
# On ubuntu-latest, this also runs browser-based tests. On Mac OS and
# Windows, this only runs tests that do not require a browser, since a working
# headless WebGL2 implementation is not available on Github actions.
python-tests:

Check warning on line 121 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

build.yml:121: overly broad permissions: default permissions used due to no permissions: block
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.12"
os:
- "ubuntu-latest"
Expand Down Expand Up @@ -161,7 +161,7 @@
- name: Test in editable form
run: uvx nox -s test_editable

python-build-package:

Check warning on line 164 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

build.yml:164: overly broad permissions: default permissions used due to no permissions: block
strategy:
matrix:
include:
Expand All @@ -171,9 +171,6 @@
- os: "windows-latest"
cibw_build: "*"
wheel_identifier: "windows"
- os: "macos-14"
cibw_build: "*_x86_64"
wheel_identifier: "macos_x86_64"
- os: "macos-14"
cibw_build: "*_arm64"
wheel_identifier: "macos_arm64"
Expand Down Expand Up @@ -223,7 +220,7 @@
dist/*.whl
dist/*.tar.gz

docs:

Check warning on line 223 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

build.yml:223: overly broad permissions: default permissions used due to no permissions: block
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -247,7 +244,7 @@
path: |
dist/docs

publish-package:

Check warning on line 247 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

build.yml:247: overly broad permissions: default permissions used due to no permissions: block
# Only publish package on push to tag or default branch.
if: ${{ github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -277,14 +274,14 @@
# user: __token__
# password: ${{ secrets.pypi_test_token }}
- name: Publish to PyPI (main server)
uses: pypa/gh-action-pypi-publish@54b39fb9371c0b3a6f9f14bb8a67394defc7a806 # 2020-09-25

Check failure on line 277 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/known-vulnerable-actions

action has a known vulnerability: GHSA-vxmw-7h4f-hqxh

Check failure on line 277 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/known-vulnerable-actions

action has a known vulnerability: GHSA-5xjx-3w67-w9x9

Check warning on line 277 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

ref-version-mismatch

build.yml:277: action's hash pin has mismatched or missing version comment: points to unknown ref

Check failure on line 277 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

known-vulnerable-actions

build.yml:277: action has a known vulnerability: GHSA-vxmw-7h4f-hqxh

Check failure on line 277 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

known-vulnerable-actions

build.yml:277: action has a known vulnerability: GHSA-5xjx-3w67-w9x9

Check notice on line 277 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

use-trusted-publishing

build.yml:277: prefer trusted publishing for authentication: this step
with:
user: __token__
password: ${{ secrets.pypi_token }}
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Publish to NPM registry
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: npm publish

Check notice on line 284 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

use-trusted-publishing

build.yml:284: prefer trusted publishing for authentication: this command
working-directory: npm-package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down Expand Up @@ -315,7 +312,7 @@
channelId: live
target: docs

ngauth:

Check warning on line 315 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

build.yml:315: overly broad permissions: default permissions used due to no permissions: block
strategy:
matrix:
os:
Expand All @@ -330,7 +327,7 @@
cache-dependency-path: ngauth_server/go.sum
- run: go build .
working-directory: ngauth_server
wasm:

Check warning on line 330 in .github/workflows/build.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

build.yml:330: overly broad permissions: default permissions used due to no permissions: block
# Ensures that .wasm files are reproducible.
strategy:
matrix:
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/build_docs_preview.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/build_preview.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .github/workflows/deploy_docs_preview.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .github/workflows/deploy_preview.yml

This file was deleted.

14 changes: 14 additions & 0 deletions HOW-TO-USE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
The following should already be included as the Shader

```
#uicontrol invlerp normalized(clamp=true)
void main() {
float v = normalized(getDataValue(0));
vec4 rgba = vec4(lut[int(v*255.)].r, lut[int(v*255.)].g, lut[int(v*255.)].b, 1.0);
emitRGBA(rgba);
}
```

when loading this URL.

http://localhost:8080/#!%7B%22dimensions%22:%7B%22x%22:%5B8e-9%2C%22m%22%5D%2C%22y%22:%5B8e-9%2C%22m%22%5D%2C%22z%22:%5B8e-9%2C%22m%22%5D%7D%2C%22position%22:%5B3156.4873046875%2C3793.629638671875%2C3543.705810546875%5D%2C%22crossSectionScale%22:3.762185354999915%2C%22projectionOrientation%22:%5B0.31435418128967285%2C0.8142172694206238%2C0.4843378961086273%2C-0.06040274351835251%5D%2C%22projectionScale%22:4593.980956070107%2C%22layers%22:%5B%7B%22type%22:%22image%22%2C%22source%22:%22precomputed://gs://neuroglancer-public-data/flyem_fib-25/image%22%2C%22tab%22:%22rendering%22%2C%22shader%22:%22#uicontrol%20invlerp%20normalized%28clamp=true%29%5Cnvoid%20main%28%29%20%7B%5Cn%20%20float%20v%20=%20normalized%28getDataValue%280%29%29%3B%5Cn%20%20vec4%20rgba%20=%20vec4%28lut%5Bint%28v%2A255.%29%5D.r%2C%20lut%5Bint%28v%2A255.%29%5D.g%2C%20lut%5Bint%28v%2A255.%29%5D.b%2C%201.0%29%3B%5Cn%20%20emitRGBA%28rgba%29%3B%5Cn%7D%22%2C%22name%22:%22image%22%7D%2C%7B%22type%22:%22segmentation%22%2C%22source%22:%22precomputed://gs://neuroglancer-public-data/flyem_fib-25/ground_truth%22%2C%22tab%22:%22source%22%2C%22segments%22:%5B%2221894%22%2C%2222060%22%2C%22158571%22%2C%2224436%22%2C%222515%22%5D%2C%22name%22:%22ground-truth%22%7D%5D%2C%22showSlices%22:false%2C%22selectedLayer%22:%7B%22size%22:390%2C%22visible%22:true%2C%22layer%22:%22image%22%7D%2C%22layout%22:%224panel%22%7D
1 change: 1 addition & 0 deletions build_tools/build-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function buildDeclarationFiles(
...options,
declaration: true,
emitDeclarationOnly: true,
noEmit: false,
};
const program = ts.createProgram(fileNames, options);
program.emit();
Expand Down
2 changes: 1 addition & 1 deletion python/neuroglancer/viewer_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ def navigation_link_type(x):
x = str(x)
x = x.lower()
if x not in ["linked", "unlinked", "relative"]:
raise ValueError("Invalid navigation link type: %r" % x)
raise ValueError(f"Invalid navigation link type: {x!r}")
return x


Expand Down
7 changes: 7 additions & 0 deletions src/annotation/annotation_layer_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ export class AnnotationDisplayState extends RefCounted {
this.ignoreNullSegmentFilter,
);
hoverState = new AnnotationHoverState(undefined);
selectedAnnotation = new WatchableValue<string | undefined>(undefined);
hoverPinned = false;
// Not happy with this pattern but fine for the time being; internally neuroglancer
// has a built in hover/pick for annotations; we could use a different variable
// but for simplicity Ichnaea externally reuses selectedAnnotation, and this variable
// acts as a gate to prevent other parts of neuroglancer from mutating on top of it
controlledSelection = false;
}

export class AnnotationLayerState extends RefCounted {
Expand Down
2 changes: 1 addition & 1 deletion src/annotation/bounding_box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ emitLine(uModelViewProjection * vec4(endpointA, 1.0),
${this.setPartIndex(builder, "uint(aBoxCornerOffset2.w)")};
`);
builder.setFragmentMain(`
emitAnnotation(vec4(vColor.rgb, getLineAlpha() * vClipCoefficient));
emitAnnotation(vec4(vColor.rgb, vColor.a * getLineAlpha() * vClipCoefficient));
`);
},
);
Expand Down
30 changes: 30 additions & 0 deletions src/annotation/frontend_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,36 @@ export class MultiscaleAnnotationSource
tempUpper[i] = c + r;
}
break;
case AnnotationType.ORIENTED_BOUNDING_BOX: {
matrix.transformPoint(
tempLower,
source.multiscaleToChunkTransform,
rank + 1,
annotation.center,
rank,
);
matrix.transformVector(
tempUpper,
source.multiscaleToChunkTransform,
rank + 1,
annotation.extents,
rank,
);
// Conservative bound independent of orientation: the box fits within a
// sphere of radius 0.5 * |extents| about its center.
let radiusSq = 0;
for (let i = 0; i < rank; ++i) {
const h = tempUpper[i] * 0.5;
radiusSq += h * h;
}
const radius = Math.sqrt(radiusSq);
for (let i = 0; i < rank; ++i) {
const c = tempLower[i];
tempLower[i] = c - radius;
tempUpper[i] = c + radius;
}
break;
}
}
let totalChunks = 1;
for (let i = 0; i < rank; ++i) {
Expand Down
Loading
Loading