Snake script.
More...
Snake script.
The active contour model (snake) algorithm
Definition at line 10 of file Snake.cs.
void Snake.DisplayImagePlane |
( |
bool |
display | ) |
|
Renders the snake image plane.
- Parameters
-
[in] | display | true if it should be rendered |
Definition at line 133 of file Snake.cs.
Vector3 [] Snake.GetSnakeWorldPoints |
( |
| ) |
|
Gets the resulting contour in world coordinates.
- Returns
- an array of vectors
Transforms the resulting contour to world points and returns them.
Definition at line 65 of file Snake.cs.
Vector3 [] Snake.GetStartWorldPoints |
( |
| ) |
|
Gets the start contour in world coordinates.
- Returns
- an array of vectors
Transforms the start contour to world points and returns them.
Definition at line 82 of file Snake.cs.
void Snake.InitSnake |
( |
bool |
expanding = false | ) |
|
Initializes the snake with the given contour.
- Parameters
-
[in] | expanding | if the snake is expanding or contracting |
calculates the internal energie of the snake and saves it in a matrix representation.
Definition at line 300 of file Snake.cs.
void Snake.SetControlPoints |
( |
Vector3[] |
controlPoints | ) |
|
Sets the contour.
- Parameters
-
[in] | controlPoints | an array of points in world coordinates in the correct order for the contour |
Transforms the control points to screen coordinates an sets them as the snake contour
Definition at line 101 of file Snake.cs.
void Snake.ShowContour |
( |
| ) |
|
Renders the current contour state on the image plane.
Definition at line 140 of file Snake.cs.
void Snake.UpdateSnake |
( |
int |
iterations, |
|
|
bool |
drawSteps |
|
) |
| |
Executes the snake algorithm.
- Parameters
-
[in] | iterations | the number of iterations |
[in] | drawSteps | if the contour steps should be drawn |
Calculates the extern snake energie term and applies the weighted extern and intern energie to the coordinates
Definition at line 218 of file Snake.cs.
float Snake._alpha = 0.01f |
float Snake._beta = 0.001f |
float Snake._gamma = 1.5f |
float Snake._kappa = 0.9f |
The documentation for this class was generated from the following file: