public static class TestImgFormat.TestImgUtils extends Object
| Constructor and Description |
|---|
TestImgUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createIndexMaps(int[][] indexToValue,
int[][] valueToIndex)
Populates a mapping between indicies and color values, and the inverse
mapping of color values to indicies.
|
static void |
createIndexValueMap(int[][] indexToValue)
Populates the given array with a random mapping of indices to values.
|
static void |
createInverseIndexMap(int[][] indexToValue,
int[][] valueToIndex)
Populates an array with inverse mapping of values and indices, drawn from
a base index:value mapping.
|
static void |
shuffle(int c,
int[] array)
Fisher-Yates shuffle with constant seeds to ensure reproducibility.
|
public static void createIndexMaps(int[][] indexToValue,
int[][] valueToIndex)
NB: The array parameters will be modified by this method and should simply be empty and initialized to the appropriate dimensions.
indexToValue - - a channel size X num values array, mapping indicies
to color values.valueToIndex - - a channel size X num values array, mapping color
values to indicies.public static void createIndexValueMap(int[][] indexToValue)
indexToValue - - An empty array that will be populated with an
index:value mapping.public static void createInverseIndexMap(int[][] indexToValue,
int[][] valueToIndex)
indexToValue - - A populated mapping of indicies to color values.valueToIndex - - An empty array that will be populated with the
inverse of indexToValue.public static void shuffle(int c,
int[] array)
Copyright © 2011–2026 SCIFIO. All rights reserved.