public class View
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ij.process.ImageProcessor |
image |
protected int |
xoffset |
protected int |
yoffset |
Constructor and Description |
---|
View(ij.process.ImageProcessor image,
int x,
int y)
This creates a new view of the given image.
|
Modifier and Type | Method and Description |
---|---|
int |
getCornerX()
returns the image x coordinate of the upper left corner of the view
|
int |
getCornerY()
returns the image y coordinate of the upper left corner of the view
|
ij.process.ImageProcessor |
getImage()
This returns the image that this is a view of.
|
int[] |
getSample(int x,
int y,
int[] out)
This fetches the RGB values from the given view coordinates.
|
protected int |
imageX(int x) |
protected int |
imageY(int y) |
boolean |
isAtLeftEdge()
returns true iff getCornerX() == 0
|
boolean |
isAtTopEdge()
returns true iff getCornerY() == 0
|
void |
putSample(int x,
int y,
int[] newvals)
This sets the RGB sample at the given view coordinates.
|
void |
setCorner(int x,
int y)
This moves the view to the specified position.
|
protected final ij.process.ImageProcessor image
protected int xoffset
protected int yoffset
public View(ij.process.ImageProcessor image, int x, int y)
image
- This is the image to view.x
- This is the x coord of the upper left corner of the view in image's pixel
coordinates.y
- This is the x coord of the upper left corner of the view in image's pixel
coordinates.public void setCorner(int x, int y)
public int getCornerX()
public int getCornerY()
public boolean isAtLeftEdge()
public boolean isAtTopEdge()
public int[] getSample(int x, int y, int[] out)
public void putSample(int x, int y, int[] newvals)
public ij.process.ImageProcessor getImage()
protected int imageX(int x)
protected int imageY(int y)