Page MenuHomePhabricator

[Segmentation] LiveWire tool issues and improvements
Closed, ResolvedPublic

Assigned To
Authored By
kleina
Jul 6 2021, 1:31 PM
Referenced Files
F2524892: image.png
Mar 28 2022, 4:33 PM
F2524882: image.png
Mar 28 2022, 4:18 PM
F2524884: image.png
Mar 28 2022, 4:18 PM
F2397062: image.png
Jul 29 2021, 3:45 PM
F2364373: image.png
Jul 7 2021, 4:15 PM

Description

There are several small things that could be improved in the LiveWire tool:

  • Sometimes is it hard to select a point. Especially on Linux, I often thought I clicked on an existing point, but in reality, I created a new one right next to it. Might make sense to "make the hitbox bigger" by modifying the distance in mitkContourModelLiveWireInteractor
  • Contour should close on double click, not only if the click is performed on the first point. If a doule click is performed, close the contour by combining the last with the first point.

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

kleina renamed this task from LiveWire tool issues and improvements to [Segmentation] LiveWire tool issues and improvements.Jul 6 2021, 1:31 PM
kleina triaged this task as Low priority.
kleina created this task.

I think that are good ideas.

Regarding the double click. I would even visualize the livewire always as a close contour, so always adding a straight line from current point to start point. Then you directly see who it looks like if you double click.
(And it will be closer to the appearance/behavior of the proposed new add tool)

kleina raised the priority of this task from Low to Normal.EditedJul 7 2021, 4:14 PM

LiveWire tool now always connects the current mouse position with the starting point (here displayed in red for demonstration purposes). The mouse cursor is not visible here due to me taking a screenshot via noMachine. The position is where green and red meet. If double-clicked, the green and red line turn into yellow segments.

image.png (417×538 px, 341 KB)

floca added a revision: Restricted Differential Revision.Jul 9 2021, 4:30 PM

The listed changes have been implemented. I realized that there is an issue with the automatically created "last segment". If I click there to create a new control point and move it, I get the behavior shown in the image (sorry, I tried to explain it in words but failed).

image.png (649×696 px, 206 KB)

The green point is moved. The expected behavior is that the contour between the moving point and the neighboring control points is recalculated.

The issue seems to be located in ContourModelLiveWireInteractor::SplitContourFromSelectedVertex. The behavior was always "wrong", but it was not that prominent due to the user always finishing the contour by clicking on the initial point.

kleina added a subscriber: kahl.

@kahl Again, I assigned you, this is in the context of the new add tool.

kalali added a subscriber: kislinsk.

@floca, @kislinsk: Both @kahl and @kleina won't be able to work on this anymore, but this task is still open. We also received some feedback regarding the usability from the last test day, so we should discuss how to proceed:

  • image.png (204×964 px, 12 KB)
  • image.png (362×954 px, 21 KB)
  • image.png (130×929 px, 11 KB)

The first two comments should be targeted for this release. The last comment is something that also happens sometimes with the new implementation of the polygon tool that uses the same base class. But fixing is too complex to be worth spending time before the release, so whoever grabs this task, focus on the first two comments.

Regarding the comment of closing the contour with a double click: I also realized this during my work on the new add tool and I think the way I fixed it was to modify the OnFinish() function in the mitkLiveWireTool2D to check whether the click was performed on the first point which was also how it was done before the closure contour was added to the LiveWire tool.
Here is the code of my new add tool branch where I changed it:
https://phabricator.mitk.org/source/mitk/browse/feature%252FT28464-new-add-tool-2/Modules/Segmentation/Interactions/mitkLiveWireTool2D.cpp$344

Basically it is just the check

if (!OnCheckPoint(interactionEvent))
{
  m_Contour->Concatenate(m_ClosureContour);
}

I am not 100% sure if that is really all that needs to be done but maybe it helps as a starting point :)

@kahl So are you working on this? If not, could you remove yourself as the assignee of this task?

floca claimed this task.

Should be resolved with the changes introduced with the lasso tool reworks. Lets wait for tester feedback.

Deleted branch from rMITK MITK: feature/T28607-live-wire-improvements.