public class MorphologyAnalyzer2DInProHelper extends Object
Modifier and Type | Field and Description |
---|---|
private MTBImageRGB |
debugInfoImg
Debug image to visualize analysis results.
|
(package private) double |
deltaXY
Physical pixel resolution.
|
private int |
height
Height of reference image domain.
|
private MTBImage |
labelImg
Input label image.
|
private int |
width
Width of reference image domain.
|
Constructor and Description |
---|
MorphologyAnalyzer2DInProHelper(int dwidth,
int dheigth,
double dxy,
MTBImage lImg,
MTBImageRGB debugImg)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
detectProtrusionsIndentations(MTBContour2D c,
MorphologyAnalyzer2DInProData levelResult,
double[] curvVals,
int minProtrusionLength,
int minIndentationLength)
Method to detect significant indentations and protrusions along contour.
|
(package private) Vector<MorphologyAnalyzer2DInProData> |
doProtrusionIndentationAnalysis(MTBContour2DSet contours,
Vector<double[]> curvatureValues,
int minProtrusionLength,
int minIndentationLength)
Method to perform analysis of intrusions/protrusions along contours.
|
private void |
postprocessIndentationSegments(MorphologyAnalyzer2DInProData levelResult)
Post-process indentation segments to get more information on protrusions.
|
private void |
postprocessProtrusionSegments(MorphologyAnalyzer2DInProData levelResult)
Post-process protrusion segments to get more information on indentations.
|
(package private) static void |
removeShortRuns(int[] dirArray,
int tSign,
int minLength)
Function to remove all sub-sequences of target shorter than the given
minimum length by replacing them with negated target.
|
private MTBImageRGB debugInfoImg
private MTBImage labelImg
private int width
private int height
double deltaXY
Attention, operator assumes square pixels!
public MorphologyAnalyzer2DInProHelper(int dwidth, int dheigth, double dxy, MTBImage lImg, MTBImageRGB debugImg)
dwidth
- Width of reference image domain.dheigth
- Height of reference image domain.dxy
- Physical pixel resolution.lImg
- Label image to analysis.debugImg
- Debug info image.Vector<MorphologyAnalyzer2DInProData> doProtrusionIndentationAnalysis(MTBContour2DSet contours, Vector<double[]> curvatureValues, int minProtrusionLength, int minIndentationLength)
contours
- Contours to analyze.curvatureValues
- Corresponding curvature values along contours.minProtrusionLength
- Minimal length for valid protrusions.minIndentationLength
- Minimal length for valid indentations.private void detectProtrusionsIndentations(MTBContour2D c, MorphologyAnalyzer2DInProData levelResult, double[] curvVals, int minProtrusionLength, int minIndentationLength)
Protrusions and indentations are required to have a certain length of at least the given number of pixels. This is tested first for protrusions and only afterwards for indentations. Note that changing this order can change results.
c
- Contour to analyze.levelResult
- Result data object to fill.curvVals
- Curvature values along contour.minProtrusionLength
- Minimal length of valid protrusions.minIndentationLength
- Minimal length of valid indentations.private void postprocessIndentationSegments(MorphologyAnalyzer2DInProData levelResult)
Here the boundary points of indentation regions are determined and different length measures are extracted.
levelResult
- Result object containing data collected until now.private void postprocessProtrusionSegments(MorphologyAnalyzer2DInProData levelResult)
Here the boundary points of protrusion regions are determined and different length measures are extracted.
levelResult
- Result object containing data collected until now.static void removeShortRuns(int[] dirArray, int tSign, int minLength)
dirArray
- Array to modify.tSign
- Target sign of run to check for, should be 1 or -1.minLength
- Minimal required length of sequences of ones.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.