public class Patch extends View
Constructor and Description |
---|
Patch(ij.process.ImageProcessor image,
int x,
int y,
int width,
int height)
This makes a patch based on the given dimensions and view parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight() |
int[] |
getSample(int x,
int y,
int[] out)
Bounds checks the input to make sure it is part of the patch and then gets the sample from
the view.
|
int |
getWidth() |
int |
getXOffset() |
int |
getYOffset() |
boolean |
nextColumn(int overlap)
This moves the patch to the right in this row of patches if able.
|
boolean |
nextPixelRow()
This moves the patch one pixel down and all the way to the left.
|
boolean |
nextRow(int overlap)
This moves the patch to the left side of the image and down by height-overlap.
|
void |
putSample(int x,
int y,
int[] values)
Bounds checks the input to make sure it is part of the patch and then puts the sample into
the view.
|
boolean |
rightOnePixel()
This moves the patch one pixel to the right if able.
|
void |
setCorner(int x,
int y)
This moves the patch to have the upper left corner at (x,y) in image coordinates.
|
java.lang.String |
toString()
returns a string with the corner, width, and height listed
|
getCornerX, getCornerY, getImage, imageX, imageY, isAtLeftEdge, isAtTopEdge
public Patch(ij.process.ImageProcessor image, int x, int y, int width, int height)
public void setCorner(int x, int y)
public int getWidth()
public int getHeight()
public int[] getSample(int x, int y, int[] out)
public void putSample(int x, int y, int[] values)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean rightOnePixel()
public boolean nextPixelRow()
public boolean nextRow(int overlap)
public boolean nextColumn(int overlap)
public int getXOffset()
public int getYOffset()