Skip to content

Record the selection of image pixels by ROIs in the execution context of calls #89

Closed

Description

@PierreRaybaut

Problem

Sigima 1.4 selects the pixels of image regions of interest by their centers (#83, #84): rectangle bounds are no longer rounded to the nearest pixel index, circles and polygons are rasterized on the pixel centers, the part of the image holding a ROI, the offset of the analysis results computed in it and the move of ROIs by flips, rotations, transposition and translation follow the same pixels.

This changes the result of almost every image operation when its input carries regions of interest (e.g. a rectangle [5, 5, 25, 20] now selects 21 × 16 pixels instead of 20 × 15), while the calls on images without ROIs are unchanged. Increasing the version of every image contract (~117) would refuse the replay of every image activity recorded with Sigima 1.3, ROI or not; keeping them unchanged lets a replay with Sigima 1.4 of an activity recorded with 1.3 on an image with ROIs report a different result, without telling why.

Proposal

Record the convention as a rule of the execution context, like the X-alignment policy:

  • rule sigima.image.roi.pixel_centers, version 1 (sigima.proc.contracts.IMAGE_ROI_CONVENTION);
  • describe_call returns it in a new context mapping ({"roi_convention": {...}}) and prepare_execution in the prepared context, whenever an input image carries regions of interest;
  • for a replay, prepare_execution(..., context=...) 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.

DataLab-Capsule records the context mapping of the description since DataLab-Platform/DataLab-Capsule#4.

Activity

  1. PierreRaybaut commented on Oct 25, 2026

    @PierreRaybaut
    ContributorAuthor

    Fixed by #92 (merged into develop).

  2. added this to the v1.4.0 milestone on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions