de.unihalle.informatik.MiToBo.core.datatypes
Class MTBStructuringElement
java.lang.Object
de.unihalle.informatik.MiToBo.core.datatypes.MTBStructuringElement
@ALDParametrizedClass
public class MTBStructuringElement
- extends java.lang.Object
class representing a 2D flat (, i.e. without different gray values) structuring element
for the use with morphological operations
values are stored in a recatangular 2D array (rows: 1st dimension, columns: 2nd dimension)
whereas onValue represents set locations and 0 represents unset locations
- Author:
- glass
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
centerX
@ALDClassParameter(label="centerX")
private int centerX
centerY
@ALDClassParameter(label="centerY")
private int centerY
mask
@ALDClassParameter(label="mask")
private int[][] mask
onValue
private static final int onValue
- See Also:
- Constant Field Values
MTBStructuringElement
public MTBStructuringElement()
MTBStructuringElement
public MTBStructuringElement(int[][] mask)
- creates structuring element from given 2D-array, center is assumed to be at the center of
the array
- Parameters:
mask
-
MTBStructuringElement
public MTBStructuringElement(int[][] mask,
int centerX,
int centerY)
- creates structuring element from given 2D-array
- Parameters:
mask
- centerX
- centerY
-
createCircularElement
public static MTBStructuringElement createCircularElement(int size)
- Parameters:
size
-
- Returns:
- circular shaped structuring element
createHorizontalLineElement
public static MTBStructuringElement createHorizontalLineElement(int length)
- Parameters:
length
- value
-
- Returns:
- line shaped structuring element, horizontally (in x-direction) oriented
createQuadraticElement
public static MTBStructuringElement createQuadraticElement(int size)
- Parameters:
size
-
- Returns:
- quadratic shaped structuring element
createRectangularElement
public static MTBStructuringElement createRectangularElement(int sizeX,
int sizeY)
- Parameters:
sizeX
- sizeY
-
- Returns:
- rectangular shaped structuring element
createVerticalLineElement
public static MTBStructuringElement createVerticalLineElement(int length)
- Parameters:
length
-
- Returns:
- line shaped structuring element, vertically (in y-direction) oriented
getCenterX
public int getCenterX()
- Returns:
- x-coordinate of center
getCenterY
public int getCenterY()
- Returns:
- y-coordinate of center
getSizeX
public int getSizeX()
- Returns:
- size in x-direction (width)
getSizeY
public int getSizeY()
- Returns:
- size in y-direction (height)
getValue
public int getValue(int x,
int y)
- Parameters:
x
- y
-
- Returns:
- value at (x,y)
invert
public MTBStructuringElement invert()
- inverts the values of the structuring element
- Returns:
- inverted structuring element