| Package | de.popforge.imageprocessing.geom |
| Class | public final class StructuringFunction |
| Property | Defined by | ||
|---|---|---|---|
| halfX : int [read-only]
The x dimension divided by two.
| StructuringFunction | ||
| halfY : int [read-only]
The y dimension divided by two.
| StructuringFunction | ||
| length : int [read-only]
The length of the structuring function (
matrixX * matrixY). | StructuringFunction | ||
| matrix : Array
The matrix array.
| StructuringFunction | ||
| matrixX : int
The x dimension of the matrx.
| StructuringFunction | ||
| matrixY : int
The y dimension of the matrix.
| StructuringFunction | ||
| numValues : int [read-only]
The length of the array that the structuring function will use.
| StructuringFunction | ||
| Method | Defined by | ||
|---|---|---|---|
|
StructuringFunction(matrix:Array = null)
Creates a new StructuringFunction object.
| StructuringFunction | ||
|
getValues(result:Array, channel:BitmapData, x:int, y:int):void
Calculates the results for a given point
(x|y). | StructuringFunction | ||
|
toString():String
Builds and returns a string that lists the properties of the StructuringFunction object.
| StructuringFunction | ||
| halfX | property |
halfX:int [read-only]The x dimension divided by two.
Implementation public function get halfX():int
| halfY | property |
halfY:int [read-only]The y dimension divided by two.
Implementation public function get halfY():int
| length | property |
length:int [read-only]
The length of the structuring function (matrixX * matrixY).
public function get length():int
| matrix | property |
matrix:Array [read-write]
The matrix array.
This array consists only of the values 0 or 1. It is easier to read instead
of writing true and false.
A simple 3x3 structuring function could use this array [ 1, 1, 1, 1, 0, 1, 1, 1, 1 ].
It has the length of 9 and to make it more visible it looks like:
[ 1, 1, 1 ]
[ 1, 0, 1 ]
[ 1, 1, 1 ]
public function get matrix():Array
public function set matrix(value:Array):void
| matrixX | property |
matrixX:int [read-write]The x dimension of the matrx.
Implementation public function get matrixX():int
public function set matrixX(value:int):void
| matrixY | property |
matrixY:int [read-write]The y dimension of the matrix.
Implementation public function get matrixY():int
public function set matrixY(value:int):void
| numValues | property |
numValues:int [read-only]The length of the array that the structuring function will use.
Implementation public function get numValues():int
| StructuringFunction | () | constructor |
public function StructuringFunction(matrix:Array = null)Creates a new StructuringFunction object.
The matrix parameter can be passed by directly.
In this case the matrix has to be NxN (like 3x3,
7x7, ...). Other properties like matrixX and
matrixY will be set automatically.
Parameters
matrix:Array (default = null) — The matrix that should be used by the structuring function.
|
| getValues | () | method |
public function getValues(result:Array, channel:BitmapData, x:int, y:int):void
Calculates the results for a given point (x|y).
The results will be stored in an array that is the first parameter of this function.
result:Array — The array this function will write to. Has to be created before.
|
|
channel:BitmapData — The channel to gather the values from.
|
|
x:int — The x coordinate of the given point.
|
|
y:int — The y coordinate of the given point.
|
| toString | () | method |
public function toString():StringBuilds and returns a string that lists the properties of the StructuringFunction object.
ReturnsString — A string listing the value of each of the following properties of the StructuringFunction object: matrixX, matrixY, matrix
|