Package net.algart.matrices.scanning
Class Boundary2DProjectionMeasurer
java.lang.Object
net.algart.matrices.scanning.Boundary2DScanner
net.algart.matrices.scanning.Boundary2DWrapper
net.algart.matrices.scanning.Boundary2DProjectionMeasurer
-
Nested Class Summary
Nested classes/interfaces inherited from class net.algart.matrices.scanning.Boundary2DScanner
Boundary2DScanner.Side, Boundary2DScanner.Step
-
Field Summary
Fields inherited from class net.algart.matrices.scanning.Boundary2DWrapper
parent
-
Method Summary
Modifier and TypeMethodDescriptiondouble
area()
Returns the oriented area inside the contour, following along the scanned boundary.Returns the contour line style, used for measuring by this instance.double
directionAngleInRadians
(int directionIndex) static Boundary2DProjectionMeasurer
getInstance
(Boundary2DScanner parent, ContourLineType contourLineType, double startAngleInRadians, int numberOfDirections) int
int
indexOfMinCircumscribedRhombus
(int stepBetweenDirections) int
double
double
double
minCircumscribedRhombus
(int stepBetweenDirections) double
int
double
Returns the total length of the contour, following along the scanned boundary: an estimated perimeter of the measured object, "drawn" at the bit matrix.abstract double
projectionLength
(int directionIndex) abstract double
projectionMax
(int directionIndex) abstract double
projectionMin
(int directionIndex) double
toString()
Returns a brief string description of this object.Methods inherited from class net.algart.matrices.scanning.Boundary2DWrapper
atMatrixBoundary, boundaryFinished, connectivityType, coordinatesChanged, currentIndexInArray, diagonalStepCount, get, goTo, isAllBoundariesScanner, isInitialized, isMainBoundariesScanner, isMovedAlongBoundary, isSingleBoundaryScanner, lastStep, nestingLevel, next, nextBoundary, orientedArea, parent, resetCounters, rotationStepCount, side, stepCount, x, y
Methods inherited from class net.algart.matrices.scanning.Boundary2DScanner
area, checkInterruption, dimX, dimY, fillHoles, fillHoles, getAllBoundariesScanner, getMainBoundariesScanner, getSingleBoundaryScanner, goToSamePosition, isInternalBoundary, matrix, perimeter, scanBoundary, scanBoundary, straightStepCount, updateProgress
-
Method Details
-
getInstance
public static Boundary2DProjectionMeasurer getInstance(Boundary2DScanner parent, ContourLineType contourLineType, double startAngleInRadians, int numberOfDirections) -
contourLineType
Returns the contour line style, used for measuring by this instance. The returned reference is identical to the corresponding argument ofgetInstance(Boundary2DScanner, ContourLineType, double, int)
method, used for creating this instance.- Returns:
- the contour line style, used for measuring by this instance.
-
startAngleInRadians
public double startAngleInRadians() -
numberOfDirections
public int numberOfDirections() -
directionAngleInRadians
public double directionAngleInRadians(int directionIndex) -
area
public double area()Returns the oriented area inside the contour, following along the scanned boundary. "Oriented" means that the result is equal to the area of the figure inside this contour, Equivalent toarea
(thisObject.contourLineType()
).- Returns:
- the oriented area inside the scanned contour.
-
perimeter
public double perimeter()Returns the total length of the contour, following along the scanned boundary: an estimated perimeter of the measured object, "drawn" at the bit matrix. Equivalent toperimeter
(thisObject.contourLineType()
).- Returns:
- the length of the contour line, following along the scanned boundary.
-
projectionMin
public abstract double projectionMin(int directionIndex) -
projectionMax
public abstract double projectionMax(int directionIndex) -
projectionLength
public abstract double projectionLength(int directionIndex) -
meanProjectionLength
public double meanProjectionLength() -
indexOfMinProjectionLength
public int indexOfMinProjectionLength() -
indexOfMaxProjectionLength
public int indexOfMaxProjectionLength() -
indexOfMinCircumscribedRhombus
public int indexOfMinCircumscribedRhombus(int stepBetweenDirections) -
minProjectionLength
public double minProjectionLength() -
maxProjectionLength
public double maxProjectionLength() -
minCircumscribedRhombus
public double minCircumscribedRhombus(int stepBetweenDirections) -
toString
Description copied from class:Boundary2DScanner
Returns a brief string description of this object.The result of this method may depend on implementation.
- Overrides:
toString
in classBoundary2DScanner
- Returns:
- a brief string description of this object.
-