catmaid / CATMAID

Collaborative Annotation Toolkit for Massive Amounts of Image Data
https://catmaid.org
GNU General Public License v3.0
185 stars 56 forks source link

Label volume visualization and painting #1801

Open aschampion opened 5 years ago

aschampion commented 5 years ago

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:

  1. Data exchange via import / export
  2. Navigation and selection synchronization
  3. Versioned state synchronization via common backends / data providers

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

Volumetric stack access and rendering

Label stack specification and visualization

Painting

Unresolved questions

Alternatives

Known limitations

Misc. notes

cc @tomka @bellonet

aschampion commented 5 years ago

Day 1 meeting outcomes

Strategy

Design

Tasks

aschampion commented 5 years ago

Day 3 group hacking

Tasks

Later Cleanup

aschampion commented 5 years ago

Day 5 meeting outcomes

End 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

aschampion commented 5 years ago

Some cleanup tasks and code merging plans after the week is up:

N5

H2N5

n5-wasm

CATMAID

Merge order/branch dependencies for features:

aschampion commented 5 years ago

Backend specification of stack type, either Raw or Label.

@tomka Regarding this, now that the frontend LabelAnnotations transitively infers the equivalence of label stacks via groups they are related to as views, I'm wondering if a different approach to specifying stack type should be taken. The motivation is this: if we want to start adding annotations to label IDs, that label ID needs to be scoped to a label stack. However, this may not be one stack, but many sharing the same label set/semantics. Hence we want to be able to create something in the Class system that is a label space, to which either stacks or stack groups can be related. In that design, the most meaningful specification of whether a stack is a label stack is not a property on individual stacks, but whether a stack (via StackClassInstance) or any of its view-related stack groups (via StackGroupClassInstance) is related to a label space class instance.

But maybe we should go with the simpler, Stack field solution first. I just hate making migrations likely to be superceded soon after.

aschampion commented 5 years ago

Summary of changes (mostly from gitter) and additional tasks:

aschampion commented 5 years ago

Progress tracking for tested label bit depth support

bits vis (shader hash) shader ids selection issues
8 :white_check_mark: shader generality
16 shader generality
24/32 :white_check_mark: :white_check_mark: :white_check_mark:
32 :white_check_mark: premultiplied alpha
48/64 16bpp, bigint, shader p
53/64 premultiplied alpha, 16bpp, bigint, shader p
64 premultiplied alpha, 16bpp, bigint, shader p, js numerics
aschampion commented 5 years ago

Minor update: bit depths > 32 are waiting on scijs/ndarray#43 to be merged (which will then need a release and an update in numjs).