Package skyview.data
Class Contourer
- java.lang.Object
-
- skyview.data.Contourer
-
public class Contourer extends java.lang.ObjectFind contours of an image.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classContourer.CSqrt
-
Constructor Summary
Constructors Constructor Description Contourer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]contour()Return a map of simple contours.booleangetData(java.lang.String survey)Get the data for the contourerdouble[]getRange()voidputImage(Image img)voidsetFunction(java.lang.String funcName)Set the transformation to be done on the input image before finding contour regions.voidsetLimits(double min, double max, int n)voidsetLimits(double min, double max, int n, double fraction)Set up the limits for the contouring.
-
-
-
Method Detail
-
setLimits
public void setLimits(double min, double max, int n)
-
setLimits
public void setLimits(double min, double max, int n, double fraction)Set up the limits for the contouring. Note that if logarithmic contours are desired, then the limits should be the common logs of the limits. E.g., if you want to do 5 intervals with the first at 1 and the last at 100, then enter limits of 0 and 2.
-
putImage
public void putImage(Image img)
-
getData
public boolean getData(java.lang.String survey)
Get the data for the contourer
-
getRange
public double[] getRange()
-
setFunction
public void setFunction(java.lang.String funcName)
Set the transformation to be done on the input image before finding contour regions.- Parameters:
funcName- The string "sqrt" or "log" Note that log implies common logarithms.
-
contour
public int[] contour()
Return a map of simple contours. The contour value for each pixel in the image is computed. When two adjacent pixels are in different contour regions a contour is drawn in the pixel whose value is closest to the contour value.- Returns:
- An integer array which gives the contour that should be drawn on any given pixel.
-
-