public class Checker extends ImageFinder
Modifier and Type | Field and Description |
---|---|
protected boolean |
checkNaNs
Do we wish to check that the input image does
not have a NaN value?
|
static int |
CONSUMED |
protected boolean |
cornersOnly
Do we want to only check on the corners of the rectangles
and not the edges.
|
protected Transformer |
fromOut
The transformation from the output pixels to the celestial sphere
|
protected boolean[] |
imageUsed
Is a given image used in the transformation
|
protected int[] |
img
The index giving the best image for each pixel
|
protected Image[] |
input
The input images.
|
static int |
NO_COVERAGE |
static int |
NON_PHYSICAL |
protected Image |
output
The output image
|
protected int |
pixelCount |
protected int |
rectCount |
static int |
SPLIT_X |
static int |
SPLIT_XY |
static int |
SPLIT_Y |
protected double[] |
t2
Transformation temporaries
|
protected double[] |
t3 |
static int |
UNCHECKED |
Constructor and Description |
---|
Checker() |
Modifier and Type | Method and Description |
---|---|
protected int |
bestFit(int pix,
boolean[] valid)
Find the best image to use for a given unit vector.
|
protected int |
cornerMatch(int[] corners,
boolean[] valid,
boolean[] newValid)
Check the corners of a rectangle.
|
protected double |
criterion(double mn,
int i) |
protected boolean |
edgeOff(int match,
int p0,
int pe,
int dp,
boolean[] valid)
Check whether all pixels on an edge of a rectangle all have the same best fit image.
|
int[] |
findImages(Image[] input,
Image output)
Find the best image for each output pixel.
|
protected double[] |
getCelest(int pix)
Get the celestial coordinates corresponding to a given pixel.
|
protected double[] |
getImage(Image img,
double[] inp)
Convert an input unit vector to a position in an image.
|
static boolean |
getStatus() |
protected double |
minDist(double x,
double y,
double a,
double b)
Given a point at x,y in an image of size a,b
in the rectangle 0,a 0,b
find the minimum distance to the edge.
|
void |
setStrict(boolean flag)
Set a strict geometry.
|
factory
protected double[] t2
protected double[] t3
protected boolean[] imageUsed
protected Transformer fromOut
protected int pixelCount
protected int rectCount
protected Image output
protected Image[] input
protected boolean checkNaNs
protected boolean cornersOnly
public static final int UNCHECKED
public static final int NO_COVERAGE
public static final int NON_PHYSICAL
public static final int CONSUMED
public static final int SPLIT_X
public static final int SPLIT_Y
public static final int SPLIT_XY
protected int[] img
public static boolean getStatus()
public int[] findImages(Image[] input, Image output)
findImages
in class ImageFinder
input
- An array of images that may be sampled to get the output image.output
- The output image. In this routine we are interested in its
geometry, not its data.public void setStrict(boolean flag)
setStrict
in class ImageFinder
flag
- Do we want strict testsprotected boolean edgeOff(int match, int p0, int pe, int dp, boolean[] valid)
match
- The value each edge is to be compared against.p0
- The first pixel offset to be checked.pe
- The last pixel offset to be checked.dp
- The spacing between pixels (either 1 or the number of pixels in a row).valid
- Should we consider this image?valid
- If we recurse should be consider this image?protected int cornerMatch(int[] corners, boolean[] valid, boolean[] newValid)
corners
- The corners of the rectangle. It is assumed that
there are four elements in corners, and they are
in the order p00, p01, p10, p11valid
- The images to be checked at the current level of recursion.newValid
- The images to be checked at the next level of recursion.
This routine will look at the corners of the
image in relation to the bounds of the valid images to
decide which images to search at a future level of recursion.protected double[] getCelest(int pix)
pix
- The pixel index.protected double minDist(double x, double y, double a, double b)
protected double[] getImage(Image img, double[] inp)
img
- The image we are transforming into the plane of.inp
- The input unit celestial coordinate unit vector.protected int bestFit(int pix, boolean[] valid)
pix
- The output pixel we are testing (pix = x + width*y)valid
- Should we test this imageprotected double criterion(double mn, int i)