Repository navigation
Record the image ROI pixel convention in the execution context - #92
Merged
Merged
Conversation
…text Sigima 1.4 selects the pixels of image regions of interest by their centers, which changes the result of almost every image operation whose input carries regions of interest, while calls on images without ROIs are unchanged. A replay with Sigima 1.4 of such a call recorded with 1.3 reported a different result without telling why; increasing every image contract would have refused the replay of all image activities, ROI or not. The convention is now a rule of the execution context, like the X-alignment policy: sigima.image.roi.pixel_centers, version 1 (IMAGE_ROI_CONVENTION). describe_call returns it in a new "context" mapping, and prepare_execution in the prepared context, whenever an input image carries regions of interest (image_roi_convention). For a replay, prepare_execution refuses (unsupported_context) a call on images carrying regions of interest whose recorded context does not name this rule (recorded before Sigima 1.4) or names another version. Calls on images without ROIs and on signals are not concerned. DataLab-Capsule records the "context" mapping of the description since DataLab-Platform/DataLab-Capsule#4. The guidelines state that such rules, not the contract versions, are increased when a convention shared by all operations changes. Closes #89 Assisted-by: Claude Opus 5.5
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.
Closes #89
Summary
Sigima 1.4 selects the pixels of image regions of interest by their centers (#83, #84). This changes the result of almost every image operation when its input carries regions of interest, while calls on images without ROIs are unchanged. Increasing every image contract (~117) would refuse the replay of all image activities recorded with 1.3; keeping them unchanged let such replays report
differentwithout telling why.The convention is now a rule of the execution context, like the X-alignment policy:
sigima.image.roi.pixel_centers, version 1 (sigima.proc.contracts.IMAGE_ROI_CONVENTION, read-only mapping);image_roi_convention(inputs): the record when an input image carries (non-empty) regions of interest, None otherwise;describe_callreturns a newcontextmapping ({"roi_convention": {...}}when it applies), andprepare_executionadds it to the prepared context;prepare_execution(..., context=...)raisesExecutionError("unsupported_context")when an input image carries regions of interest and the recorded rule is missing (recorded before Sigima 1.4: explicit message) or is another one.Calls on images without ROIs and on signals are not concerned. DataLab-Capsule records the
contextmapping of the description since DataLab-Platform/DataLab-Capsule#4 (merged).Docs: module docstrings, guidelines (rules shared by all operations are versioned in the context, not in the contracts), release note (with French translations).
Tests
test_image_roi_convention_is_recorded_and_checked: nothing recorded nor required without ROI (or with an empty ROI), recorded by the description and the preparation with a ROI (also on an operand), replay with the record gives the same result, replays without it or with another rule/version are refused, signal ROIs not concerned.--qualification-report: no problem.developwith DataLab-Capsuledevelop): provenance, capsule and replay tests pass (150). End-to-end check: an image with a ROI processed (Gaussian filter, centroid) records the rule and replays exactly; the same activity without the rule is refused with the explicit reason; an image without ROI records nothing.