public class RecursiveImageFinder
- extends ImageFinder
This class finds the best images to be used for sampling using
a recursive rectangle algorithm.
- The output image is sampled in a rectangular grid with
the samples spaced no more than half the image size of the
- For each primary rectangle, the best image of any of the candidate
input images for each corner pixel in the rectangle is determined.
- If the output pixel does not deproject to the celestial
sphere (e.g., it may be from an Aitoff projection outside
of the region representing data), then the pixel is marked
as not physical and no checking against the input images is performed.
- The corner is projected into each candidate image.
- If the corner is within the candidate image, this
candidate is marked as a candidate if another level
of recursion is needed.
- If the distance from the corner to any of the edges
is greater than for any previous input image, then
this image is considered the best candidate so far.
- After all candidate input images are considered the
best candidate is returned, or the pixel is marked
as not being available on any input image if the output
pixel did not project to the interior of any image.
- If all four corners of a rectangle project to the same image
(or if all four are non-physical, or not present on an input image),
then this value is copied to all pixels within the rectangle.
- Otherwise, if the rectangle can be split then it is split
into subrectangles and the check is performed on the sub-rectangles.
- Whenever a best image for a pixel is determined, that result
is saved, so that only the 'new' corners in rectangles need to
- When checking the split rectangles, only images that overlapped
at least one of the four corners in the previous level are considered.
Find the best image for each output pixel.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public int findImages(Image input,
- Find the best image for each output pixel.
- Specified by:
findImages in class
input - An array of images from which the output image is to
output - An output image to be generated from the input. This
method does not change the output image.
- An index array which for each pixel in the output image
gives the best image to sample. Note that this has dimension
int[nx*ny] where nx changes most rapidly. The values of the index
array can be:
- >= 0: The pixel is best indexed with the given image.
- -1: [internal] The best image for this pixel has not yet been determined.
- -2: This pixel is not on any of the input images.
- -3: This pixel does not represent a physical coordinate.
- -4: [in other methods] this pixel has already been processed.