public abstract class ImageBase<T extends ImageBase>
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
int |
height
Number of rows in the image.
|
int |
startIndex
Index of the first pixel in the data array
|
int |
stride
How many elements need to be skipped over to go one row down.
|
int |
width
Number of columns in the image.
|
Constructor and Description |
---|
ImageBase() |
Modifier and Type | Method and Description |
---|---|
abstract T |
_createNew(int imgWidth,
int imgHeight)
Returns a new image.
|
int |
getHeight() |
int |
getIndex(int x,
int y) |
int |
getStartIndex() |
int |
getStride() |
int |
getWidth() |
Point2D_I32 |
indexToPixel(int index) |
boolean |
isInBounds(int x,
int y) |
boolean |
isSubimage()
If this matrix is a sub-image or not.
|
abstract void |
reshape(int width,
int height) |
void |
setHeight(int height) |
void |
setStartIndex(int startIndex) |
void |
setStride(int stride) |
abstract void |
setTo(T orig)
Sets the value of 'this' image to be identical to the passed in image.
|
void |
setWidth(int width) |
abstract T |
subimage(int x0,
int y0,
int x1,
int y1) |
public int startIndex
public int stride
public int width
public int height
public abstract T subimage(int x0, int y0, int x1, int y1)
public abstract void reshape(int width, int height)
public abstract void setTo(T orig)
orig
- Image for which 'this' is to be a copy of.public boolean isSubimage()
public final boolean isInBounds(int x, int y)
public int getIndex(int x, int y)
public final int getWidth()
public final void setWidth(int width)
public final int getHeight()
public final void setHeight(int height)
public int getStartIndex()
public void setStartIndex(int startIndex)
public int getStride()
public void setStride(int stride)
public Point2D_I32 indexToPixel(int index)
public abstract T _createNew(int imgWidth, int imgHeight)
imgWidth
- imgHeight
- Copyright © 2011-2012 Peter Abeles