| genre | CSOProcessor |
| status | stable |
| authors | Olaf Konrad, Frank Heckel |
| package | MeVisLab/Standard |
| dll | SoCSO |
| definition | SoCSO.def |
| see also | SoView2DCSOEditor |
| keywords | CSO, contour, interpolation, segmentation |
The CSOLiveWireProcessor allows for a semi-interactive segmentation of structures with edge features in images.
Attach this module to a SoView2DCSOEditor's processor input.
Optionally, attach a cost image to the module's input (for a use in OrthoViewers, have a look at the example network to learn how an input cost image needs to be connected).
Internally, the module generates a graph representation of the image to work on.
The graph's nodes represent image pixels and edges represent neighboring relations of pixels. The edges are weighted on base of the cost function, which could also be an image (gradient image). If a starting and an ending point are defined on such a graph, the shortest path between them can be computed using Dijkstra's well-known algorithm. In order to find a closed contour around some object in an image, at least three points need to be defined.
A contour can be drawn by consecutively placing seed points into an image. The module will find a path between those seed point on base of the shortest path algorithm as stated above. If a seed point is placed, the mouse pointer can be moved around and the path is updated in real time between the last set point and the current position of the mouse cursor. If the according mouse button is pressed again, the last path is fixed and another one spawns from this last point to the mouse pointer.
A contour is closed if either the last point is placed in the vicinity of the first point or if the mouse button is double-clicked.
If the mouse button is held down and the mouse is moved, a continuous freehand contour is drawn from the last set seed point to a seed point that is placed where the mouse button has then been released again.
If a contour is finished (closed), each seed point can be selected and be moved by dragging it. The paths to both sides will be updated and computed according to the shortest path algorithm. If a path of a finished live wire contour is clicked, a new seed point is inserted there, and the paths to both sides are updated. If a seed point is selected and DEL is pressed, the seed point is removed and the remaining path is updated (by the shortest path algorithm).
If a contour is not yet finished and a seed point has been placed, the pressing of DEL deletes the last set seed point. A multiple pressing of DEL removes the seed points in reverse order in which they were set. If the last seed point (the first set seed point) is removed in such way, the whole CSO is removed.
| addCSOToGroupMode: Enum | Drag. Tolerance: Integer | Mode (finishingMode): Enum |
| addCSOToGroupWithId: Integer | emptyGroupBeforeGeneration: Bool | Mode (smoothingMode): Enum |
| addCSOToGroupWithLabel: String | Generate closed CSO: Bool | Neigh. Mode: Enum |
| Amount: Integer | Gradient Feature Weight: Float | pathCostThreshold: Float |
| apply: Trigger | id: Integer | updateMode: Enum |
| autoApply: Bool | If sliced while generating: Enum | Use input image: Bool |
| Directional Feature Weight: Float | Is Currently Generating: Bool | usePathCostThreshold: Bool |
| Distance: Float | isProcessing: Bool | |
| done: Trigger | Laplacian Feature Weight: Float |
If checked, the optional input image is evaluated as a cost image.
If unchecked or if no input image is attached, the currently visible image slice is used.
Toggles the generation of closed and open CSOs. If checked, the module generates closed CSOs and the closing mode depends of the option below. Otherwise the generated CSOs are left open if a double click is performed.
Sets the closing mode.
Values:
| Title | Name | Description |
|---|---|---|
| Double Click | OnDoubleClick | Finishes the currently edited contour by double-clicking. A path between the current and the first seed point is generated. |
| Distance | OnDistance | If the last seed point is placed in the vicinity of the first seed point (distance can be adjusted by Distance), the contour is closed. |
Sets the behavior of the module when the user changes the current slice while generating a CSO.
This needs to be handled, because the underlying graph is only generated for the current slice. On changing the slice, the graph is undefined.
Values:
| Title | Name | Description |
|---|---|---|
| Remove CSO | RemoveCSO | Removes the last (currently edited) CSO. |
| Remove Last Seed Point | RemoveLastSeedPoint | Removes the last seed point (that is the one that is on another slice than the rest of the currently edited CSO's points). |
| Print Warning | PrintWarning | The module does not remove anything but only prints a warning to the console. Note that the currently edited CSO is not in-plane and that the module might even cause a crash. |
If a CSO is currently being generated, this flag is set to true from inside the module.
This field can not be edited by the user.
Sets the distance in pixel that the mouse can be moved with the mouse button held down after placing a seed point before the module switches from the live wire mode to the freehand mode.
This defines the weight of the gradient feature in cost calculation.
This defines the weight of the laplacian feature in cost calculation.
This defines the weight of the directional feature in cost calculation.
Sets the smoothing mode for the generated CSO.
Values:
| Title | Name | Description |
|---|---|---|
| None | None | No smoothing at all. |
| Spline Approximation | SplineApproximation | Smoothing by a spline approximation (smoothest). |
| Spline Interpolation | SplineInterpolation | Smoothing by spline interpolation. |
Adjusts that every nth computed path point is taken into account in the spline approximation smoothing. A higher value results in a smoother, yet more inaccurate contour.
Sets the neighborhood mode for the constructed graph.
Values:
| Title | Name | Description |
|---|---|---|
| 4 Neighborhood | 4 Neighborhood | Only edges to the direct neighbors of a pixel are being constructed and weighted. |
| 8 Neighborhood | 8 Neighborhood | All neighbors, even the diagonal neighbors of a pixel are being considered and edges are being constructed to them for the internal graph. |