|
JNA API> 4.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.jna.platform.RasterRangesUtils
public class RasterRangesUtils
Methods that are useful to decompose a raster into a set of rectangles. An occupied pixel has two possible meanings, depending on the raster :
Nested Class Summary | |
---|---|
static interface |
RasterRangesUtils.RangesOutput
Abstraction of a sink for ranges. |
Constructor Summary | |
---|---|
RasterRangesUtils()
|
Method Summary | |
---|---|
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 |
outputOccupiedRanges(Raster raster,
RasterRangesUtils.RangesOutput out)
Outputs ranges of occupied pixels. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RasterRangesUtils()
Method Detail |
---|
public static boolean outputOccupiedRanges(Raster raster, RasterRangesUtils.RangesOutput out)
raster
- image to be segmented in non black or non-transparent rangesout
- destination of the non null ranges
public static boolean outputOccupiedRangesOfBinaryPixels(byte[] binaryBits, int w, int h, RasterRangesUtils.RangesOutput out)
binaryBits
- byte-packed binary bits of an imagew
- width of the image (in pixels)h
- height of the imageout
-
public static boolean outputOccupiedRanges(int[] pixels, int w, int h, int occupationMask, RasterRangesUtils.RangesOutput out)
pixels
- integer values of the pixels of an imagew
- width of the image (in pixels)h
- height of the imageoccupationMask
- 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
|
JNA API> 4.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |