Package boofcv.struct.image
Class InterleavedI16<T extends InterleavedI16<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.InterleavedI16<T>
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
InterleavedS16
,InterleavedU16
ImageInterleaved
for data of type short.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class boofcv.struct.image.InterleavedInteger
InterleavedInteger.EachPixel
Nested classes/interfaces inherited from class boofcv.struct.image.ImageBase
ImageBase.PixelXY
-
Field Summary
Fields inherited from class boofcv.struct.image.ImageInterleaved
numBands
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
InterleavedI16
(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 void
Sets the image's internal data array.void
Copies the column into the array.short[]
get
(int x, int y, @org.jetbrains.annotations.Nullable short[] storage) Returns the pixel's value for all the bands as an array.Returns image type informationprotected Class
void
set
(int x, int y, short... value) Sets the pixel's value for all the bands using an array.void
setBand
(int x, int y, int band, int value) Returns the value of the specified band in the specified pixel.void
setBand
(int x, int y, int band, short value) Returns the value of the specified band in the specified pixel.toString_element
(int index) Convert an individual data element into a stringvoid
unsafe_set
(int x, int y, int... value) Methods inherited from class boofcv.struct.image.InterleavedInteger
forEachPixel, get, getArrayValue, getBand, set, unsafe_get
Methods inherited from class boofcv.struct.image.ImageInterleaved
copyRow, create, createSameShape, getIndex, getIndex, getNumBands, reshape, reshape, setNumberOfBands, setTo, subimage, toString
Methods inherited from class boofcv.struct.image.ImageMultiBand
reshapeTo
Methods inherited from class boofcv.struct.image.ImageBase
clone, createNew, createSameShape, forEachXY, getImageType, indexToPixelX, indexToPixelY, isInBounds, isSameShape, isSubimage, subimage, totalPixels
-
Field Details
-
data
public short[] data
-
-
Constructor Details
-
InterleavedI16
protected InterleavedI16(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.
-
InterleavedI16
protected InterleavedI16()
-
-
Method Details
-
toString_element
Description copied from class:ImageInterleaved
Convert an individual data element into a string- Specified by:
toString_element
in classImageInterleaved<T extends InterleavedI16<T>>
-
getDataType
Description copied from class:ImageInterleaved
Returns image type information- Specified by:
getDataType
in classImageInterleaved<T extends InterleavedI16<T>>
- Returns:
- The type of image.
-
get
public short[] get(int x, int y, @Nullable @org.jetbrains.annotations.Nullable short[] 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, short... 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, short 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_set
in classInterleavedInteger<T extends InterleavedI16<T>>
-
setBand
public void setBand(int x, int y, int band, int value) Description copied from class:InterleavedInteger
Returns the value of the specified band in the specified pixel.- Specified by:
setBand
in classInterleavedInteger<T extends InterleavedI16<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:ImageBase
Copies the column into the array.- Specified by:
copyCol
in classImageBase<T extends InterleavedI16<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:ImageInterleaved
Returns the data array the image is stored in.- Specified by:
_getData
in classImageInterleaved<T extends InterleavedI16<T>>
- Returns:
- data array;
-
getPrimitiveDataType
- Specified by:
getPrimitiveDataType
in classImageInterleaved<T extends InterleavedI16<T>>
-
_setData
Description copied from class:ImageInterleaved
Sets the image's internal data array.- Specified by:
_setData
in classImageInterleaved<T extends InterleavedI16<T>>
- Parameters:
data
- data array
-