Class LabelsProcessor
java.lang.Object
net.algart.arrays.Arrays.ParallelExecutor
net.algart.executors.modules.cv.matrices.objects.labels.LabelsProcessor
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
LabelledObjectsProcessor,LabelledObjectsProcessorForFloat,LabelsListsBuilder
public abstract class LabelsProcessor
extends net.algart.arrays.Arrays.ParallelExecutor
implements AutoCloseable
-
Field Summary
Fields inherited from class net.algart.arrays.Arrays.ParallelExecutor
blockSize, dest, numberOfRanges, numberOfTasks, src -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLabelsProcessor(net.algart.arrays.Array src) protectedLabelsProcessor(net.algart.arrays.Array src, int blockSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected static byte[][]castToByte(Object[] channels) protected static double[][]castToDouble(Object[] channels) protected static float[][]castToFloat(Object[] channels) protected static int[][]protected static short[][]castToShort(Object[] channels) protected static double[]ensureCapacityForLabel(double[] array, int label) protected static int[]ensureCapacityForLabel(int[] array, int label) protected static voidensureCapacityForPixels(byte[][] arrays, int totalNumberOfPixels, int newElementIndex) protected static voidensureCapacityForPixels(double[][] arrays, int totalNumberOfPixels, int newElementIndex) protected static voidensureCapacityForPixels(float[][] arrays, int totalNumberOfPixels, int newElementIndex) protected static voidensureCapacityForPixels(int[][] arrays, int totalNumberOfPixels, int newElementIndex) protected static voidensureCapacityForPixels(short[][] arrays, int totalNumberOfPixels, int newElementIndex) protected static voidensureSeveralArraysCapacityForLabel(double[][] arrays, int label) protected static booleanisArraySupported(Object array) protected static intnumberOrParticlesInBlockForParallelProcessing(int numberOfParticles) protected abstract voidprocessSubArr(int p, int count, int threadIndex) protected final voidprocessSubArr(long position, int count, int threadIndex) protected static voidreleaseAndClearDoubleArrays(double[][][] arrays, int numberOfElementsToZero) protected static voidreleaseAndClearDoubleArrays(double[][] arrays, int numberOfElementsToZero) protected static voidreleaseAndClearIntArrays(int[][][] arrays, int numberOfElementsToZero) protected static voidreleaseAndClearIntArrays(int[][] arrays, int numberOfElementsToZero) protected static voidreleaseByteArrays(byte[][] arrays) protected static voidreleaseByteArrays(byte[][][] arrays) protected static voidreleaseDoubleArrays(double[][] arrays) protected static voidreleaseDoubleArrays(double[][][] arrays) protected static voidreleaseFloatArrays(float[][] arrays) protected static voidreleaseFloatArrays(float[][][] arrays) protected static voidreleaseIntArrays(int[][] arrays) protected static voidreleaseIntArrays(int[][][] arrays) protected static voidreleaseShortArrays(short[][] arrays) protected static voidreleaseShortArrays(short[][][] arrays) protected static byte[][]requestByteArrays(int numberOfArrays) protected static byte[][][]requestByteArrays(int numberOfArrays, int numberOfChannels) protected static double[][]requestClearedDoubleArrays(int numberOfArrays) protected static double[][][]requestClearedDoubleArrays(int numberOfArrays, int numberOfChannels) protected static int[][]requestClearedIntArrays(int numberOfArrays) protected static int[][][]requestClearedIntArrays(int numberOfArrays, int numberOfChannels) protected static double[][]requestDoubleArrays(int numberOfArrays) protected static double[][][]requestDoubleArrays(int numberOfArrays, int numberOfChannels) protected static float[][]requestFloatArrays(int numberOfArrays) protected static float[][][]requestFloatArrays(int numberOfArrays, int numberOfChannels) protected static int[][]requestIntArrays(int numberOfArrays) protected static int[][][]requestIntArrays(int numberOfArrays, int numberOfChannels) protected static short[][]requestShortArrays(int numberOfArrays) protected static short[][][]requestShortArrays(int numberOfArrays, int numberOfChannels) Methods inherited from class net.algart.arrays.Arrays.ParallelExecutor
checkInterruption, context, correctNumberOfRanges, endGap, finish, granularity, increaseReadyCount, numberOfRanges, numberOfTasks, process, processRange, rangeFrom, rangeLength, rangeTo, readyCount, recommendedNumberOfRanges, startGap, toString, updateProgressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.AutoCloseable
close
-
Constructor Details
-
LabelsProcessor
protected LabelsProcessor(net.algart.arrays.Array src) -
LabelsProcessor
protected LabelsProcessor(net.algart.arrays.Array src, int blockSize)
-
-
Method Details
-
processSubArr
protected final void processSubArr(long position, int count, int threadIndex) - Specified by:
processSubArrin classnet.algart.arrays.Arrays.ParallelExecutor
-
processSubArr
protected abstract void processSubArr(int p, int count, int threadIndex) -
numberOrParticlesInBlockForParallelProcessing
protected static int numberOrParticlesInBlockForParallelProcessing(int numberOfParticles) -
isArraySupported
-
castToByte
-
castToShort
-
castToInt
-
castToFloat
-
castToDouble
-
requestByteArrays
protected static byte[][] requestByteArrays(int numberOfArrays) -
requestByteArrays
protected static byte[][][] requestByteArrays(int numberOfArrays, int numberOfChannels) -
releaseByteArrays
protected static void releaseByteArrays(byte[][] arrays) -
releaseByteArrays
protected static void releaseByteArrays(byte[][][] arrays) -
requestShortArrays
protected static short[][] requestShortArrays(int numberOfArrays) -
requestShortArrays
protected static short[][][] requestShortArrays(int numberOfArrays, int numberOfChannels) -
releaseShortArrays
protected static void releaseShortArrays(short[][] arrays) -
releaseShortArrays
protected static void releaseShortArrays(short[][][] arrays) -
requestIntArrays
protected static int[][] requestIntArrays(int numberOfArrays) -
requestIntArrays
protected static int[][][] requestIntArrays(int numberOfArrays, int numberOfChannels) -
releaseIntArrays
protected static void releaseIntArrays(int[][] arrays) -
releaseIntArrays
protected static void releaseIntArrays(int[][][] arrays) -
requestFloatArrays
protected static float[][] requestFloatArrays(int numberOfArrays) -
requestFloatArrays
protected static float[][][] requestFloatArrays(int numberOfArrays, int numberOfChannels) -
releaseFloatArrays
protected static void releaseFloatArrays(float[][] arrays) -
releaseFloatArrays
protected static void releaseFloatArrays(float[][][] arrays) -
requestDoubleArrays
protected static double[][] requestDoubleArrays(int numberOfArrays) -
requestDoubleArrays
protected static double[][][] requestDoubleArrays(int numberOfArrays, int numberOfChannels) -
releaseDoubleArrays
protected static void releaseDoubleArrays(double[][] arrays) -
releaseDoubleArrays
protected static void releaseDoubleArrays(double[][][] arrays) -
requestClearedIntArrays
protected static int[][] requestClearedIntArrays(int numberOfArrays) -
requestClearedIntArrays
protected static int[][][] requestClearedIntArrays(int numberOfArrays, int numberOfChannels) -
releaseAndClearIntArrays
protected static void releaseAndClearIntArrays(int[][] arrays, int numberOfElementsToZero) -
releaseAndClearIntArrays
protected static void releaseAndClearIntArrays(int[][][] arrays, int numberOfElementsToZero) -
requestClearedDoubleArrays
protected static double[][] requestClearedDoubleArrays(int numberOfArrays) -
requestClearedDoubleArrays
protected static double[][][] requestClearedDoubleArrays(int numberOfArrays, int numberOfChannels) -
releaseAndClearDoubleArrays
protected static void releaseAndClearDoubleArrays(double[][] arrays, int numberOfElementsToZero) -
releaseAndClearDoubleArrays
protected static void releaseAndClearDoubleArrays(double[][][] arrays, int numberOfElementsToZero) -
ensureCapacityForPixels
protected static void ensureCapacityForPixels(byte[][] arrays, int totalNumberOfPixels, int newElementIndex) -
ensureCapacityForPixels
protected static void ensureCapacityForPixels(short[][] arrays, int totalNumberOfPixels, int newElementIndex) -
ensureCapacityForPixels
protected static void ensureCapacityForPixels(int[][] arrays, int totalNumberOfPixels, int newElementIndex) -
ensureCapacityForPixels
protected static void ensureCapacityForPixels(float[][] arrays, int totalNumberOfPixels, int newElementIndex) -
ensureCapacityForPixels
protected static void ensureCapacityForPixels(double[][] arrays, int totalNumberOfPixels, int newElementIndex) -
ensureCapacityForLabel
protected static int[] ensureCapacityForLabel(int[] array, int label) -
ensureCapacityForLabel
protected static double[] ensureCapacityForLabel(double[] array, int label) -
ensureSeveralArraysCapacityForLabel
protected static void ensureSeveralArraysCapacityForLabel(double[][] arrays, int label)
-