|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Image
Image functionality. Images are opaque objects and hide implementation details (especially storage layout or actual pixel representation). Images provide way to iterate over it (thus, they are statefull and NOT thread safe), and retrieve and set current pixel. Convenience methods to set given pixels are provided, but iterating methods shall be used for high performance bulk operations
| Method Summary | |
|---|---|
Image |
chisel(int fromX,
int fromY,
int width,
int height)
chisel out sub-image out of original one. |
Image |
column(int x)
full column out of image |
void |
copy(Image dst)
copy image content to another image |
void |
flip(Image dst)
copy image swithcing axes in process |
int |
get()
retrieve pixekl at current position, does not modify current image pointer |
int |
get(int x,
int y)
retrieve value of pixel in image specific fashion |
float |
getAspectRatio()
aspect ration of this image TODO: do we actually need this? |
int |
getHeight()
|
int |
getOriginX()
|
int |
getOriginY()
|
int |
getWidth()
|
boolean |
hasNext()
whether next pixel is available |
boolean |
horizontalSpanEquals(int y,
int from,
int to,
int value)
Deprecated. use iterator instead |
void |
iterateH(int y)
convenience method to initialize iterator over whole image row |
void |
iterateH(int y,
int from,
int to)
initialize iterator over part of row |
void |
iterateV(int x)
convenience method to initialize iterator over whole image column |
void |
iterateV(int x,
int from,
int to)
initialize iterator over part of column |
int |
next()
advance and retrieve next available pixel |
void |
next(int pixel)
store and advance to next pixel |
void |
put(int value)
store pixel at current position, does not modify current image pointer |
void |
put(int x,
int y,
int value)
store pixel at specified position |
Image |
row(int y)
full row out of image |
boolean |
verticalSpanEquals(int x,
int from,
int to,
int value)
Deprecated. use iterators instead |
| Method Detail |
|---|
int get(int x,
int y)
x - y -
void put(int x,
int y,
int value)
x - y - value - int get()
void put(int value)
value -
boolean horizontalSpanEquals(int y,
int from,
int to,
int value)
y - Y valuefrom - inclusive fromto - inclusive tovalue -
boolean verticalSpanEquals(int x,
int from,
int to,
int value)
x - X Valuefrom - inclusive fromto - inclusive tovalue -
int getWidth()
int getHeight()
int getOriginX()
int getOriginY()
void iterateH(int y)
void iterateH(int y,
int from,
int to)
from - from positionto - to positionvoid iterateV(int x)
void iterateV(int x,
int from,
int to)
from - to - int next()
void next(int pixel)
boolean hasNext()
void copy(Image dst)
dst - destination imagevoid flip(Image dst)
dst - destination image
Image chisel(int fromX,
int fromY,
int width,
int height)
fromX - subimage origin XfromY - subimage origin Ywidth - subimage widthheight - subimage height
Image row(int y)
y - coordinate
Image column(int x)
x - coordinate
float getAspectRatio()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||