public abstract class ImageInteger<T extends ImageInteger> extends ImageSingleBand<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.
| Modifier | Constructor and Description |
|---|---|
protected |
ImageInteger() |
protected |
ImageInteger(int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
int |
get(int x,
int y)
Returns the value of the specified pixel.
|
ImageDataType |
getTypeInfo()
Returns image type information
|
void |
print() |
void |
printBinary() |
void |
printNotZero() |
abstract void |
set(int x,
int y,
int value)
Sets the value of the specified pixel.
|
abstract int |
unsafe_get(int x,
int y)
Get function which does not perform bounds checking.
|
abstract void |
unsafe_set(int x,
int y,
int value)
Set function which does not perform bounds checking.
|
_getData, _setData, reshape, setTo, subimage_createNew, clone, getHeight, getIndex, getStartIndex, getStride, getWidth, indexToPixel, isInBounds, isSubimage, setHeight, setStartIndex, setStride, setWidthprotected ImageInteger(int width,
int height)
protected ImageInteger()
public int get(int x,
int y)
x - pixel coordinate.y - pixel coordinate.public abstract void set(int x,
int y,
int value)
x - pixel coordinate.y - pixel coordinate.value - The pixel's new value.public abstract void unsafe_set(int x,
int y,
int value)
x - pixel coordinate.y - pixel coordinate.value - The pixel's new value.public abstract int unsafe_get(int x,
int y)
x - pixel coordinate.y - pixel coordinate.public ImageDataType getTypeInfo()
ImageSingleBandgetTypeInfo in class ImageSingleBand<T extends ImageInteger>public void print()
public void printBinary()
public void printNotZero()
Copyright © 2013. All Rights Reserved.