Repository navigation
Replace() removes only what a run drew for that output; no invented labels - #48
Merged
Merged
Conversation
…abels From an independent audit of PR #47: - Q1/Q3: Replace() matched annotations by classification (or name), so it could delete annotations the person classified the same way, and miss a result they reclassified. Every annotation a run draws now carries labconstrictor.output beside run_id/app/tool, and Replace() removes only annotations whose metadata says they are this app's output (LcRun.ownedBy). Results of earlier versions are recognised by their run metadata plus their old name/class; results of versions without run metadata by their name. Annotations without LabConstrictor metadata are never removed by class. - Q2: an outline without a label got a "label" measurement made from its position, which claimed a match with the label image; it is now the measurement outline_index. A text label, lost above 50 outlines, is kept as metadata "label". - Tests (gui_test_shapes_body): results carry their output; the person's annotation of the same class survives Replace; a reclassified result is still replaced; 50 named / 51 unnamed; text, numeric and missing labels. README and user guide say what Replace() removes and that app:output is a derived class. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WX6rdRdA72nsUjZvTXFSbP
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.
Follow-up to #47, from an independent audit of that PR.
Problems
Replace()removed every annotation whose classification matched<app>:<output>. An annotation the person drew and classified the same way was deleted with the results.labelgot alabelmeasurement made from its position, which claims a match with the label image that need not exist. A textlabelwas lost above 50 outlines, where there is no name to carry it.Changes
Ownership tag:
LcRun.tag(annotation, output)addslabconstrictor.outputto the existingrun_id,appandtoolmetadata of every point or outline annotation a run draws.What
Replace()removes: only annotations for whichLcRun.ownedByis true:<app>:<output>(points) or<app>:<output> <n>(outlines).An annotation without LabConstrictor metadata is never removed because of its class.
Labels: a missing label gives the measurement
outline_index; a text label is kept as metadatalabel; a numeric label stays the measurementlabel.Docs: the README and user guide say what
Replace()removes, how labels are stored, and that QuPath readsapp:outputas a derived class (app: output).Tests
tests/gui_test_shapes_body.groovy(15 checks, was 7). New checks:Replace();tests/run_gui_ci.shon QuPath 0.7.0 (JDK 25 build, xvfb): shapes 15, identity 35, area 48, parity_results 26, interactions 9, region 7 and conformance 119 checks all pass.Not changed
app: outputis a design choice, now documented. It groups an app's outputs under one parent class.Generated by Claude Code