br.usp.ime.klava.segmentit.util
Class GranularitiesUtils
java.lang.Object
br.usp.ime.klava.segmentit.util.GranularitiesUtils
public class GranularitiesUtils
- extends java.lang.Object
Performs operations involving partitions at Pixel and
PrimitiveCatchmentBasin granularities.
- Author:
- Bruno Klava
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GranularitiesUtils
public GranularitiesUtils()
getUnifiedLabels
public static int[] getUnifiedLabels(PrimitiveCatchmentBasinsGraph graph,
Pixel[][] pixels)
- Returns a labeling to
graph unifying the labels in
pixels within each PrimitiveCatchmentBasin.
- Parameters:
graph - a PrimitiveCatchmentBasinsGraph to be labeledpixels - the desired partition in Pixels granularity
- Returns:
- a labeling for the given
graph that most
approximates the partition in pixels
getUnifiedLabels
public static int[] getUnifiedLabels(PrimitiveCatchmentBasinsGraph graph,
java.awt.image.BufferedImage desiredPartition)
- Returns a labeling to
graph unifying the labels in
desiredPartitions within each
PrimitiveCatchmentBasin.
- Parameters:
graph - a PrimitiveCatchmentBasinsGraph to be labeleddesiredPartition - the desired partition in Pixels granularity
- Returns:
- a labeling for the given
graph that most
approximates the partition in desiredPartition
fixLabels
public static int[] fixLabels(PrimitiveCatchmentBasinsGraph graph,
int[] originalLabels)
- Parameters:
originalLabels -
- Returns:
- a unique label for each ROI (
originalLabels may contain
same label for distinct ROIs, if a ROI was split by labels
unification within PrimitiveCatchmentBasins)