Page MenuHomePhabricator

Region growing becomes unusable after several usages
Closed, ResolvedPublic

Description

There is a problem in region growing: screen difference coordinates are modified on mouse moving but they are never reset:

m_ScreenYDifference += positionEvent->GetPointerPositionOnScreen()[1] - m_LastScreenPosition[1];
m_ScreenXDifference += positionEvent->GetPointerPositionOnScreen()[0] - m_LastScreenPosition[0];

This leads to problems after several tool usages.
If you always move mouse in one direction when selecting several regions with region growing, m_ScreenYDifference and m_ScreenXDifference become huge, thresholds for tool become huge, too, and tool works incorrectly.

It's fixed in https://github.com/MITK/MITK/pull/173