Page MenuHomePhabricator

[Segmentation] Examine Live-wire tool for different costfunctions/behavior
Closed, ResolvedPublic

Description

A user asked for a tool that can set polygon points and connect the points with a linear interpolated line segment.

Motivation: The current Add tool is not so intuitive if the performed segmentation is contour-centered. Also, the Add tool must be paused if the user wants to shift or zoom.

Idea: Look at the current live wire implementation and see whether we can have an abstraction level to exchange underlying cost functions

Short term goal: See whether we can provide a prototype in which the "intelligence" of the live-wire tool is sorted out for the users to test and see if they get what they expect from it. This is useful in this state since it is still not clear what exactly they want/changes over time.

Event Timeline

thomass triaged this task as Wishlist priority.Mar 25 2021, 12:29 PM
thomass created this task.
thomass added a parent task: Restricted Maniphest Task.

First patch to change following behavior (for user testing only):

  • The linesegments are added with each mouseclick of the users without the cost function but by connecting start and endpoint
  • If the user double-clicks on the image, the last point is connected with the first adding an additional segment.

Findings so far:

  • CreateDynamicCostMapByITK (in general the dynamic cost functions) does not change the behavior at all in ImageLiveWireContourModelFilter
  • there is a flag for also allowing diagonal neighbors m_FullNeighborsMode in the shortestPathImageFilter but it is not used anywhere, m_Graph_fullNeighbors would enable diagonal neighbors but is set to false and not changed anywhere
  • The LiveWireFilter and the shortestPathFilter seem to be essential to add the line segments. In order to change the behavior of the tool, changes need to be made inside of the functions. The LiveWireTool2D can not be modified by only disabling the LiveWireFilter IMO.

The first user feedback of the patch above was positive, the users liked the behavior.
However, the patch did not work correctly in terms of modifying the points afterwards (users were warned before).

@kislinsk suggested to look at the polygon tool from NVidia

In the future, the livewire tool should be overhauled keeping in mind following things:

  • LiveWire with different costfunctions (linear segments versus intelligent border snapping on RGB or radiology images)
  • Modifying points afterwards
  • Last point of the polygon must not be necessarily clicked close to the first point (current implementation)
  • Wishlist from user: Would it be possible to load/reload the polygon not the segmentation

@kahl I assigned you. If I understand correctly, this is what you did for the new add tool and the new base class.

Deleted branch from rMITK MITK: feature/T28406-PatchForTestingLiveWireBehavior.

floca added a subscriber: floca.

Live wire tool (and Lasso) is already reworked.