com.sun.jna.examples
public class RasterRangesUtils extends Object
Nested Class Summary | |
---|---|
static interface | RasterRangesUtils.RangesOutput
Abstraction of a sink for ranges. |
Method Summary | |
---|---|
static boolean | outputOccupiedRanges(Raster raster, RasterRangesUtils.RangesOutput out)
Outputs ranges of occupied pixels.
|
static boolean | outputOccupiedRanges(int[] pixels, int w, int h, int occupationMask, RasterRangesUtils.RangesOutput out)
Output the occupied values of an integer-pixels image as ranges of contiguous values.
|
static boolean | outputOccupiedRangesOfBinaryPixels(byte[] binaryBits, int w, int h, RasterRangesUtils.RangesOutput out)
Output the non-null values of a binary image as ranges of contiguous values. |
Parameters: raster image to be segmented in non black or non-transparent ranges out destination of the non null ranges
Returns: true if the output succeeded, false otherwise
Parameters: pixels integer values of the pixels of an image w width of the image (in pixels) h height of the image occupationMask mask used to select which bits are used in a pixel to check its occupied status. 0xff000000 would only take the alpha layer into account, for instance. out where to output all the contiguous ranges of non occupied pixels
Returns: true if the output succeeded, false otherwise
Parameters: binaryBits byte-packed binary bits of an image w width of the image (in pixels) h height of the image out
Returns: true if the output succeeded, false otherwise