public class OverlappingLabels<T extends Comparable<T>> extends Object
Constructor and Description |
---|
OverlappingLabels(RandomAccessibleInterval<LabelingType<T>> labeling) |
Modifier and Type | Method and Description |
---|---|
List<T> |
getIndexedLabels()
Get the list of labels for this confusion matrix.
|
RandomAccessibleInterval<UnsignedIntType> |
getMatrix()
Get the confusion/co-occurrence matrix.
|
RandomAccessibleInterval<DoubleType> |
getNormalizedMatrix()
Get the normalized directional confusion matrix.
|
double |
getPartialOverlap(T ofLabel,
T overlappingLabel)
The fraction of
ofLabel that overlaps with
overlappingLabel . |
double |
getPartialOverlapForIndex(int ofLabelIndex,
int overlappingLabelIndex)
The fraction of the label at
ofLabelIndex that overlaps with the
label at overlappingLabelIndex . |
long |
getPixelOverlap(T label1,
T label2)
The number of pixels overlapping between two labels.
|
long |
getPixelOverlapForIndex(int index1,
int index2)
The number of pixels overlapping between two labels at the specified
indices.
|
public OverlappingLabels(RandomAccessibleInterval<LabelingType<T>> labeling)
public RandomAccessibleInterval<UnsignedIntType> getMatrix()
getIndexedLabels()
.public RandomAccessibleInterval<DoubleType> getNormalizedMatrix()
getIndexedLabels()
.public List<T> getIndexedLabels()
public long getPixelOverlap(T label1, T label2)
label1
- The first labellabel2
- The second labelpublic long getPixelOverlapForIndex(int index1, int index2)
index1
- The index of the first labelindex2
- The index of the second labelpublic double getPartialOverlap(T ofLabel, T overlappingLabel)
ofLabel
that overlaps with
overlappingLabel
.
If ofLabel
has size 2 and overlappingLabel
has size 100,
and they overlap by 1 pixel, the resulting fraction is 0.5ofLabel
- overlappingLabel
- public double getPartialOverlapForIndex(int ofLabelIndex, int overlappingLabelIndex)
ofLabelIndex
that overlaps with the
label at overlappingLabelIndex
.
See getPartialOverlap(Comparable, Comparable)
.ofLabelIndex
- overlappingLabelIndex
- Copyright © 2015–2022 ImgLib2. All rights reserved.