-
Notifications
You must be signed in to change notification settings - Fork 57
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
Label volume visualization and painting #1801
Comments
Day 1 meeting outcomesStrategy
Design
Tasks
|
Day 3 group hackingTasks
Later Cleanup
|
Day 5 meeting outcomesEnd of day goals were set to show independent progress on the three main components of this solution: Volumetric stack access and rendering
Label stack specification and visualization
Painting
|
Some cleanup tasks and code merging plans after the week is up: N5
H2N5
n5-wasm
CATMAIDMerge order/branch dependencies for features:
|
@tomka Regarding this, now that the frontend But maybe we should go with the simpler, |
Summary of changes (mostly from gitter) and additional tasks:
|
Progress tracking for tested label bit depth support
|
Minor update: bit depths > 32 are waiting on scijs/ndarray#43 to be merged (which will then need a release and an update in |
This is a tracking ticket for MVP visualization and painting of label volumes via CATMAID.
Goals
Non-goals
Our vision for CATMAID does not include a rich, general-purpose painting tool or segmentation proofreading tool, encompassing features like:
Instead, we believe these are the purview of other tools like Paintera / BigCat / neuroglancer and that CATMAID should interoperate with these tools. Our vision for interoperation is incremental, progressive enhancement through three general stages of:
The plan below builds towards this vision. Relatedly, features that would be handled by such a state synchronization backend are also non-goals, such as the N-dimensional persistence itself, efficient delta exchange and conflict resolution.
Prior work
A painting layer was previously prototyped by Larry in CATSOP (#533, catsop feature branch). However, this was never merged to mainline CATSOP (which in turn was never merged into mainline CATMAID). Painting was never a development focus of CATSOP; the majority of CATSOP development was dealing either with SOPNET-specific issues, WebGL support (merged into CATMAID), database scaling optimization (partially merged into CATMAID), or the more general problem of dependent dataflow synchronization in a distributed, collaborative setting. None of these are goals here.
Draft plan
General prerequisite infrastructure
package.json
and webpack bundle for frontendindex.html
numjs
is built on top ofndarray
and has the most useful functionality, slicing and view.Volumetric stack access and rendering
ImageBlockLayer
, comparable toTileLayer
, for rendering N5 image volumes in theStackViewer
. Note that unlike tile layers this will be WebGL-only (via Pixi for now) likePixiTileLayer
, without a legacy DOM fallback.StackLayer
abstract base class which bothTileLayer
andImageBlockLayer
can extend (or into mixin/component if appropriate)Option AImageBlockLayer
fromPixiTileLayer
, keeping the majority of tile creation logic.ImageBlockLayer
should refer to anImageBlockCache
(orImageBlockStore
orImageBlockManager
), similar to the global texture cache.ImageBlockCache
should have a CATMAID event bus for mutation and eviction, to whichImageBlockLayer
subscribes, orImageBlockLayer
must have explicit notification methods for block-specific redraws. This is necessary for block mutation during painting.ImageBlockCache
should also track a state identifier for the last version of each block in the cache received from n5-wasm. Initially this will be either an mtime or content hash.imageValueAtLocation
or similar method toTileLayer
that looks up the image intensity value for a location inside the current view boundary. This would already be useful for querying intensity in raw stacks, but will be necessary for label picking in label stacks.http://example.org/path/to/folder.n5/group/dataset/%SCALE_DATASET%/0_1_3
Label stack specification and visualization
Raw
orLabel
. @tomka and I have discussed alternatives (e.g., property ofProjectStack
, specification via relation like stack groups and channels) and are fine with this being a new column directly onStack
.StackClassInstance
related properties or in the N5attributes.json
. For now this is stored in a magicStack.metadata
property,catmaidLabelMeta.specialLabels
.SkeletonAnnotations
in that they coordinate the selection state, display and mutation of label annotations in tools, but rather than having one per project, there is one per open label stack.ImageBlockLayer
is supportedImageBlockCache
and theImageBlockLayer
, possibly through a wrapper. In this design label mapping occurs in Javascript and the texture uploaded to the GPU would be the global label IDs.LabelFilter
filters that are applied to theImageBlockLayer
through the existingPixiLayer
filter system. This is already partially implemented (cc @clbarnes).RandomizedLayerColorMap
orObjectLabelColorMap
filters).ObjectLabelColorMap
, but can later be adapted to assign particular colors via a label selection source model just as skeleton sources do now.Painting
ImageBlockLayer
.ImageBlockCache
backing the label layer.Option BStrokes are painted directly into theImageBlockCache
.N5 doesn't support multi-block locking, but rust-n5 could be trivially extended to do so.The webservice itself will handle multi-block locking, as it would also be responsible for any future, more elaborate, conflict resolution mechanism.ClassInstance
representing the CATMAID ontology object for this label.Unresolved questions
Alternatives
ImageBlockCache
functionality in wasm. This functionality will likely be provided by an external library in future iterations anyway.N5Writer
directly over WebDAV and bypass the CATMAID backend for block writing, but WebDAV is a mess and few implementations provide locking.N5Writer
for a generic RESTful HTTP backend.Known limitations
Misc. notes
cc @tomka @bellonet
The text was updated successfully, but these errors were encountered: