Page MenuHomePhabricator

Implement a 2D Livewire tool
Closed, ResolvedPublic

Description

Implementation of a segmentation tool based on Livewire approach where a contour fits to the boundary of an object of interest.

  • manually set points by the user
  • find the shortest path between two points using specific cost-function
  • let the user adjust the resulting contour

contour3.PNG (386×428 px, 56 KB)

Event Timeline

New remote branch pushed: bug-12703-LiveWire-Tool-Integration

Realizes a Segmentation Tool based on LiveWire approach using mitkContourModel to visualize the segmentation progress.
Acts like magnetic lasso tool known from Photoshop. Also introduces new Interactor for mitk::ContourModel objects with LiveWire functionality.

Since this is new functionality (yes, I see that this has been developed since half a year), did you talk to Christian Weber about the interaction part? Since the last MITK release we have a reworked interaction framework which could perhaps easily adapted, in which case you would not need to modify the legacy StateMachine.xml.

Yes i have talked to Christian. And the tool will be based on the new interaction design. But since all Tools in the segmentation module are based on the old version it will be done separatelly. Jasmin is working on this.

[e91373]: Merge branch 'bug-12703-LiveWire-Tool-Integration'

Merged commits:

2013-03-22 09:14:21 Tobias Schroeder [64aaf3]
documentation for LiveWire Tool.


2013-03-22 08:49:31 Tobias Schroeder [b5e40b]
Added images for documentation.


2013-03-15 13:44:51 Tobias Schroeder [d28833]
Changed Icon of LiveWire Tool.


2013-03-15 11:30:07 Andreas Fetzer [212c8f]
Fixed some typename issues for clang


2013-03-15 11:11:47 Tobias Schroeder [7bc863]
Fix compiler errors on mac.

Code only worked with VS compiler.


2013-02-25 18:19:03 Tobias Schroeder [1e15d5]
Use right property names


2013-02-25 16:50:30 Tobias Schroeder [9cbe78]
Fix deleting and moving first controlpoint.

Interaction with first controlpoint did not work as expected. The point
was actually never (re)moved.


2013-02-22 14:12:28 Tobias Schroeder [a03e24]
3x3 Region for initial point.

Changed region for searching highest gradient magnitude during intial
click to 3x3.


2013-02-22 13:50:42 Tobias Schroeder [3372f9]
Use right color for LiveWire Contour


2013-02-22 13:38:25 Tobias Schroeder [0913cf]
Fixed crash on finishing LiveWire Tool.

One timestep ahead - invalid timestep was used while filling a contour in a slice.


2013-02-22 13:18:28 Tobias Schroeder [e80f3e]
Add StateMachine of LiveWire Tool to legacy StateMachine.xml


2013-02-22 13:11:54 Tobias Schroeder [f4963a]
Merge branch 'personal/schroedt/livewire-integration' into bug-12703-LiveWire-Tool-Integration


2012-12-05 14:07:40 Tobias Schroeder [2dfb12]
compiler errors fixed


2012-12-05 11:03:25 Tobias Schroeder [7fb2ea]
fixed interaction on del and esc


2012-12-05 10:48:52 Tobias Schroeder [91b81c]
remove last segment on esc


2012-12-05 10:48:03 Tobias Schroeder [e692a7]
fixed compiler error


2012-12-05 09:59:46 Tobias Schroeder [d3bec3]
Merge branch 'bug-12703-implement-a-2d-livewire-tool' into personal/schroedt/livewire-integration


2012-12-05 08:23:31 Tobias Schroeder [0d147c]
merge branch bug-12704-implement-contourmodel


2012-11-21 14:35:06 Tobias Schroeder [b133f3]
fixed remove vertex after move


2012-11-21 13:57:09 Tobias Schroeder [496dfa]
Merge branch 'bug-12703-implement-a-2d-livewire-tool' of mitk.org:MITK into bug-12703-implement-a-2d-livewire-tool


2012-11-21 13:56:31 Tobias Schroeder [c2f66a]
fixed some rendering stuff


2012-11-21 13:45:59 Tobias Schroeder [ff1de4]
fix bug after clicking in 3d window


2012-10-31 10:49:48 Tobias Schroeder [2936e8]
renamed contourmodelelement to contourelement


2012-10-31 10:20:38 Tobias Schroeder [44fdfb]
added statemachine and interactor to xml file. see T3701.


2012-10-31 10:16:34 Tobias Schroeder [b5685a]
inverted interaction


2012-10-31 09:32:29 Tobias Schroeder [c64ba9]
fix cost function


2012-09-19 10:31:18 Tobias Schroeder [c1279e]
removed performance test


2012-09-19 10:21:59 Tobias Schroeder [907dd8]
add with ctrl to avoid use of dynamic costs


2012-09-19 10:00:45 Tobias Schroeder [f02428]
fix list of contours


2012-09-19 09:34:10 TobiasSchroeder [2722a1]
fix requested region


2012-09-19 08:18:20 TobiasSchroeder [a6949f]
do not use dynamic costs if ctrl+mousemove


2012-09-17 14:45:24 TobiasSchroeder [2f369a]
*temporarly* check for duplicate points


2012-09-17 14:44:54 TobiasSchroeder [98e132]
map initial click to highest gradient magn. in region 5x5


2012-09-17 13:02:51 TobiasSchroeder [bd6bce]
fixed click in other slices


2012-09-17 11:45:21 TobiasSchroeder [c9c2ac]
some documentation


2012-09-17 08:54:53 TobiasSchroeder [4a0d85]
put gaussian approximation in static member function


2012-09-14 14:40:56 TobiasSchroeder [6e6bef]
*temporarly* always update dynamic cost map


2012-09-14 14:34:55 TobiasSchroeder [dc0777]
fixed timestep support for livewire tool


2012-09-14 12:05:53 TobiasSchroeder [d04e0f]
make segmentation after deactivating tool


2012-09-14 12:05:32 TobiasSchroeder [daf7b0]
added function to get image as 2D slice by plane geometry plus timestep


2012-09-14 12:04:36 TobiasSchroeder [e2782b]
no boundingbox update for 2D geometries


2012-09-13 16:52:07 TobiasSchroeder [a14795]
remove nodes on deactivation of tool


2012-09-13 11:09:10 unknown [5ac459]
fixed requested region bug


2012-09-13 10:35:45 unknown [f8c8d2]
fix cost map bug


2012-09-11 14:31:09 TobiasSchroeder [5286af]
finish tool on deactivation


2012-09-11 14:30:50 TobiasSchroeder [b9ca2e]
scale bins by enum constant


2012-09-11 14:30:27 TobiasSchroeder [1ea356]
remove duplicate vertex


2012-09-11 14:30:04 TobiasSchroeder [03d443]
take nearest active point in approximate nearest neighbour search


2012-09-11 08:33:52 TobiasSchroeder [a9ade2]
handle deactivating tool properly


2012-09-07 13:52:08 Tobias Schroeder [2be804]
use dynamic cost map for livewire tool


2012-09-07 13:51:02 Tobias Schroeder [5a3852]
generate cost map in filter for next update


2012-09-07 13:50:38 Tobias Schroeder [47beea]
use dynamic cost map


2012-09-07 09:43:22 Tobias Schroeder [27018d]
only set a new image to cost function if the input has changed


2012-09-07 09:42:42 Tobias Schroeder [58954f]
execute initialize only once


2012-09-06 16:11:32 Tobias Schroeder [9682b7]
cost map creation not completed


2012-09-06 16:11:15 Tobias Schroeder [760320]
removed unused code


2012-09-06 15:52:46 Tobias Schroeder [5c6f86]
documentation of cost function


2012-09-06 15:00:07 Tobias Schroeder [5205c0]
fix comments


2012-09-06 14:59:49 Tobias Schroeder [e2fd73]
set use of dynamic cost map after a segment is computed


2012-09-06 14:59:15 Tobias Schroeder [18457a]
compute cost map for cost function


2012-09-06 14:58:52 Tobias Schroeder [b57cfe]
added dynamic cost map


2012-09-06 11:07:14 Tobias Schroeder [90c122]
documentation


2012-09-06 10:20:51 Tobias Schroeder [8e737d]
commented MITK_INFO outputs


2012-09-06 10:20:26 Tobias Schroeder [79668f]
fixed invalid input for acos function


2012-09-05 09:51:48 Tobias Schroeder [d9fa22]
livewire interaction on move vertex fixed


2012-09-04 13:30:20 Tobias Schroeder [93d3f3]
costfunction and shortestpath filter as members


2012-09-04 13:29:52 Tobias Schroeder [d036ac]
extract features by itk filters on intialize


2012-09-04 10:26:52 Tobias Schroeder [f86cf2]
use of itk filter for gradient magnitude and its maximum calculatio


2012-09-04 08:00:18 Tobias Schroeder [8354dc]
delete last segment during livewire interaction on -del-


2012-09-03 17:36:39 Tobias Schroeder [1026f5]
changed gradient magnitude mapping


2012-09-03 17:36:11 Tobias Schroeder [a50fdc]
default color of points changed if not set


2012-09-03 17:35:48 Tobias Schroeder [91ee33]
use setter for default properties of gl mapper


2012-09-03 15:01:56 Tobias Schroeder [c2bd45]
map initial click to pixel coordinate not working properly


2012-09-03 15:01:22 Tobias Schroeder [0c5992]
point color property


2012-09-03 12:59:02 Tobias Schroeder [6d0499]
fixed computation of livewire segment for first and last vertex selection


2012-09-03 12:07:21 Tobias Schroeder [6da5e0]
livewire interaction while deleting and moving points


2012-08-30 15:24:44 Tobias Schroeder [8a80cb]
livewire interaction on delete point


2012-08-30 15:24:26 Tobias Schroeder [e4f5df]
added working slice to interactor


2012-08-30 15:24:07 Tobias Schroeder [f40921]
region not working properly


2012-08-30 13:25:53 Tobias Schroeder [114629]
add vertex at front implemented


2012-08-30 10:30:00 Tobias Schroeder [006bc4]
fixed memory leak


2012-08-30 09:34:55 Tobias Schroeder [f133b0]
added destructor to itkShortestPathImageFilter - delete member


2012-08-30 09:26:59 Tobias Schroeder [d0b753]
cost function includes gradient direction costs


2012-08-29 11:59:59 Tobias Schroeder [bc4e5f]
improvements


2012-08-29 11:07:16 Tobias Schroeder [d39865]
cost function improved - using gradient direction


2012-08-29 10:41:33 Tobias Schroeder [efc493]
cost function improvements


2012-08-29 10:41:11 Tobias Schroeder [9ca701]
check for index out of geometry bounds


2012-08-29 10:40:43 Tobias Schroeder [9939f4]
docu


2012-08-29 10:40:28 Tobias Schroeder [f44829]
duplicate member function removed


2012-08-29 10:39:38 Tobias Schroeder [8befde]
fixed crash for empty contours


2012-08-29 10:39:09 Tobias Schroeder [60d2dc]
documentation


2012-08-29 10:38:57 Tobias Schroeder [9e6e20]
fix crash for concatenating an empty contour


2012-08-28 15:43:33 Tobias Schroeder [fc224f]
added filter to interactor - not used yet


2012-08-28 15:04:16 Tobias Schroeder [6023de]
removed unused code


2012-08-28 14:48:11 Tobias Schroeder [f01ded]
gradient direction cost not working yet - commented code


2012-08-28 14:47:26 Tobias Schroeder [128b5f]
mapping of 2D index to 3D world coordinate changed


2012-08-28 13:17:33 Tobias Schroeder [46aaf4]
cost with gradient magnitude and laplacian zero crossing


2012-08-28 12:04:27 Tobias Schroeder [b00678]
cost function typedefinition


2012-08-28 12:04:09 Tobias Schroeder [d0f871]
cost function with gradient magnitude and laplace - not compiling because of template issue


2012-08-27 15:07:04 Tobias Schroeder [b57d7d]
index type with template parameter


2012-08-27 15:06:32 Tobias Schroeder [3cb21a]
fix


2012-08-27 15:06:11 Tobias Schroeder [bd2a26]
use new filter


2012-08-27 15:05:50 Tobias Schroeder [10322a]
commented unnecessary update


2012-08-27 15:05:19 Tobias Schroeder [d289ea]
added filter class - now compiling within livewire tool


2012-08-24 14:53:12 Tobias Schroeder [2387df]
some fixes


2012-08-24 11:58:57 Tobias Schroeder [043de9]
vector shortest path


2012-08-24 11:47:06 Tobias Schroeder [37dde7]
get macro for start and end point


2012-08-24 11:46:30 Tobias Schroeder [71b591]
added requestedRegion member to cost function


2012-08-24 11:28:21 Tobias Schroeder [c4cc03]
set up cost function and shortest path filter


2012-08-24 11:26:28 Tobias Schroeder [f50371]
added livewire cost function


2012-08-24 10:20:20 Tobias Schroeder [2e9605]
added dependency to GraphAlgorithms


2012-08-23 15:12:00 Tobias Schroeder [6f9dad]
set requested region in filter


2012-08-23 15:11:00 Tobias Schroeder [a55555]
documentation


2012-08-23 12:00:20 Tobias Schroeder [5ef182]
added new livewire interctor to node


2012-08-23 12:00:00 Tobias Schroeder [0c3c20]
new filter classes for livewire


2012-08-23 11:59:35 Tobias Schroeder [348bb7]
changed docu


2012-08-23 10:46:51 Tobias Schroeder [dc9d71]
completed interaction with contour


2012-08-23 10:46:35 Tobias Schroeder [47d574]
remove vertex at index improved


2012-08-23 10:45:55 Tobias Schroeder [fee7a9]
do not project point onto all planes


2012-08-23 10:45:25 Tobias Schroeder [d7d4f3]
remove vertex at


2012-08-23 09:16:41 Tobias Schroeder [d3c2bf]
new interactions with contour for esc and del


2012-08-23 09:15:25 Tobias Schroeder [29a182]
added method to set selected point active


2012-08-23 09:14:27 Tobias Schroeder [b1529a]
draw currently selected vertex


2012-08-22 11:01:15 Tobias Schroeder [b864bd]
livewire interaction is now working properly


2012-08-21 15:51:44 Tobias Schroeder [0b0acc]
livewire without algorithm, problem with first segment


2012-08-21 09:43:46 Tobias Schroeder [3575a4]
some documentation


2012-08-21 09:43:30 Tobias Schroeder [0e0ac8]
fixed removeAt method and documentation


2012-08-21 09:01:14 Tobias Schroeder [e52f71]
approximate nearest point search improved


2012-08-21 09:00:47 Tobias Schroeder [6e729d]
fixed updateoutputinformation


2012-08-21 09:00:21 Tobias Schroeder [1dece7]
check for update


2012-08-20 16:21:23 Tobias Schroeder [0dbfa7]
epsilon for vertex selection increased


2012-08-21 15:55:47 Tobias Schroeder [d8924e]
listen to ctrl + mouse release event to go to start state


2012-08-20 16:12:18 Tobias Schroeder [89db7d]
timestep suppport for mapper


2012-08-20 14:58:56 Tobias Schroeder [55e952]
improved mapper


2012-08-20 14:58:44 Tobias Schroeder [c437f5]
click epsilon expanded


2012-08-20 14:13:42 Tobias Schroeder [95dbc6]
new GL mapper for contourModel


2012-08-20 14:13:20 Tobias Schroeder [78f419]
new color for active control points


2012-08-20 14:12:46 Tobias Schroeder [d84dd3]
use the right id for moving mouse with pressed button


2012-08-20 14:12:15 Tobias Schroeder [d46348]
canHandleEvent improved


2012-08-20 11:24:22 Tobias Schroeder [681168]
try to fix


2012-08-20 10:27:24 Tobias Schroeder [fa15fa]
contour interaction


2012-08-20 09:53:21 Tobias Schroeder [148cb7]
interaction for contours


2012-08-20 09:53:02 Tobias Schroeder [30a109]
removed compiler warnings for enum use


2012-08-20 09:52:33 Tobias Schroeder [49ddcd]
new statemachine for contour interaction


2012-08-17 16:22:22 Tobias Schroeder [b165bf]
interactor not working


2012-08-17 15:10:45 Tobias Schroeder [03c9df]
added livewire tool with initial interaction


2012-08-17 15:05:17 Tobias Schroeder [5062e4]
disable subdivision interpolation


2012-08-17 15:04:45 Tobias Schroeder [404c03]
add tool to segmentation view


2012-08-16 15:54:21 Tobias Schroeder [6005f8]
resolved merge conflicts


2012-08-16 14:47:45 Tobias Schroeder [0a7980]
added xpm file


2012-08-16 14:47:30 Tobias Schroeder [3cd2d8]
added livewire tool class

[b2e855]: Merge branch 'bug-12703-LiveWire-Tool'

Merged commits:

2013-04-05 10:50:32 Tobias Schroeder [535844]
COMP Fixed falsely merged file.

Code bloock is already executed by the methods caller.

[4de6c2]: Merge branch 'bug-12703-LiveWire-Tool'

Merged commits:

2013-04-05 11:36:23 Tobias Schroeder [6f21e2]
COMP Changed selection method of vertices.

In case the counter contained only one vertex this vertex was always
selected.

By accident I have read the Change Request Wiki page. The global StateMachine.xml file is deprecated and should not be used any more. Please create a state machine file as a resource inside your module. Ask Christian if you do not know how.

Okay, I just read the top of the bug report.

Could you please add a link to the bug which is related to the migration of the segmentation tool state machines?

The migration of the segmentation tool state machines will be done with T14943