-
Notifications
You must be signed in to change notification settings - Fork 333
Feature/voxel annotation #858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
briossant
wants to merge
123
commits into
google:master
Choose a base branch
from
briossant:feature/voxel-annotation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 113 commits
Commits
Show all changes
123 commits
Select commit
Hold shift + click to select a range
094cfdc
feat: add new dummy layer type: voxel annotation (vox)
briossant bb1c256
feat: add a new dummy pixel tool
briossant 69b1e22
feat: retreive mouse position and current LOD scale
briossant 488c184
feat: add support for voxel annotation rendering and specification
briossant fa6ecd5
feat: introduce VoxDummyChunkSource for procedural voxel annotation demo
briossant a52bad1
feat: no errors but no checkboard tho
briossant dcf7e12
feat: finaly the checkboard is showing, but it is a bit bugged out, i…
briossant 935509b
doc: rework voxel annotation specs
briossant d0ce4ca
feat: working on the pixel tool, there are interaction but a bug seem…
briossant 767006c
feat: pixel tool is now working as intended
briossant d94ee5a
feat: fix pixel tool not working when the scale is not equal to the g…
briossant b81186c
refactor: rename DummyMultiscaleVolumeChunkSource to VoxMultiscaleVol…
briossant a121d4b
feat: brush size, eraser mode and little trivial optimization
briossant cbff7a4
feat: continuous drawing and shape selection for the brush
briossant bbe859f
doc: add TODO list
briossant 7eba8ec
feat: small improvement on the drawing render delay
briossant 119450f
feat: persist voxel edits to backend and improve drawing responsiveness
briossant 76975cf
feat: redesign toolbox with structured layout, tool selection, and ex…
briossant 514ecd8
feat: implement new local voxel storage with IndexedDB, map initializ…
briossant 85f6d69
doc: brainstorming LOD
briossant 451c69b
feat: support region-based voxel initialization with corners, update …
briossant a8f9454
feat: expand TODOs with plans for segmentation compression, multi-use…
briossant f6e3547
feat: implement voxel label creation, persistence via IndexedDB, and …
briossant 8ec4e90
feat: implement RPC-based voxel label persistence
briossant 732132e
refactor: ran 'npm run format:fix'
briossant 2c50dcb
feat: add support for remote voxel sources via HTTP(S) - (note: the l…
briossant 32d7b72
feat: replace `setLabelIds` with `addLabel` for label management
briossant 904591e
doc: add guidelines for junie and write project overview file
briossant eb4c0e3
feat: map creation and selection, the min scale is currently not save…
briossant 8cfd644
feat: cleanup map init/selection implementation, the remote still nee…
briossant 792c8fa
refactor: remove `VoxelPixelLegacyTool`, update references, and enabl…
briossant a718320
feat: add LOD locking for voxel rendering and extend brush size range
briossant 3bab282
feat: move local and remote VoxSource to separate files, updated the …
briossant 5e88dcf
feat: move local and remote VoxSource to separate files, updated the …
briossant 5796116
feat: introduce chunk reload and downsample propagation APIs
briossant 33d051a
feat: chunk reloading from the backend -> currently do not work due t…
briossant cad4a80
feat: add Zarr export functionality and dirty-tree upscaling (not wor…
briossant 8cc92dc
feat: dirty tree upscaling is kinda working, at least enough to concl…
briossant ba6ae20
feat: restrict brush size and disable dirty tree upscaling
briossant a01be95
feat: introduce VoxelEditController for centralized edit handling and…
briossant 944998a
refactor: improve chunk invalidation and reload workflows
briossant 769f6ca
feat: add flood fill tool and export UI improvements
briossant 1de7c59
feat: implement downscale job queue and improve chunk reload handling
briossant a030b50
feat: enhance flood fill stability and optimize Zarr export
briossant f47b41b
feat: rework map settings UI and add import/export improvements
briossant ea0832b
doc: update TODOs
briossant 6c8ac37
feat: add Zarr import support and integrate remote chunk fallback
briossant 9c2cfed
feat: add error handling for flood fill and display draw error messages
briossant f980626
Add `weekly-progress.md` to document the voxel annotation project's p…
briossant 3810f61
feat: introduce `LabelsManager` for label management and cleanup `Vox…
briossant d16fb23
refactor: remove `RemoteVoxSource` and refactor related components fo…
briossant 3dd2e99
feat: add Stateless S3 Authenticator (SSA) integration with KVStore
briossant 1838e52
feat: upgrade SSA flow to OIDC-based authentication with PKCE support
briossant 6890dbe
feat: enhance SSA KVStore integration and improve authentication logic
briossant e749b7a
feat: add backend integration for SSA KVStore
briossant f100dfa
refactor: consolidate SSA URL utilities and improve PKCE verifier gen…
briossant cbeb5ca
feat: add IndexedDB-backed KVStore implementation
briossant b51bf6b
feat: move the downscaling queue to the EditController backend and re…
briossant 5c66105
feat: replace IndexedDB implementation with OPFS-backed KVStore
briossant 5c35cdd
feat: add OPFS-backed KVStore module registration
briossant 78056f7
chore: remove unused voxel annotation modules and associated logic
briossant d838eec
feat: enhance VoxUserLayer with configurable multiscale source option…
briossant dc74576
fix: rework getVoxelPositionFromMouse to give the right coords
briossant ac03537
refactor: simplify getVoxelPositionFromMouse logic by removing redund…
briossant 73834c6
feat: optimize voxel drawing and transform caching
briossant 118711c
feat: modularize `VolumeChunk` and chunk format handling
briossant 402256c
feat: implement multiscale voxel editing and raw chunk encoding pipeline
briossant b24666e
feat: improve chunk handling and integrate SSA write/delete support (…
briossant 35c58a1
feat: enhance retry logic, s3 support, and voxel annotation
briossant 235af99
feat: add targeted chunk invalidation and improve voxel annotation pr…
briossant fd15293
feat: remove legacy local://voxel-annotations code and improve chunk …
briossant d59de80
feat: update voxel editing to support bigint values and improve label…
briossant 3ef5f98
feat: refactor voxel annotation handling to support bigint and improv…
briossant ff0c70b
feat: convert voxel values to BigInt for improved precision in annota…
briossant 9ceb2ad
feat: refactor voxel annotation to support multiscale resolutions and…
briossant c8b079b
feat: improve uncompressed chunk editing and fix TODOs
briossant 06abea9
feat: add undo/redo support for voxel editing and enhance change trac…
briossant c51788d
fix: add mask for label generation to ensure it respect the DataType
briossant 6c5cbf1
feat: enhance disk brush tool with arbitrary plane support
briossant 45fb2c9
fix: ensure voxel coordinates align between CPU and GPU
briossant bb4698a
fix: adjust default `voxFloodMaxVoxels` and refine flood fill plane l…
briossant d2afe3f
chore: cleanup dev files and format + lint code
briossant cba1c9f
fix: properly align flood fill seed
briossant 176f96a
refactor: start switching vox tools to the new tool system
briossant 8c7fadb
refactor: fully migrate voxel tools to new tool system
briossant a1d56f1
feat: add dynamic cursor support for brush and flood fill tools
briossant c845d0d
feat: improve voxel layer rendering and UI enhancements
briossant fdef2c0
refactor: Merging vox layer into seg and img layers
briossant b46224e
feat: took care of every remaining ts errors
briossant a8feb09
feat: add writable subsource support and enable voxel editing
briossant 595bba0
feat: add in-memory voxel editing capabilities
briossant ba01de6
feat: add support for compressed chunks in applyEdits() and zarr write()
briossant b2cc38d
feat: add dynamic cursor for voxel picker tool
briossant 1a20724
refactor: replace the SingleScaleVolumeChunkSource with a proper Mult…
briossant 557ce29
fix: finally found the bug of the drawing preview -> getChunk of InMe…
briossant c7edca0
refactor: rewrite the InMemoryVolumeChunkSource to no longer create a…
briossant 0f38e50
feat: add chunk invalidation for the preview sources
briossant d89174a
fix: undo stack was corrupted
briossant 85e7f2d
chore: lint + format
briossant 83316aa
feat: save writable state to json state
briossant b7dec47
refactor: replace label system with paint value mechanism and simplif…
briossant c1cbb8b
feat: add state serialization and restoration for voxel editing context
briossant 3acf73f
fix: planeNormal used to aligned floddfill and brush was wrong if the…
briossant 48761ed
refactor: format + lint + cleanup
briossant 8e11ffd
feat: ensure the draw tab is only visible if there is a writable source.
briossant e119731
fix: the brush cursor was disappearing because browsers have a limita…
briossant bef93e3
fix: ensure brush cursor is shown on tool activation
briossant b306e07
refactor(voxel-annotations): remove obsolete color controls and limit…
briossant 3b7650e
fix(voxel-annotations): do not display the brush cursor in the 3d view
briossant 3a7ebbc
refactor(voxel-annotations): rework chunk reloading pipeline -> wait …
briossant 8eca17e
refactor(voxel-annotations): previous commit introduced serious flick…
briossant 9c1cfd0
chore(voxel-annotations): Adjust flood fill to avoid small artifacts.
briossant 2513c55
feat(voxel-annotations): add support for the seg picker tool to cycle…
briossant fb029f6
feat(datasource): add POC for dataset creation feature : ui + main pi…
briossant c6592b0
fix(datasource): correct the dataset creation POC to actually produce…
briossant 0ab5bd5
feat(datasource): started generalizing dataset creation feature
briossant 77b1317
chore: run format
briossant f67b9b8
refactor(datasource): simplify dataset creation UI and remove unused …
briossant 898d8f5
fix(datasource): ensure datasource gets reloaded upon creation
briossant d4c171a
fix(voxel-annotation): support every data type (expect float32)
briossant cdd14be
feat(datasource): implement support for gzip and blosc codecs in enco…
briossant bc84ca0
chore: format code + update TODOs
briossant b5d90b8
refactor(datasource): following @chrisj comment: generalize KvStore i…
briossant File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,3 +26,6 @@ tsconfig.tsbuildinfo | |
| -/docs/python/api/index.rst | ||
| /docs/python/api/*.rst | ||
| /.vite | ||
| /.idea | ||
| /.local | ||
| /.env | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /** | ||
| * Minimal Zarr encode pipeline to persist chunks. | ||
| * Supports only the common case of raw bytes (no transpose/compression/sharding). | ||
| */ | ||
| import type { CodecChainSpec } from "#src/datasource/zarr/codec/index.js"; | ||
| import { CodecKind } from "#src/datasource/zarr/codec/index.js"; | ||
|
|
||
| export async function encodeArray( | ||
| codecs: CodecChainSpec, | ||
| typed: ArrayBufferView<ArrayBufferLike>, | ||
| _signal: AbortSignal, | ||
| ): Promise<Uint8Array<ArrayBufferLike>> { | ||
| // Only support simple "bytes" encoding with no array-to-array and no bytes-to-bytes codecs. | ||
| const hasArrayToArray = codecs[CodecKind.arrayToArray].length > 0; | ||
| const hasBytesToBytes = codecs[CodecKind.bytesToBytes].length > 0; | ||
| const arrayToBytes = codecs[CodecKind.arrayToBytes]; | ||
| if (hasArrayToArray || hasBytesToBytes || arrayToBytes.name !== "bytes") { | ||
| throw new Error( | ||
| `encodeArray: Unsupported codec chain; only raw 'bytes' without additional codecs is supported. Got arrayToArray=${hasArrayToArray}, bytesToBytes=${hasBytesToBytes}, arrayToBytes=${arrayToBytes.name}`, | ||
| ); | ||
| } | ||
| // For raw bytes, we can write the underlying buffer. | ||
| const { buffer, byteOffset, byteLength } = typed; | ||
| return new Uint8Array(buffer, byteOffset, byteLength); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would avoid casting as any, it makes it hard to follow. kvStore in zarr is explictly a
ReadableKvStoreso I think you want to change that to a normal KvStore.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I will look into that. I originally did this as part of my non-destructive workflow (e.g. I wanted to modify as little as possible of preexisting neuroglancer code while prototyping), but this makes no more sense now.