Repository navigation
Record the image ROI convention for operations taking ROI parameters - #100
Merged
Merged
Conversation
The selection of image pixels by regions of interest (rule sigima.image.roi.pixel_centers) was recorded in the execution context only when an input image carried regions of interest. The operations taking their regions of interest as parameters (extract_roi, extract_rois, erase and offset_correction), usually called on images without attached ROIs, depend on it as well: their description recorded no context, and a replay of such a call recorded before Sigima 1.4, which selected other pixels, was accepted and reported a different result instead of being refused. image_roi_convention() now also takes the contract: an operation with an image input and a ROI2DParam parameter (single or list) depends on the rule whatever its inputs. describe_call() and prepare_execution() pass the contract, so that the rule is recorded and checked for these operations. The rule and the contract versions are unchanged: the rule is recorded in more cases. Signal ROI parameters are not concerned. Closes #99 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 #99
Summary
The selection of image pixels by regions of interest (rule
sigima.image.roi.pixel_centers,IMAGE_ROI_CONVENTION, #89) was recorded in the execution context only when an input image carried regions of interest. The operations taking their regions of interest as parameters —extract_roi,extract_rois,erase,offset_correction— are usually called on images without attached ROIs (DataLab defines them graphically): their description recorded no context, and a replay of such a call recorded before Sigima 1.4 (which selected other pixels) was accepted, reporting adifferentresult instead of being refused.image_roi_convention(inputs, contract=None): also returns the rule when the contract has an image input and aROI2DParamparameter (single, list or both), whatever the inputs — a static property of the operation, read from its contract.describe_callandprepare_executionpass the contract: the rule is recorded and, for a replay, checked (unsupported_contextwhen missing or another version).ROI1DParam) are not concerned.sphinx_intl update: no change).Validation
{},{"x_alignment": None},{"roi_convention": None}) or another rule version are refused; a registry-wide guard checks that exactly these 4 operations are detected; signalextract_roirecords nothing.--qualification-report: no problem (the 4 operations qualified, validation and replay passed).developagainst this branch: provenance, replay and capsule tests pass (138).contextmapping of the description since Record the execution context declared by the computation library DataLab-Capsule#4.