|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.vistech.roi.ROIUtil
A utility class that provides several static methods for computing ROI-related data.
Constructor Summary | |
ROIUtil()
|
Method Summary | |
static double[][] |
computeStats(int[][] pixel)
Computes different types of statistics from an array of pixel values. |
static double |
computeStdDev(int[] data,
double mean)
Computes standard deviation. |
static java.awt.Point[] |
getBoundaryPoints(java.awt.Shape shape,
int viewerWid,
int viewerHt)
Returns all the positions of pixels that lie on the boundary of a specified shape. |
static int[][] |
getPixelSamples(java.awt.image.BufferedImage img)
Returns the values of the pixel samples of the entire image in a two dimensional array in which the the first dimension represents the sample index, and the second dimension represents the the sample value. |
static int[][] |
getPixelSamples(java.awt.image.SampleModel sm,
java.awt.image.DataBuffer db,
java.awt.Dimension imageSize)
Returns the values of the pixel samples of the entire image in a two dimensional array in which the the first dimension represents the sample index, and the second dimension represents the the sample value. |
static int[][] |
getROIPixelSamples(java.awt.image.BufferedImage img,
java.awt.geom.Point2D[] points)
Returns the values of the pixel samples from specified positions in a two dimensional array in which the the first dimension represents the sample index, and the second dimension represents the the sample value. |
static int[][] |
getROIPixelSamples(java.awt.image.BufferedImage img,
java.awt.Shape shape)
Returns the values of the pixel samples within a specified shape in a two dimensional array in which the the first dimension represents the sample index, and the second dimension represents the the sample value. |
static int[][] |
getROIPixelSamples(java.awt.image.SampleModel sm,
java.awt.image.DataBuffer db,
java.awt.geom.Point2D[] points)
Returns the values of the pixel samples from specified positions in a two dimensional array in which the the first dimension represents the sample index, and the second dimension represents the the sample value. |
static int[][] |
getROIPixelSamples(java.awt.image.SampleModel sm,
java.awt.image.DataBuffer db,
java.awt.Shape shape)
Returns the values of the pixel samples within a specified shape in a two dimensional array in which the the first dimension represents the sample index, and the second dimension represents the the sample value. |
static java.awt.Point[] |
getROIPoints(java.awt.image.BufferedImage img,
java.awt.Shape shape)
Returns all the positions of pixels within a specified shape. |
static double[][] |
getROIStats(java.awt.image.BufferedImage img,
java.awt.geom.Point2D[] points)
Returns ROI statistics of all the pixel samples in a two dimensional array. |
static double[][] |
getROIStats(java.awt.image.BufferedImage img,
java.awt.Shape shape)
Returns ROI statistics o all the pixel samples in a two dimensional array. |
static double[][] |
getROIStats(java.awt.image.SampleModel sm,
java.awt.image.DataBuffer db,
java.awt.geom.Point2D[] points)
Returns ROI statistics for all the pixel samples in a two dimensional array. |
static double[][] |
getROIStats(java.awt.image.SampleModel sm,
java.awt.image.DataBuffer db,
java.awt.Shape shape)
Returns ROI statistics for all the pixel samples in a two dimensional array. |
static java.awt.Point[] |
getThresholdPoints(java.awt.image.BufferedImage img,
java.awt.Shape shape,
int threshold)
Returns the positions of pixels within a specified shape that are above the specified threshold. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ROIUtil()
Method Detail |
public static double[][] getROIStats(java.awt.image.BufferedImage img, java.awt.geom.Point2D[] points)
img
- the image from which statistics are computed.points
- an array of positions of pixels, values of which are used
for computing statistics.public static double[][] getROIStats(java.awt.image.BufferedImage img, java.awt.Shape shape)
img
- the image from which statistics are computed.shape
- the shape drawn over image. Pixels that lie inside this shape are used
for computing statistics.public static double[][] getROIStats(java.awt.image.SampleModel sm, java.awt.image.DataBuffer db, java.awt.geom.Point2D[] points)
sm
- the sample model of the image.db
- the data buffer object that contains the image data.points
- an array of positions of pixels, values of which are used
for computing statistics.public static double[][] getROIStats(java.awt.image.SampleModel sm, java.awt.image.DataBuffer db, java.awt.Shape shape)
sm
- the sample model of the image.db
- the data buffer object that contains the image data.shape
- the shape drawn over image. Pixels that lie inside this shape are used
for computing statistics.public static double[][] computeStats(int[][] pixel)
pixel
- two dimesional array of pixel values. The first dimension represents the
index of the sample and the second dimension the sample valus.public static double computeStdDev(int[] data, double mean)
data
- an array of values for which the standard deviation is computed.mean
- mean of the data values.public static int[][] getPixelSamples(java.awt.image.BufferedImage img)
img
- the image.public static int[][] getPixelSamples(java.awt.image.SampleModel sm, java.awt.image.DataBuffer db, java.awt.Dimension imageSize)
sm
- the sample model of the image.db
- the data buffer object that contains the image data.imageSize
- the image size.public static int[][] getROIPixelSamples(java.awt.image.BufferedImage img, java.awt.geom.Point2D[] points)
img
- the image from which the pixels values are retrieved.points
- an array of pixel positions.public static int[][] getROIPixelSamples(java.awt.image.SampleModel sm, java.awt.image.DataBuffer db, java.awt.geom.Point2D[] points)
sm
- the sample model of the image.db
- the data buffer object that contains the image data.points
- an array of pixel positions.public static int[][] getROIPixelSamples(java.awt.image.BufferedImage img, java.awt.Shape shape)
img
- the image from which the pixels values are retrieved.shape
- the shape drawn over image. Pixels that lie inside this shape are returned.public static int[][] getROIPixelSamples(java.awt.image.SampleModel sm, java.awt.image.DataBuffer db, java.awt.Shape shape)
sm
- the sample model of the image.db
- the data buffer object that contains the image data.shape
- the shape drawn over image. Pixels that lie inside this shape are returned.public static java.awt.Point[] getThresholdPoints(java.awt.image.BufferedImage img, java.awt.Shape shape, int threshold)
img
- the image.shape
- the shape drawn over image. Thresholded pixels that lie inside this shape are returned.threshold
- the threshold value.public static java.awt.Point[] getROIPoints(java.awt.image.BufferedImage img, java.awt.Shape shape)
img
- the image.shape
- the shape drawn over image. Thresholded pixels that lie inside this shape are returned.threshold
- the threshold value.public static java.awt.Point[] getBoundaryPoints(java.awt.Shape shape, int viewerWid, int viewerHt)
img
- the image.shape
- the shape drawn over image. Thresholded pixels that lie inside this shape are returned.threshold
- the threshold value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |