public class RGBByteDataset extends CompoundByteDataset implements Cloneable
dataisizebase, BLOCK_CLOSE, BLOCK_OPEN, ELLIPSIS, odata, offset, size, stride, stringFormatmetadata, name, shapeARRAYFLOAT32, ARRAYFLOAT64, ARRAYINT16, ARRAYINT32, ARRAYINT64, ARRAYINT8, ARRAYMUL, BOOL, COMPLEX, COMPLEX128, COMPLEX64, DATE, FLOAT, FLOAT32, FLOAT64, INT, INT16, INT32, INT64, INT8, OBJECT, RGB, RGB8, STRING| Constructor and Description |
|---|
RGBByteDataset()
Create a null dataset
|
RGBByteDataset(byte[] redData,
byte[] greenData,
byte[] blueData,
int... shape)
Create a dataset using given data (red, green and blue parts are given separately)
|
RGBByteDataset(byte[] data,
int... shape) |
RGBByteDataset(CompoundDataset colour)
Create a dataset using given compound data
|
RGBByteDataset(Dataset grey)
Create a dataset using given grey data
|
RGBByteDataset(Dataset red,
Dataset green,
Dataset blue)
Create a dataset using given colour data (colour components are given separately)
|
RGBByteDataset(int... shape) |
RGBByteDataset(int[] redData,
int[] greenData,
int[] blueData,
int... shape)
Create a dataset using given data (red, green and blue parts are given separately)
|
RGBByteDataset(RGBByteDataset dataset)
Copy a dataset
|
RGBByteDataset(short[] redData,
short[] greenData,
short[] blueData,
int... shape)
Create a dataset using given data (red, green and blue parts are given separately)
|
| Modifier and Type | Method and Description |
|---|---|
RGBByteDataset |
clone()
Clone dataset
|
<T extends Dataset> |
createBlueDataset(Class<T> clazz)
Extract blue colour channel
|
Dataset |
createBlueDataset(int dtype)
Deprecated.
|
static RGBByteDataset |
createFromCompoundDataset(CompoundDataset a)
Create a RGB dataset from a compound dataset (no normalisation performed)
|
static RGBByteDataset |
createFromHSL(Dataset hue,
Dataset saturation,
Dataset lightness)
Create a RGB dataset from hue, saturation and lightness dataset
|
static RGBByteDataset |
createFromHSV(Dataset hue,
Dataset saturation,
Dataset value)
Create a RGB dataset from hue, saturation and value dataset
|
static RGBByteDataset |
createFromObject(Object obj)
Create a RGB dataset from an object which could be a Java list, array (of arrays...) or Number.
|
<T extends Dataset> |
createGreenDataset(Class<T> clazz)
Extract green colour channel
|
Dataset |
createGreenDataset(int dtype)
Deprecated.
|
<T extends Dataset> |
createGreyDataset(Class<T> clazz)
Convert colour dataset to a grey-scale one using the NTSC formula, aka ITU-R BT.601, for RGB to luma mapping
|
<T extends Dataset> |
createGreyDataset(Class<T> clazz,
double red,
double green,
double blue)
Convert colour dataset to a grey-scale one using given RGB to luma mapping
|
Dataset |
createGreyDataset(double red,
double green,
double blue,
int dtype)
Deprecated.
|
Dataset |
createGreyDataset(int dtype)
Deprecated.
|
<T extends Dataset> |
createRedDataset(Class<T> clazz)
Extract red colour channel
|
Dataset |
createRedDataset(int dtype)
Deprecated.
|
byte |
getBlue() |
byte |
getBlue(int... pos) |
byte |
getBlue(int i) |
byte |
getBlue(int i,
int j) |
byte |
getBlueAbs(int n)
Get a blue value from given absolute index as a byte - note this index does not
take in account the item size so be careful when using with multi-element items
|
ByteDataset |
getBlueView() |
double |
getElementDoubleAbs(int index)
Get an element from given absolute index as a double.
|
long |
getElementLongAbs(int index)
Get an element from given absolute index as a long.
|
byte |
getGreen() |
byte |
getGreen(int... pos) |
byte |
getGreen(int i) |
byte |
getGreen(int i,
int j) |
byte |
getGreenAbs(int n)
Get a green value from given absolute index as a byte - note this index does not
take in account the item size so be careful when using with multi-element items
|
ByteDataset |
getGreenView() |
byte |
getRed() |
byte |
getRed(int... pos) |
byte |
getRed(int i) |
byte |
getRed(int i,
int j) |
byte |
getRedAbs(int n)
Get a red value from given absolute index as a byte - note this index does not
take in account the item size so be careful when using with multi-element items
|
ByteDataset |
getRedView() |
RGBByteDataset |
getSlice(SliceIterator siter)
Get a slice of the dataset.
|
RGBByteDataset |
getView(boolean deepCopyMetadata) |
Number |
max(boolean... ignored) |
Number |
min(boolean... ignored) |
asNonCompoundDataset, containsInfs, containsInvalidNumbers, containsNans, copyElements, copyItemsFromAxes, createArray, createCompoundDatasetWithLastDimension, createFromObject, equals, fill, fillDataset, getAbs, getAbs, getBufferLength, getByteArray, getByteArray, getByteArray, getByteArray, getData, getDoubleArray, getDoubleArray, getDoubleArray, getDoubleArray, getDoubleArrayAbs, getElementBooleanAbs, getElements, getElementsView, getFirstValue, getFirstValue, getFirstValue, getFirstValue, getFloatArray, getFloatArray, getFloatArray, getFloatArray, getIntArray, getIntArray, getIntArray, getIntArray, getLongArray, getLongArray, getLongArray, getLongArray, getObject, getObject, getObject, getObject, getObjectAbs, getShortArray, getShortArray, getShortArray, getShortArray, getString, getString, getString, getString, getStringAbs, hashCode, iadd, idivide, ifloor, imultiply, ipower, iremainder, isubtract, residual, resize, set, set, set, set, setAbs, setAbs, setBy1DIndex, setByBoolean, setByIndexes, setData, setElements, setItem, setItem, setItem, setItem, setItemDirect, setItemsOnAxes, setObjectAbs, setSliceargMax, argMin, cast, cast, flatten, get1DIndex, get1DIndex, get1DIndexFromShape, getBoolean, getBoolean, getBoolean, getBoolean, getBroadcastView, getBy1DIndex, getByBoolean, getByIndexes, getByte, getByte, getByte, getByte, getCompoundStats, getDouble, getDouble, getDouble, getDouble, getDoubleArray, getDoubleArray, getDoubleArray, getDoubleArray, getElementsPerItem, getError, getError, getError, getErrorArray, getErrorArray, getErrorArray, getErrors, getFloat, getFloat, getFloat, getFloat, getInt, getInt, getInt, getInt, getIterator, getIterator, getLong, getLong, getLong, getLong, getShort, getShort, getShort, getShort, getSlice, getSlice, getSlice, getSlice, getSlice, getSlice, getSliceView, getSliceView, getSliceView, getTransposedView, getUniqueItems, ifloorDivide, internalGetSliceIterator, max, maxItem, maxPos, mean, mean, min, minItem, minPos, peakToPeak, product, reshape, rootMeanSquare, rootMeanSquare, setSlice, setSlice, sort, squeeze, squeeze, squeezeEnds, stdDeviation, stdDeviation, sum, sum, swapAxes, synchronizedCopy, transpose, variance, variance, varianceall, all, any, any, argMax, argMin, calcSteps, cast, cast, checkAxis, checkAxis, checkCompatibility, copy, copy, copyToView, count, count, count, createStrides, createStrides, createStrides, createStrides, fillData, get1DIndex, get1DIndexFromShape, getBooleanIterator, getBooleanIterator, getBuffer, getDType, getElementClass, getError, getErrorBuffer, getFirst1DIndex, getIndices, getInternalSquaredError, getItemBytes, getIterator, getMaxLineLength, getNbytes, getNDPosition, getOffset, getPositionIterator, getRank, getRealPart, getRealView, getShape, getShapeRef, getSize, getSliceIterator, getSliceIterator, getSliceIteratorFromAxes, getStats, getStrides, getStringStats, hasFloatingPointElements, isCompatibleWith, isComplex, max, mean, min, overrideInternal, peakToPeak, peakToPeak, product, product, residual, residual, rootMeanSquare, setErrorBuffer, setMaxLineLength, setShape, setSlice, setStringFormat, stdDeviation, stdDeviation, stdDeviation, stdDeviation, sum, toString, toString, variance, variance, varianceaddMetadata, checkPermutatedAxes, checkSliceND, clearMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, findMetadataTypeSubInterfaces, getErrorMetadata, getFirstMetadata, getMetadata, getMetadata, getMetadataMap, getName, hasErrors, reshapeMetadata, restoreMetadata, setDirty, setErrors, setMetadata, setName, sliceMetadata, transposeMetadatafinalize, getClass, notify, notifyAll, wait, wait, waitall, all, any, any, argMax, argMin, cast, cast, checkAxis, checkCompatibility, copy, copy, count, count, count, get1DIndex, getBooleanIterator, getBooleanIterator, getBuffer, getDType, getError, getErrorBuffer, getIndices, getIterator, getNbytes, getNDPosition, getOffset, getPositionIterator, getRealPart, getRealView, getShapeRef, getSliceIterator, getSliceIterator, getSliceIteratorFromAxes, getStrides, hasFloatingPointElements, isCompatibleWith, isComplex, max, mean, min, overrideInternal, peakToPeak, peakToPeak, product, product, residual, residual, rootMeanSquare, setDirty, setErrorBuffer, setSlice, stdDeviation, stdDeviation, stdDeviation, stdDeviation, sum, toString, variance, variance, variancegetItemBytes, getMetadata, setStringFormataddMetadata, clearMetadata, getElementClass, getRank, getShape, getSize, hasErrors, setErrors, setMetadata, setShapegetFirstMetadata, getMetadatapublic RGBByteDataset()
public RGBByteDataset(int... shape)
shape - output shapepublic RGBByteDataset(byte[] data, int... shape)
data - interleaved RGB valuesshape - output shapepublic RGBByteDataset(RGBByteDataset dataset)
dataset - to clonepublic RGBByteDataset(int[] redData, int[] greenData, int[] blueData, int... shape)
redData - data for redgreenData - data for greenblueData - data for blueshape - (can be null to create 1D dataset)public RGBByteDataset(short[] redData, short[] greenData, short[] blueData, int... shape)
redData - data for redgreenData - data for greenblueData - data for blueshape - (can be null to create 1D dataset)public RGBByteDataset(byte[] redData, byte[] greenData, byte[] blueData, int... shape)
redData - data for redgreenData - data for greenblueData - data for blueshape - (can be null to create 1D dataset)public RGBByteDataset(Dataset red, Dataset green, Dataset blue)
red - datasetgreen - datasetblue - datasetpublic RGBByteDataset(Dataset grey)
grey - datasetpublic RGBByteDataset(CompoundDataset colour)
colour - dataset with colour datapublic RGBByteDataset clone()
ILazyDatasetclone in interface CompoundDatasetclone in interface Datasetclone in interface IDatasetclone in interface ILazyDatasetclone in class CompoundByteDatasetpublic static RGBByteDataset createFromObject(Object obj)
obj - objectpublic static RGBByteDataset createFromCompoundDataset(CompoundDataset a)
a - datasetpublic static RGBByteDataset createFromHSV(Dataset hue, Dataset saturation, Dataset value)
hue - (in degrees from -360 to 360)saturation - (from 0 to 1), can be null to denote 1value - (from 0 to 1)public static RGBByteDataset createFromHSL(Dataset hue, Dataset saturation, Dataset lightness)
hue - (in degrees from -360 to 360)saturation - (from 0 to 1), can be null to denote 1lightness - (from 0 to 1)public RGBByteDataset getSlice(SliceIterator siter)
AbstractDatasetgetSlice in class CompoundByteDatasetsiter - Slice iteratorpublic RGBByteDataset getView(boolean deepCopyMetadata)
getView in interface CompoundDatasetgetView in interface DatasetgetView in class CompoundByteDatasetdeepCopyMetadata - if true then deep-copy metadatapublic byte getRed()
public byte getRed(int i)
i - position in first dimensionpublic byte getRed(int i, int j)
i - position in first dimensionj - position in second dimensionpublic byte getRed(int... pos)
pos - positionpublic byte getGreen()
public byte getGreen(int i)
i - position in first dimensionpublic byte getGreen(int i, int j)
i - position in first dimensionj - position in second dimensionpublic byte getGreen(int... pos)
pos - positionpublic byte getBlue()
public byte getBlue(int i)
i - position in first dimensionpublic byte getBlue(int i, int j)
i - position in first dimensionj - position in second dimensionpublic byte getBlue(int... pos)
pos - positionpublic byte getRedAbs(int n)
n - absolute indexpublic byte getGreenAbs(int n)
n - absolute indexpublic byte getBlueAbs(int n)
n - absolute indexpublic <T extends Dataset> T createGreyDataset(Class<T> clazz)
T - dataset sub-interfaceclazz - dataset sub-interfacepublic <T extends Dataset> T createGreyDataset(Class<T> clazz, double red, double green, double blue)
T - dataset sub-interfaceclazz - dataset sub-interfacered - weightgreen - weightblue - weight@Deprecated public Dataset createGreyDataset(int dtype)
createGreyDataset(Class)dtype - dataset type@Deprecated public Dataset createGreyDataset(double red, double green, double blue, int dtype)
createGreyDataset(Class, double, double, double)red - weightgreen - weightblue - weightdtype - dataset typepublic <T extends Dataset> T createRedDataset(Class<T> clazz)
T - dataset sub-interfaceclazz - dataset sub-interfacepublic <T extends Dataset> T createGreenDataset(Class<T> clazz)
T - dataset sub-interfaceclazz - dataset sub-interfacepublic <T extends Dataset> T createBlueDataset(Class<T> clazz)
T - dataset sub-interfaceclazz - dataset sub-interface@Deprecated public Dataset createRedDataset(int dtype)
createRedDataset(java.lang.Class<T>)dtype - dataset type@Deprecated public Dataset createGreenDataset(int dtype)
createGreenDataset(java.lang.Class<T>)dtype - dataset type@Deprecated public Dataset createBlueDataset(int dtype)
createBlueDataset(java.lang.Class<T>)dtype - dataset typepublic ByteDataset getRedView()
public ByteDataset getGreenView()
public ByteDataset getBlueView()
public double getElementDoubleAbs(int index)
DatasetgetElementDoubleAbs in interface DatasetgetElementDoubleAbs in class CompoundByteDatasetindex - in arraypublic long getElementLongAbs(int index)
DatasetgetElementLongAbs in interface DatasetgetElementLongAbs in class CompoundByteDatasetindex - in arraypublic Number max(boolean... ignored)
max in interface IDatasetmax in class AbstractCompoundDatasetignored - - Can be null, empty, or one or more booleans. By default, all booleans
are false. If the first boolean is true, will ignore NaNs and ignore infinities. Use the second
boolean to ignore infinities separately.public Number min(boolean... ignored)
min in interface IDatasetmin in class AbstractCompoundDatasetignored - - see IDataset.max(boolean...)Copyright © 2014–2022 Eclipse Foundation. All rights reserved.