|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object skyview.geometry.Sampler skyview.geometry.sampler.ClipSampler
public class ClipSampler
The class implements a fast flux conserving resampling based on the Sutherland-Hodgman clipping algorithm.
Consider an original image of data in some projection and a new map of an overlapping region with some projection, coordinate system, etc. Assume that the flux within a given pixel in the original image is constant over the area of the pixel. The flux within each pixel in the new map should be the integral of the flux in the region occupied by each pixel in the map.
The instance methods of this class are not thread-safe, however it is possible to generate a separate ClipSampler object for each thread to resample the same input image.
Developed by Tom McGlynn, NASA/GSFC October 3, 2002
Field Summary | |
---|---|
protected double |
drizzArea
Drizzle Area |
protected double |
drizzOffset
Drizzle offset |
Fields inherited from class skyview.geometry.Sampler |
---|
bounds, inDepth, inHeight, inImage, inWidth, outDepth, outHeight, outImage, outWidth, trans |
Constructor Summary | |
---|---|
ClipSampler()
|
Method Summary | |
---|---|
java.lang.String |
getDescription()
Get the description of this component. |
java.lang.String |
getName()
Get the name of this component. |
protected static void |
printVert(int n,
double[] x,
double[] y,
java.lang.String label)
Debugging routine that prints a list of vertices. |
void |
sample(int pix)
Find the value in the input data to put in the output data. |
void |
samplePixel(int pix,
double[] x,
double[] y)
Sample a single map pixel. |
void |
setDrizzle(double drizzle)
Set the drizzle factor for sampling |
void |
setIntensive(boolean intensive)
|
void |
setOutput(Image outImage)
Set the output image for the sampling |
double |
weight()
Return the weight associated with the last sampling. |
Methods inherited from class skyview.geometry.Sampler |
---|
factory, setBounds, setInput, setOrder, setTransform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double drizzOffset
protected double drizzArea
Constructor Detail |
---|
public ClipSampler()
Method Detail |
---|
public void setOutput(Image outImage)
Sampler
setOutput
in class Sampler
public java.lang.String getName()
Component
public java.lang.String getDescription()
Component
public void setIntensive(boolean intensive)
public void setDrizzle(double drizzle)
drizzle
- The drizzle factor should range from 0 to 1 and
indicates the length of the side of the pixel
inside the original image pixel in which the
flux is assumed to be contained.protected static void printVert(int n, double[] x, double[] y, java.lang.String label)
n
- The number of vertices in the polygonx
- X coordinatesy
- Y coordinatespublic void sample(int pix)
Sampler
sample
in class Sampler
pix
- The index into the output array.public double weight()
public void samplePixel(int pix, double[] x, double[] y)
x
- The x values of the corners of the pixel [4]y
- The y values of the corners of the pixel [4]
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |