Package boofcv.struct.image
Class InterleavedS32
java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable
ImageInterleaved for data of type int.
- 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
ConstructorsConstructorDescriptionInterleavedS32(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.createNew(int imgWidth, int imgHeight) Returns a new image.protected intgetArrayValue(int index) intgetBand(int x, int y, int band) Returns the value of the specified band in the specified pixel.Returns image type informationprotected ClassvoidsetBand(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_get(int x, int y, int[] storage) voidunsafe_set(int x, int y, int... value) Sets the pixel's value for all the bands using an array.Methods inherited from class boofcv.struct.image.InterleavedInteger
forEachPixel, get, setMethods 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, createSameShape, forEachXY, getImageType, indexToPixelX, indexToPixelY, isInBounds, isSameShape, isSubimage, subimage, totalPixels
-
Field Details
-
data
public int[] data
-
-
Constructor Details
-
InterleavedS32
public InterleavedS32(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.
-
InterleavedS32
public InterleavedS32()
-
-
Method Details
-
toString_element
Description copied from class:ImageInterleavedConvert an individual data element into a string- Specified by:
toString_elementin classImageInterleaved<InterleavedS32>
-
getDataType
Description copied from class:ImageInterleavedReturns image type information- Specified by:
getDataTypein classImageInterleaved<InterleavedS32>- Returns:
- The type of image.
-
unsafe_get
public void unsafe_get(int x, int y, int[] storage) - Specified by:
unsafe_getin classInterleavedInteger<InterleavedS32>
-
unsafe_set
public void unsafe_set(int x, int y, int... value) Sets the pixel's value for all the bands using an array.- Specified by:
unsafe_setin classInterleavedInteger<InterleavedS32>- Parameters:
x- pixel coordinate.y- pixel coordinate.value- The pixel's new value for each band.
-
getBand
public int getBand(int x, int y, int band) Returns the value of the specified band in the specified pixel.- Specified by:
getBandin classInterleavedInteger<InterleavedS32>- Parameters:
x- pixel coordinate.y- pixel coordinate.band- which color band in the pixel- Returns:
- an intensity value.
-
getArrayValue
protected int getArrayValue(int index) - Specified by:
getArrayValuein classInterleavedInteger<InterleavedS32>
-
setBand
public void setBand(int x, int y, int band, int value) Returns the value of the specified band in the specified pixel.- Specified by:
setBandin classInterleavedInteger<InterleavedS32>- 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<InterleavedS32>- 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<InterleavedS32>- Returns:
- data array;
-
getPrimitiveDataType
- Specified by:
getPrimitiveDataTypein classImageInterleaved<InterleavedS32>
-
_setData
Description copied from class:ImageInterleavedSets the image's internal data array.- Specified by:
_setDatain classImageInterleaved<InterleavedS32>- Parameters:
data- data array
-
createNew
Description copied from class:ImageBaseReturns a new image. If either width or height are set to -1 then none of the class parameters set. Otherwise a new image is created with the specified dimensions which has all other parameters the same as the original matrix.- Specified by:
createNewin classImageBase<InterleavedS32>- Parameters:
imgWidth- Width of the new imageimgHeight- height of the new image- Returns:
- new image
-