Ticket #800 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Edit>Fill does not always fill the complete ROI

Reported by: dscho Owned by: bdezonia
Priority: major Milestone: imagej2-b1-initial
Component: ImgLib2 Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

Load the Gold-Lead example (File>Open Samples>AuPbSn 40), then select a rectangular ROI (non-square), then call Edit>Fill, and most of the time it does not fill the rectangle completely.

Since it is always the largest axis which is not completely filled, I suspect the multi-threading to have a hand in that (in my tests, it used 4 threads).

Actually, I just tested in the debugger, and if I set numThreads to 1 in ImageAssignment.assign() (line 140), it fills the rectangle completely.

Change History

comment:1 Changed 7 years ago by bdezonia

  • Component changed from other to imglib
  • Milestone set to imagej-2.0-beta1

comment:2 Changed 7 years ago by dscho

  • Status changed from new to closed
  • Resolution set to fixed

(In  changeset:c946cbf4) Fix ticket 800

When filling a region of interest with multiple threads, the filling was incomplete.

This issue was due to relative vs absolute coordinates.

The startIndex was compared against the span[axis], but the span[axis] was relative to origin[axis]. So let's rename startIndex to startOffset and have it relative to the origin[axis], too.

Note: See TracTickets for help on using tickets.