public class RGBDataset extends CompoundShortDataset implements Cloneable
data
isize
base, BLOCK_CLOSE, BLOCK_OPEN, odata, offset, size, stride, stringFormat
catchExceptions, logger, metadata, name, shape
ARRAYFLOAT32, ARRAYFLOAT64, ARRAYINT16, ARRAYINT32, ARRAYINT64, ARRAYINT8, ARRAYMUL, BOOL, COMPLEX, COMPLEX128, COMPLEX64, DATE, FLOAT, FLOAT32, FLOAT64, INT, INT16, INT32, INT64, INT8, OBJECT, RGB, STRING
Constructor and Description |
---|
RGBDataset()
Create a null dataset
|
RGBDataset(byte[] redData,
byte[] greenData,
byte[] blueData,
int... shape)
Create a dataset using given data (red, green and blue parts are given separately)
|
RGBDataset(Dataset grey)
Create a dataset using given grey data
|
RGBDataset(Dataset red,
Dataset green,
Dataset blue)
Create a dataset using given colour data (colour components are given separately)
|
RGBDataset(int... shape) |
RGBDataset(int[] redData,
int[] greenData,
int[] blueData,
int... shape)
Create a dataset using given data (red, green and blue parts are given separately)
|
RGBDataset(RGBDataset dataset)
Copy a dataset
|
RGBDataset(short[] data,
int... shape) |
RGBDataset(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 |
---|---|
RGBDataset |
clone()
Clone dataset
|
Dataset |
createBlueDataset(int dtype)
Deprecated.
|
<T extends Dataset> |
createBlueDataset(T clazz)
Extract blue colour channel
|
static RGBDataset |
createFromCompoundDataset(CompoundDataset a)
Create a RGB dataset from a compound dataset (no normalisation performed)
|
static RGBDataset |
createFromHSL(Dataset hue,
Dataset saturation,
Dataset lightness)
Create a RGB dataset from hue, saturation and lightness dataset
|
static RGBDataset |
createFromHSV(Dataset hue,
Dataset saturation,
Dataset value)
Create a RGB dataset from hue, saturation and value dataset
|
static RGBDataset |
createFromObject(Object obj)
Create a RGB dataset from an object which could be a Java list, array (of arrays...) or Number.
|
Dataset |
createGreenDataset(int dtype)
Deprecated.
|
<T extends Dataset> |
createGreenDataset(T clazz)
Extract green colour channel
|
<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.
|
Dataset |
createRedDataset(int dtype)
Deprecated.
|
<T extends Dataset> |
createRedDataset(T clazz)
Extract red colour channel
|
short |
getBlue() |
short |
getBlue(int... pos) |
short |
getBlue(int i) |
short |
getBlue(int i,
int j) |
short |
getBlueAbs(int n)
Get a blue value from given absolute index as a short - note this index does not
take in account the item size so be careful when using with multi-element items
|
ShortDataset |
getBlueView() |
int |
getDType() |
short |
getGreen() |
short |
getGreen(int... pos) |
short |
getGreen(int i) |
short |
getGreen(int i,
int j) |
short |
getGreenAbs(int n)
Get a green value from given absolute index as a short - note this index does not
take in account the item size so be careful when using with multi-element items
|
ShortDataset |
getGreenView() |
short |
getRed() |
short |
getRed(int... pos) |
short |
getRed(int i) |
short |
getRed(int i,
int j) |
short |
getRedAbs(int n)
Get a red value from given absolute index as a short - note this index does not
take in account the item size so be careful when using with multi-element items
|
ShortDataset |
getRedView() |
RGBDataset |
getSlice(SliceIterator siter)
Get a slice of the dataset.
|
RGBDataset |
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, getElementDoubleAbs, getElementLongAbs, 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, setSlice
argMax, 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, getSliceIterator, getSliceView, getSliceView, getSliceView, getTransposedView, getUniqueItems, ifloorDivide, 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, variance
all, 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, getError, getErrorBuffer, getFirst1DIndex, getIndices, getInternalSquaredError, getItemBytes, getIterator, getMaxLineLength, getNbytes, getNDPosition, getOffset, getPositionIterator, getRank, getRealPart, getRealView, getShape, getShapeRef, getSize, 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, variance
addMetadata, checkPermutatedAxes, clearMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, findMetadataTypeSubInterfaces, getElementClass, getErrorMetadata, getFirstMetadata, getMetadata, getMetadata, getMetadataMap, getName, hasErrors, reshapeMetadata, restoreMetadata, setDirty, setErrors, setMetadata, setName, sliceMetadata, transposeMetadata
finalize, getClass, notify, notifyAll, wait, wait, wait
all, all, any, any, argMax, argMin, cast, cast, checkAxis, checkCompatibility, copy, copy, count, count, count, get1DIndex, getBooleanIterator, getBooleanIterator, getBuffer, getError, getErrorBuffer, getIndices, getIterator, getNbytes, getNDPosition, getOffset, getPositionIterator, getRealPart, getRealView, getShapeRef, 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, variance
getItemBytes, getMetadata, setStringFormat
addMetadata, clearMetadata, getElementClass, getRank, getShape, getSize, hasErrors, setErrors, setMetadata, setShape
getFirstMetadata, getMetadata
public RGBDataset()
public RGBDataset(int... shape)
public RGBDataset(short[] data, int... shape)
public RGBDataset(RGBDataset dataset)
dataset
- public RGBDataset(int[] redData, int[] greenData, int[] blueData, int... shape)
redData
- greenData
- blueData
- shape
- (can be null to create 1D dataset)public RGBDataset(short[] redData, short[] greenData, short[] blueData, int... shape)
redData
- greenData
- blueData
- shape
- (can be null to create 1D dataset)public RGBDataset(byte[] redData, byte[] greenData, byte[] blueData, int... shape)
redData
- greenData
- blueData
- shape
- (can be null to create 1D dataset)public RGBDataset(Dataset red, Dataset green, Dataset blue)
red
- green
- blue
- public RGBDataset(Dataset grey)
grey
- public int getDType()
getDType
in interface Dataset
getDType
in class CompoundShortDataset
public RGBDataset clone()
ILazyDataset
clone
in interface CompoundDataset
clone
in interface Dataset
clone
in interface IDataset
clone
in interface ILazyDataset
clone
in class CompoundShortDataset
public static RGBDataset createFromObject(Object obj)
obj
- public static RGBDataset createFromCompoundDataset(CompoundDataset a)
a
- public static RGBDataset 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 RGBDataset 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 RGBDataset getSlice(SliceIterator siter)
AbstractDataset
getSlice
in class CompoundShortDataset
siter
- Slice iteratorpublic RGBDataset getView(boolean deepCopyMetadata)
getView
in interface CompoundDataset
getView
in interface Dataset
getView
in class CompoundShortDataset
deepCopyMetadata
- if true then deep-copy metadatapublic short getRed()
public short getRed(int i)
i
- public short getRed(int i, int j)
i
- j
- public short getRed(int... pos)
pos
- public short getGreen()
public short getGreen(int i)
i
- public short getGreen(int i, int j)
i
- j
- public short getGreen(int... pos)
pos
- public short getBlue()
public short getBlue(int i)
i
- public short getBlue(int i, int j)
i
- j
- public short getBlue(int... pos)
pos
- public short getRedAbs(int n)
n
- public short getGreenAbs(int n)
n
- public short getBlueAbs(int n)
n
- public <T extends Dataset> T createGreyDataset(Class<T> clazz)
clazz
- public <T extends Dataset> T createGreyDataset(Class<T> clazz, double red, double green, double blue)
clazz
- red
- weightgreen
- weightblue
- weight@Deprecated public Dataset createGreyDataset(int dtype)
createGreyDataset(Class)
dtype
- @Deprecated public Dataset createGreyDataset(double red, double green, double blue, int dtype)
createGreyDataset(Class, double, double, double)
red
- weightgreen
- weightblue
- weightdtype
- public <T extends Dataset> T createRedDataset(T clazz)
clazz
- public <T extends Dataset> T createGreenDataset(T clazz)
clazz
- public <T extends Dataset> T createBlueDataset(T clazz)
clazz
- @Deprecated public Dataset createRedDataset(int dtype)
createRedDataset(T)
dtype
- @Deprecated public Dataset createGreenDataset(int dtype)
createGreenDataset(T)
dtype
- @Deprecated public Dataset createBlueDataset(int dtype)
createBlueDataset(T)
dtype
- public ShortDataset getRedView()
public ShortDataset getGreenView()
public ShortDataset getBlueView()
public Number max(boolean... ignored)
max
in interface IDataset
max
in class AbstractCompoundDataset
ignored
- - 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 IDataset
min
in class AbstractCompoundDataset
ignored
- - see IDataset.max(boolean...)
Copyright © 2014–2019 Eclipse Foundation. All rights reserved.