Page MenuHomePhabricator

[Statistics] Fix cutoff of non-closed planar figures
Open, NormalPublic

Description

Based on T30258.
There seems to be a problem in the calculation of statistics for non-closed planar figues (i.e. Line, Path) that go outside the geometry of the current image. Theoretically, they should be shortened for the calculation, so that the Intensity Profile is only shown for the part that is actually inside the image. In some (seemingly random) cases, this still leads to a crash.
For this reason D887 prohibits the selection of an image + non-closed planar figure if any control points of the planar figure are outside the image geometry. For a cleaner solution, that should be reverted, and instead ensured that the calculation works correctly.

Example:

  1. Load two images with different geometries (e.g. Pic3D and brain)
  2. Using the Measurement view, draw a line that goes across both images (do a global reinit if needed, if both images are not already shown at the same time)
  3. In the Statistics view, select one of the images + the line (when using brain.nrrd, the line won't be selectible either way, since the image is rotated)
  4. This can already lead to a crash. If not, move the points of the line around a bit or try different lines, until at some point the error occurs.

Event Timeline

s434n triaged this task as Normal priority.Nov 27 2023, 12:10 PM
s434n created this task.