Package boofcv.struct.image
Class InterleavedInteger<T extends InterleavedInteger<T>>
java.lang.Object
boofcv.struct.image.ImageBase<T>
boofcv.struct.image.ImageMultiBand<T>
boofcv.struct.image.ImageInterleaved<T>
boofcv.struct.image.InterleavedInteger<T>
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
InterleavedI16
,InterleavedI8
,InterleavedS32
public abstract class InterleavedInteger<T extends InterleavedInteger<T>> extends ImageInterleaved<T>
Base class for integer interleaved images.
- See Also:
- Serialized Form
-
Nested Class Summary
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
Constructors Modifier Constructor Description protected
InterleavedInteger()
protected
InterleavedInteger(int width, int height, int numBands)
Creates a new image with an arbitrary number of bands/colors. -
Method Summary
Modifier and Type Method Description int[]
get(int x, int y, @org.jetbrains.annotations.Nullable int[] storage)
Returns the pixel's value for all the bands as an array.abstract int
getBand(int x, int y, int band)
Returns the value of the specified band in the specified pixel.void
set(int x, int y, int... value)
Sets the pixel's value for all the bands using an array.abstract void
setBand(int x, int y, int band, int value)
Returns the value of the specified band in the specified pixel.abstract void
unsafe_get(int x, int y, int[] storage)
abstract void
unsafe_set(int x, int y, int... value)
Methods inherited from class boofcv.struct.image.ImageInterleaved
_getData, _setData, copyRow, create, createSameShape, getDataType, getIndex, getIndex, getNumBands, getPrimitiveDataType, reshape, reshape, setNumberOfBands, setTo, subimage, toString, toString_element
Methods inherited from class boofcv.struct.image.ImageMultiBand
reshapeTo
Methods inherited from class boofcv.struct.image.ImageBase
clone, copyCol, createNew, createSameShape, forEachXY, getImageType, indexToPixelX, indexToPixelY, isInBounds, isSubimage, subimage, totalPixels
-
Constructor Details
-
InterleavedInteger
protected InterleavedInteger(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.
-
InterleavedInteger
protected InterleavedInteger()
-
-
Method Details
-
get
public int[] get(int x, int y, @Nullable @org.jetbrains.annotations.Nullable int[] 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.
-
unsafe_get
public abstract void unsafe_get(int x, int y, int[] storage) -
set
public void set(int x, int y, int... 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.
-
unsafe_set
public abstract void unsafe_set(int x, int y, int... value) -
getBand
public abstract int getBand(int x, int y, int band)Returns the value of the specified band in the specified pixel.- Parameters:
x
- pixel coordinate.y
- pixel coordinate.band
- which color band in the pixel- Returns:
- an intensity value.
-
setBand
public abstract void setBand(int x, int y, int band, int 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.
-