You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Respect QuPath ROI Z/T planes when exporting selected areas and RegionOf masks #21
Confirmed contract: QuPath 0.7.0 preserves ROI image planes
QuPath ROIs carry their own Z and T coordinates. QuPath's RegionRequest.createInstance(path, downsample, Collection<ROI>)throws IllegalArgumentException for ROIs on different ImagePlanes:
The extension's selectionArea() combines all selected annotation bounds without checking ROI.imagePlane, then assigns the viewer's Z/T to the exported rectangle. selectionMask() similarly paints all selected 2D ROI shapes into the same mask. The exported image, however, is requested from one Z/T plane via LcArea.request().
A selected annotation on Z=1 can therefore define the crop or supply a label in an image exported at viewer Z=0. Multiple selected annotations from different time points are likewise flattened into one exported mask without indicating that they refer to different planes. This is a scientific-data mismatch, not merely a display issue.
Proposed fix
Apply an explicit image-plane policy consistently to area selection and RegionOf masks. Prefer to reject mixed Z/T selections with an actionable message, or filter to the current viewer plane with clear UI indication. If single-plane selection does not match the viewer, either switch to the annotation's plane deliberately or refuse it. Do not silently mix planes.
Acceptance criteria
Single annotation at viewer Z/T is exported correctly.
Annotation at a different Z or T cannot silently define a crop/mask for the current plane.
Two annotations with different Z or T are rejected or explicitly filtered according to a documented policy.
The exported TIFF's plane, generated region mask and restored result annotations all use the same image plane.
Add QuPath 0.7 GUI fixture with two planes and scripted selection across planes; check exported pixel values and annotations.
Priority: P1 — possible incorrect scientific image/region pairing. Verified against the actual extension and QuPath v0.7.0 Java source. A running QuPath regression test is still needed.
Activity
Merge pull request #27 from CellMigrationLab/claude/phase2-qupath-coo…