Skip to content

Add Split Segments Toolkit and Draw Mode for Skeleton Tool #8434

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

Merged
merged 93 commits into from
Apr 29, 2025
Merged
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
4945585
tmp: prototype tps surface for splitting segments
philippotto Mar 3, 2025
dcfa9ed
temporarily disable some CI checks
philippotto Mar 3, 2025
b5c4d42
also implement delauny and splines approach
philippotto Mar 4, 2025
ab08454
add missing saga
philippotto Mar 4, 2025
667fa5e
change default to splines
philippotto Mar 4, 2025
d1691ec
experiment with automatic ordering of points and flipping
philippotto Mar 4, 2025
a60c90f
fix typo
philippotto Mar 6, 2025
6f960e0
show spline on each section; don't cross surface in floodfill
philippotto Mar 6, 2025
00ab1b0
fix some stuff
philippotto Apr 8, 2025
f2504bf
allow to continously place skeleton nodes like in a draw tool
philippotto Apr 8, 2025
4f950f1
prototype workflow mode
philippotto Apr 9, 2025
f5a9cb5
Merge branch 'master' of github.com:scalableminds/webknossos into tps…
philippotto Apr 9, 2025
573f1b7
start introducing tool workspaces
philippotto Apr 9, 2025
8800265
some clean up
philippotto Apr 9, 2025
6bad426
fix ts errors
philippotto Apr 9, 2025
c05b06d
linting
philippotto Apr 9, 2025
71b584b
only generate bent surface when split workspace is active
philippotto Apr 9, 2025
6c6bcdb
remove lots of unused code (from old delauney and tps based approaches)
philippotto Apr 9, 2025
0c6ae1b
don't show edges if tree was created in split-workspace; more clean up
philippotto Apr 9, 2025
92c7c18
rename some stuff
philippotto Apr 9, 2025
26a1c1b
linting
philippotto Apr 9, 2025
664c8d7
move file
philippotto Apr 9, 2025
fa80d3c
fix bug
philippotto Apr 9, 2025
9ec00b5
wip: add badge dot to workspace dropdown
philippotto Apr 10, 2025
5dcef90
Merge branch 'master' of github.com:scalableminds/webknossos into tps…
philippotto Apr 10, 2025
f6f3bb9
fix missing type import
philippotto Apr 10, 2025
97c35cd
refactor annotation tool enums
philippotto Apr 11, 2025
85696f4
remove AnnotationToolType in favor of AnnotationTool
philippotto Apr 11, 2025
a4bc77b
rename control classes to ....ToolController; clean up tool label code
philippotto Apr 11, 2025
4ec5a0d
linting
philippotto Apr 11, 2025
833db7d
make use of hasOverwriteCapabilities properties etc
philippotto Apr 11, 2025
d2c9baa
rename tool workspace to toolkit
philippotto Apr 11, 2025
72ffdd1
use toolkit collection in toolbar
philippotto Apr 11, 2025
0488b7d
fix cycling of tools
philippotto Apr 11, 2025
cfc5527
fix some cyclic imports
philippotto Apr 11, 2025
a8d0e54
fix more cyclic dependencies and multiple bugs
philippotto Apr 11, 2025
0230fe0
tune toolkit view
philippotto Apr 14, 2025
c5c05ac
clean up
philippotto Apr 14, 2025
906843a
lint
philippotto Apr 14, 2025
6a22e96
ensure that changing active toolkit won't leave a tool activated that…
philippotto Apr 14, 2025
1cde4f0
refactor disable/re-enable tool logic to saga
philippotto Apr 14, 2025
b497b17
lint
philippotto Apr 14, 2025
546c9e5
remove verb-nurbs
philippotto Apr 14, 2025
1c27181
remove unnecessary global
philippotto Apr 14, 2025
2621179
fix yarn.lock (hopefully)
philippotto Apr 14, 2025
8ebe2c0
fix tests
philippotto Apr 14, 2025
240cf66
improve typing
philippotto Apr 14, 2025
f39d88c
merge tool saga into annotation tool saga
philippotto Apr 14, 2025
8b59a87
fix one tool spec; skip the other one for now
philippotto Apr 15, 2025
fd834d2
misc fixes for new skeleton brush mode
philippotto Apr 15, 2025
052c85e
fix tool cycling in view mode
philippotto Apr 15, 2025
27ab3ad
further clean up
philippotto Apr 15, 2025
4b3eb62
more clean up
philippotto Apr 15, 2025
6b96886
Merge branch 'master' of github.com:scalableminds/webknossos into tps…
philippotto Apr 15, 2025
abd87d6
update changelog
philippotto Apr 15, 2025
38a232d
automatically switch to default toolkit if in view mode
philippotto Apr 16, 2025
6e80117
sort imports
philippotto Apr 16, 2025
fd778e0
Merge branch 'master' of github.com:scalableminds/webknossos into tps…
philippotto Apr 17, 2025
5bfd5c3
make 2D floodfills possible on single section with new split boundary…
philippotto Apr 17, 2025
e69977b
forbid floodfill in other viewports if split toolkit is active
philippotto Apr 17, 2025
2315786
update surface on create tree and undo/redo
philippotto Apr 17, 2025
8692405
hide edges automatically for the active tree when the split tool is a…
philippotto Apr 17, 2025
7a867fe
Merge branch 'master' of github.com:scalableminds/webknossos into tps…
philippotto Apr 17, 2025
6408e56
fix spec
philippotto Apr 17, 2025
4bb5587
wip: indicator for different tool behavior
philippotto Apr 17, 2025
2f700cd
Merge branch 'master' of github.com:scalableminds/webknossos into tps…
philippotto Apr 22, 2025
3fa7455
remove commented code
philippotto Apr 22, 2025
89bbe1d
Update frontend/javascripts/oxalis/view/action-bar/toolkit_switcher_v…
philippotto Apr 22, 2025
0ed911d
Merge branch 'tps-split' of github.com:scalableminds/webknossos into …
philippotto Apr 22, 2025
98a2070
incorporate feedback
philippotto Apr 22, 2025
5767138
listen to more actions
philippotto Apr 22, 2025
7b7e752
add comments
philippotto Apr 22, 2025
87122a9
debounce saga
philippotto Apr 22, 2025
3454e58
iterate on ui
philippotto Apr 22, 2025
2c42d98
use fake enums for toolkit strings
philippotto Apr 22, 2025
ea64de6
clean up getPoints parameter
philippotto Apr 22, 2025
13cf9f4
update docs
philippotto Apr 23, 2025
429f82a
fix incorrect highlighting when measurement tool is active
philippotto Apr 23, 2025
c5b7c6b
refactor switch statement to record look up
philippotto Apr 23, 2025
28ee8ef
remove superfluous hint in tooltip
philippotto Apr 23, 2025
3b40430
add skeleton pen mode to docs
philippotto Apr 23, 2025
035aa53
Update docs/proofreading/split_segments_toolkit.md
philippotto Apr 25, 2025
06d26c5
Update docs/skeleton_annotation/tools.md
philippotto Apr 25, 2025
dbfb1bf
Update docs/proofreading/split_segments_toolkit.md
philippotto Apr 25, 2025
34510d0
Update docs/proofreading/split_segments_toolkit.md
philippotto Apr 25, 2025
d10ac1d
Update docs/proofreading/split_segments_toolkit.md
philippotto Apr 25, 2025
6cad801
Update docs/proofreading/split_segments_toolkit.md
philippotto Apr 25, 2025
87ef13d
use ordered list in docs
philippotto Apr 25, 2025
83b570e
Merge branch 'master' of github.com:scalableminds/webknossos into tps…
philippotto Apr 25, 2025
de74025
proof-read -> proofread; misc
philippotto Apr 25, 2025
99fd8c0
pr feedback
philippotto Apr 29, 2025
4e304ca
split toolbar_view into several files and move into action-bar/tools …
philippotto Apr 29, 2025
82bab40
Merge branch 'master' into tps-split
philippotto Apr 29, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export default function computeSplitBoundaryMeshWithSplines(points: Vector3[]):

// Number of points per curve
const numPoints = 50;
const numDivisions = numPoints - 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this now 49?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should be 50 points on the spline. this means that the line will be divided into 49 "sections". if threejs' getPoints function would require the point count, this would not be necessary. however, it requests a division count.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok a little unexpected. Thanks for the clarification 👍 (was unable to find the docs for getPoints in the catmull curve -> it is inherited as I just noticed 🙈)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I only saw it because my code editor showed the functions signature (thanks to TS).


// Sort z-values for interpolation
const sortedZValues = Object.keys(curvesByZ)
Expand All @@ -117,8 +118,8 @@ export default function computeSplitBoundaryMeshWithSplines(points: Vector3[]):
if (lowerZ === Number.NEGATIVE_INFINITY || upperZ === Number.POSITIVE_INFINITY) continue;

// Get the two adjacent curves and sample 50 points from each
const lowerCurvePoints = curvesByZ[lowerZ].getPoints(numPoints);
const upperCurvePoints = curvesByZ[upperZ].getPoints(numPoints);
const lowerCurvePoints = curvesByZ[lowerZ].getPoints(numDivisions);
const upperCurvePoints = curvesByZ[upperZ].getPoints(numDivisions);

// Interpolate between corresponding points
const interpolatedPoints = lowerCurvePoints.map((lowerPoint, i) => {
Expand All @@ -139,15 +140,15 @@ export default function computeSplitBoundaryMeshWithSplines(points: Vector3[]):

// Generate and display all curves
Object.values(curvesByZ).forEach((curve) => {
const curvePoints = curve.getPoints(numPoints);
const curvePoints = curve.getPoints(numDivisions);
const geometry = new THREE.BufferGeometry().setFromPoints(curvePoints);
const material = new THREE.LineBasicMaterial({ color: 0xff0000 });
const splineObject = new THREE.Line(geometry, material);
splines.push(splineObject);
});

// Generate grid of points
const gridPoints = curves.map((curve) => curve.getPoints(numPoints - 1));
const gridPoints = curves.map((curve) => curve.getPoints(numDivisions));

// Flatten into a single array of vertices
const vertices: number[] = [];
Expand Down