boofcv.struct.image
Class GrayI<T extends GrayI>
- java.lang.Object
-
- boofcv.struct.image.ImageBase<T>
-
- boofcv.struct.image.ImageGray<T>
-
- boofcv.struct.image.GrayI<T>
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public abstract class GrayI<T extends GrayI> extends ImageGray<T>
Base class for all integer images. An integer image can either be signed or unsigned. Since all integers in Java are signed (which is really f*ing annoying) a boolean variable is used to differentiate these image types.
DESIGN NOTE: No performance or generality is lost by using the 'int' type for setters and getters. At a low level the JavaVM converts all integer types into an int when not in an array.
DESIGN NOTE: Java does not support unsigned data. If an image is unsigned this is only directly enforced by the get() function. When directly accessing the data array the data's unsigned nature must be enforced manually using the bitwise and operator.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description intget(int x, int y)Returns the value of the specified pixel.ImageDataTypegetDataType()Returns image type informationvoidprint()voidprintBinary()voidprintNotZero()abstract voidset(int x, int y, int value)Sets the value of the specified pixel.abstract intunsafe_get(int x, int y)Get function which does not perform bounds checking.abstract voidunsafe_set(int x, int y, int value)Set function which does not perform bounds checking.-
Methods inherited from class boofcv.struct.image.ImageBase
_createNew, clone, createSameShape, getHeight, getImageType, getIndex, getStartIndex, getStride, getWidth, indexToPixel, isInBounds, isSubimage, setHeight, setStartIndex, setStride, setWidth, subimage
-
-
-
-
Method Detail
-
get
public int get(int x, int y)Returns the value of the specified pixel.- Parameters:
x- pixel coordinate.y- pixel coordinate.- Returns:
- an intensity value.
-
set
public abstract void set(int x, int y, int value)Sets the value of the specified pixel.- Parameters:
x- pixel coordinate.y- pixel coordinate.value- The pixel's new value.
-
unsafe_set
public abstract void unsafe_set(int x, int y, int value)Set function which does not perform bounds checking.- Parameters:
x- pixel coordinate.y- pixel coordinate.value- The pixel's new value.
-
unsafe_get
public abstract int unsafe_get(int x, int y)Get function which does not perform bounds checking.- Parameters:
x- pixel coordinate.y- pixel coordinate.- Returns:
- an intensity value.
-
getDataType
public ImageDataType getDataType()
Description copied from class:ImageGrayReturns image type information- Specified by:
getDataTypein classImageGray<T extends GrayI>- Returns:
- The type of image.
-
print
public void print()
-
printBinary
public void printBinary()
-
printNotZero
public void printNotZero()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG