Package boofcv.struct.image
Class InterleavedI8<T extends InterleavedI8<T>>
java.lang.Object
boofcv.struct.image.ImageBase<T>
boofcv.struct.image.ImageMultiBand<T>
boofcv.struct.image.ImageInterleaved<T>
boofcv.struct.image.InterleavedInteger<T>
boofcv.struct.image.InterleavedI8<T>
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
InterleavedS8,InterleavedU8
ImageInterleaved for data of type byte.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class boofcv.struct.image.InterleavedInteger
InterleavedInteger.EachPixelNested classes/interfaces inherited from class boofcv.struct.image.ImageBase
ImageBase.PixelXY -
Field Summary
FieldsFields inherited from class boofcv.struct.image.ImageInterleaved
numBands -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedInterleavedI8(int width, int height, int numBands) Creates a new image with an arbitrary number of bands/colors. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object_getData()Returns the data array the image is stored in.protected voidSets the image's internal data array.voidCopies the column into the array.byte[]get(int x, int y, @org.jetbrains.annotations.Nullable byte[] storage) Returns the pixel's value for all the bands as an array.Returns image type informationprotected Classvoidset(int x, int y, byte... value) Sets the pixel's value for all the bands using an array.voidsetBand(int x, int y, int band, byte value) Returns the value of the specified band in the specified pixel.voidsetBand(int x, int y, int band, int value) Returns the value of the specified band in the specified pixel.toString_element(int index) Convert an individual data element into a stringvoidunsafe_set(int x, int y, int... value) Methods inherited from class boofcv.struct.image.InterleavedInteger
forEachPixel, get, getArrayValue, getBand, set, unsafe_getMethods inherited from class boofcv.struct.image.ImageInterleaved
copyRow, create, createSameShape, getIndex, getIndex, getNumBands, reshape, reshape, setNumberOfBands, setTo, subimage, toStringMethods inherited from class boofcv.struct.image.ImageMultiBand
reshapeToMethods inherited from class boofcv.struct.image.ImageBase
clone, createNew, createSameShape, forEachXY, getImageType, indexToPixelX, indexToPixelY, isInBounds, isSameShape, isSubimage, subimage, totalPixels
-
Field Details
-
data
public byte[] data
-
-
Constructor Details
-
InterleavedI8
protected InterleavedI8(int width, int height, int numBands) Creates a new image with an arbitrary number of bands/colors.- Parameters:
width- number of columns in the image.height- number of rows in the image.numBands- number of bands/colors in the image.
-
InterleavedI8
protected InterleavedI8()
-
-
Method Details
-
toString_element
Description copied from class:ImageInterleavedConvert an individual data element into a string- Specified by:
toString_elementin classImageInterleaved<T extends InterleavedI8<T>>
-
getDataType
Description copied from class:ImageInterleavedReturns image type information- Specified by:
getDataTypein classImageInterleaved<T extends InterleavedI8<T>>- Returns:
- The type of image.
-
get
public byte[] get(int x, int y, @Nullable @org.jetbrains.annotations.Nullable byte[] storage) Returns the pixel's value for all the bands as an array.- Parameters:
x- pixel coordinate.y- pixel coordinate.storage- If not null then the pixel's value is written here. If null a new array is created.- Returns:
- The pixel's value.
-
set
public void set(int x, int y, byte... value) Sets the pixel's value for all the bands using an array.- Parameters:
x- pixel coordinate.y- pixel coordinate.value- The pixel's new value for each band.
-
setBand
public void setBand(int x, int y, int band, byte value) Returns the value of the specified band in the specified pixel.- Parameters:
x- pixel coordinate.y- pixel coordinate.band- which color band in the pixelvalue- The new value of the element.
-
unsafe_set
public void unsafe_set(int x, int y, int... value) - Specified by:
unsafe_setin classInterleavedInteger<T extends InterleavedI8<T>>
-
setBand
public void setBand(int x, int y, int band, int value) Description copied from class:InterleavedIntegerReturns the value of the specified band in the specified pixel.- Specified by:
setBandin classInterleavedInteger<T extends InterleavedI8<T>>- Parameters:
x- pixel coordinate.y- pixel coordinate.band- which color band in the pixelvalue- The new value of the element.
-
copyCol
Description copied from class:ImageBaseCopies the column into the array.- Specified by:
copyColin classImageBase<T extends InterleavedI8<T>>- Parameters:
col- Which column to copy.row0- First row. Inclusive.row1- Last row. Exclusive.offset- First index in output arrayarray- Output array
-
_getData
Description copied from class:ImageInterleavedReturns the data array the image is stored in.- Specified by:
_getDatain classImageInterleaved<T extends InterleavedI8<T>>- Returns:
- data array;
-
getPrimitiveDataType
- Specified by:
getPrimitiveDataTypein classImageInterleaved<T extends InterleavedI8<T>>
-
_setData
Description copied from class:ImageInterleavedSets the image's internal data array.- Specified by:
_setDatain classImageInterleaved<T extends InterleavedI8<T>>- Parameters:
data- data array
-