org.jplot2d.data
Class IntDataBuffer
- java.lang.Object
-
- org.jplot2d.data.ImageDataBuffer
-
- org.jplot2d.data.IntDataBuffer
-
- Direct Known Subclasses:
- IntDataBuffer.Array, IntDataBuffer.Array2D, IntDataBuffer.NioBuffer
public abstract class IntDataBuffer extends ImageDataBuffer
This class extends ImageDataBuffer and stores data internally as integers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classIntDataBuffer.Arraystatic classIntDataBuffer.Array2Dstatic classIntDataBuffer.NioBuffer
-
Constructor Summary
Constructors Constructor and Description IntDataBuffer(ImageMaskBuffer mask)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description double[]calcMinMax(int w, int h)Calculate the min and max value in the given rectangle for this data buffer, and return them in a double array.doublecountValid(int w, int h)Count the number of valid values in the given rectangle for this data buffer.abstract intget(int x, int y)bytegetByte(int x, int y)Returns the sample for the pixel located at (x,y) as a double.doublegetDouble(int x, int y)Returns the sample for the pixel located at (x,y) as a double.floatgetFloat(int x, int y)Returns the sample for the pixel located at (x,y) as a double.intgetInt(int x, int y)Returns the sample for the pixel located at (x,y) as a double.shortgetShort(int x, int y)Returns the sample for the pixel located at (x,y) as a double.-
Methods inherited from class org.jplot2d.data.ImageDataBuffer
hasMasks, isMasked
-
-
-
-
Constructor Detail
-
IntDataBuffer
public IntDataBuffer(ImageMaskBuffer mask)
-
-
Method Detail
-
getByte
public byte getByte(int x, int y)Description copied from class:ImageDataBufferReturns the sample for the pixel located at (x,y) as a double.- Specified by:
getBytein classImageDataBuffer- Parameters:
x- The X coordinate of the pixel locationy- The Y coordinate of the pixel location- Returns:
- the sample for the specified pixel
-
getShort
public short getShort(int x, int y)Description copied from class:ImageDataBufferReturns the sample for the pixel located at (x,y) as a double.- Specified by:
getShortin classImageDataBuffer- Parameters:
x- The X coordinate of the pixel locationy- The Y coordinate of the pixel location- Returns:
- the sample for the specified pixel
-
getInt
public int getInt(int x, int y)Description copied from class:ImageDataBufferReturns the sample for the pixel located at (x,y) as a double.- Specified by:
getIntin classImageDataBuffer- Parameters:
x- The X coordinate of the pixel locationy- The Y coordinate of the pixel location- Returns:
- the sample for the specified pixel
-
getFloat
public float getFloat(int x, int y)Description copied from class:ImageDataBufferReturns the sample for the pixel located at (x,y) as a double.- Specified by:
getFloatin classImageDataBuffer- Parameters:
x- The X coordinate of the pixel locationy- The Y coordinate of the pixel location- Returns:
- the sample for the specified pixel
-
getDouble
public double getDouble(int x, int y)Description copied from class:ImageDataBufferReturns the sample for the pixel located at (x,y) as a double.- Specified by:
getDoublein classImageDataBuffer- Parameters:
x- The X coordinate of the pixel locationy- The Y coordinate of the pixel location- Returns:
- the sample for the specified pixel
-
get
public abstract int get(int x, int y)
-
countValid
public double countValid(int w, int h)Description copied from class:ImageDataBufferCount the number of valid values in the given rectangle for this data buffer. For double and float data, NaN, POSITIVE_INFINITY and NEGATIVE_INFINITY are considered as invalid.- Specified by:
countValidin classImageDataBuffer- Parameters:
w- the width of the given rectangleh- the height of the given rectangle- Returns:
- the number of valid values
-
calcMinMax
public double[] calcMinMax(int w, int h)Description copied from class:ImageDataBufferCalculate the min and max value in the given rectangle for this data buffer, and return them in a double array. For double and float data, NaN, POSITIVE_INFINITY and NEGATIVE_INFINITY are considered as invalid and ignored.- Specified by:
calcMinMaxin classImageDataBuffer- Parameters:
w- the width of the given rectangleh- the height of the given rectangle- Returns:
- the min and max values
-
-
DMelt 3.0 © DataMelt by jWork.ORG