Repository navigation
Conversation
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PaulHax
marked this pull request as ready for review
November 15, 2026 18:21
PaulHax
force-pushed
the
segment-model-fold
branch
4 times, most recently
from
November 17, 2026 02:31
e6a22d1 to
162dcb7
Compare
…ment Every image shared one segment catalog, so renaming or deleting a segment while viewing one image changed every other image. Each image now owns its segment set: definitions, order, selection, display settings and at most one mask per segment, keyed by segment id. Paint, rectangles, polygons and rulers on an image share its set. - an image's set starts from the current config's segments, or empty without a config, on its first view or edit, whatever was shown before - a config is a template: it writes its stated fields onto same-named segments of every set, adds missing names and seeds new sets. It never removes or resets a segment - segment names are unique per image; a taken name gets a numbered one - labelmap import, session restore, config and processing results seat incoming segments by name through one registry function. A segment that brings a mask joins a same-named segment only if that one has no mask - a label a file or result declares without voxels is a segment with no mask, so a mask always holds at least one voxel outside an edit - labelmap conversion lives in src/segmentation/io/labelmapImport.ts, outside the mask store - mask ids and Segmentation records are gone: editing, voxel access, rendering, export, processing, en face and the state file address a mask by its segment - slice views compose the masks on the shown slice into shared Uint8 label planes, one actor per overlap plane instead of one per mask; only writes that reach the shown slice recompose it, and hiding a segment only changes its plane's lookup table - manifest 8.0.0 saves one imageSegments entry per image: selection, display and its segments in order, each with its mask. Saved segment ids are scoped to their image. Mask archive entries are named at save from the image and segment names. 7.0.0 manifests migrate by copying the shared catalog under each image with its original ids, without duplicating voxels
A "Copy segments from..." row under "New segment" lists the other images that have segments. Choosing one adds the segment names and appearance the current image lacks. Masks and shapes are not copied, and a same-named segment on the current image is left as it is.
PaulHax
force-pushed
the
segment-model-fold
branch
from
November 17, 2026 07:06
162dcb7 to
2fabb86
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Deleting or renaming a segment while viewing one base image also changed every other image, because all images shared one segment catalog. This PR gives each image its own segment definitions, order and selection, shared by Paint, rectangles, polygons and rulers on that image. With segments per image, mask ids and the
Segmentationrecord repeat what the segment id and the image's segment set already say, so masks are now addressed by their segment, and slice views stop creating one actor per mask. Copying segments between images is an explicit action.Replaces #1005 and #1015.
Per-image segment sets
Tumor (2)."Matched segmentation files" means labelmaps associated with the primary image chosen for the initial load: filename matches such as
scan.seg.nii.gzorscan.seg.nrrdforscan.nrrd(thesegmarker is configurable), or DICOM SEG volumes from the same study. File format alone does not establish the association. See the matching path.A configuration is a template, not a layer that can be taken off again. It never removes or resets a segment: fields it omits keep their current value,
{}ornullonly makes new images start empty, and a configured name that was renamed on an image is added again as a new row. See configuration behavior.Matching names does not merge or overwrite existing voxels. One rule covers labelmap import and session restore: an incoming segment that brings a mask joins the same-named segment only if that segment has no mask. Otherwise it gets a numbered name. See segment matching.
Processing results and image removal are scoped to their destination images. Unlike #1005, there is no deferred initialization or loading state.
One segment model
A segment belongs to exactly one image, a segment has at most one mask, and an image has exactly one segmentation. The code no longer carries a parallel mask model beside the segment set.
seatSegment. Labelmap conversion, decoding and splitting live insrc/segmentation/io/labelmapImport.ts, outside the mask store.Commits
Manifest 8.0.0
The segment data is one tree per image:
segments[]andsegmentations[]are gone. Array order is segment order, and a segment's mask is itslabelmap.segmentationArtifactsis unchanged.nameis dropped. Masks a 7.0.0 segmentation left out of itsorderare reported as skipped, and a 7.0.0 catalog saved without any image is dropped.Other behavior changes