feat: Tight boundaries between generic spatial skeleton and catmaid; Use generic arrays over fixed x,y,z ; Update spatial skeleton metadata format#146
Conversation
… specific implementation
…NA-767 # Conflicts: # src/layer/segmentation/spatial_skeleton_commands.ts
… specific implementation
0df869e to
128872e
Compare
…NA-767 # Conflicts: # src/layer/segmentation/index.ts # src/layer/segmentation/json_keys.ts # src/layer/segmentation/spatial_skeleton_serialization.spec.ts # src/layer/segmentation/spatial_skeleton_serialization.ts # src/skeleton/frontend.ts
7b0c753 to
424d82b
Compare
424d82b to
0e805ab
Compare
…NA-767 # Conflicts: # src/layer/segmentation/index.ts # src/skeleton/backend.ts # src/skeleton/frontend.ts
|
Moved to draft again as I need to re-test it after merging with latest feature/edit-mode |
seankmartin
left a comment
There was a problem hiding this comment.
Generally it looks good to me and a much clearer boundary, thank you for the changes here. Most of the comments I've made are minor. The bigint/number issue I didn't spot before now, and it isn't a regression, so I'd personally be fine with us addressing it separately to this PR.
I think the the only other part I'm unsure on is what changed that we can't or at least don't use the code in spatial_chunk_sizing if there is no spatial metadata and instead reject the source
| nodeId: number; | ||
| segmentId: number; |
There was a problem hiding this comment.
How does this work with segmentIDs being bigint? Ids in general, such as NodeIDs and parentNodeId also bigint. I think the problematic part is likely here
getNodes(
options: {
segmentId?: bigint;
lod?: number;
} = {},
): SpatiallyIndexedSkeletonNode[] {
void options.lod;
const normalizedSegmentFilter =
options.segmentId === undefined
? undefined
: Math.round(Number(options.segmentId));
in the frontend, options.segmentId could be too large to be a number. Not sure if this has any effect on our hash map, but I think that was already designed to work with bigint
Closes https://metacell.atlassian.net/browse/NA-731
SpatialSkeletonVector = ArrayLike<number>.SpatiallyIndexedSkeletonNodeBase.position.x/y/zCloses https://metacell.atlassian.net/browse/NA-741
fetchNodes(cellIndex: SpatialSkeletonGridCellIndex, ...).SpatialSkeletonGridCellIndexcarries acellvector rather than arbitrary lower/upper bounds.Closes https://metacell.atlassian.net/browse/NA-743
spatialarray.chunkSize,gridShape, andlimit.metadata.spatial, with each level containingchunk_sizeandlimit. f.e:{"spatial": [{"limit": 500, "chunk_size": [12058882, 12058882, 12058882]}, {"limit": 500, "chunk_size": [7161485, 7161485, 7161485]}, {"limit": 2500, "chunk_size": [4253037, 4253037, 4253037]}, {"limit": 7000, "chunk_size": [2525778, 2525778, 2525778]}, {"limit": 0, "chunk_size": [1500000, 1500000, 1500000]}], "read_only": false, "cache_provider": "cached_msgpack_grid"}Closes https://metacell.atlassian.net/browse/NA-767 and https://metacell.atlassian.net/browse/NA-766
SpatialSkeletonActionsaddNodesCommanddeleteNodesCommandmoveNodesCommandsplitSkeletonsCommandmergeSkeletonsCommandinsertNodesCommandrerootCommandeditNodeDescriptionCommandeditNodeTrueEndCommandeditNodeRadiusCommandeditNodeConfidenceCommandCloses https://metacell.atlassian.net/browse/NA-725
readOnlyis part of the generic spatial skeleton source contract.readOnly: false.metadata.read_only: falseto enable editing.