|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.image.SampleModel
public abstract class SampleModel
This abstract class defines an interface for extracting samples of pixels in an image. All image data is expressed as a collection of pixels. Each pixel consists of a number of samples. A sample is a datum for one band of an image and a band consists of all samples of a particular type in an image. For example, a pixel might contain three samples representing its red, green and blue components. There are three bands in the image containing this pixel. One band consists of all the red samples from all pixels in the image. The second band consists of all the green samples and the remaining band consists of all of the blue samples. The pixel can be stored in various formats. For example, all samples from a particular band can be stored contiguously or all samples from a single pixel can be stored contiguously.
Subclasses of SampleModel specify the types of samples they can represent (e.g. unsigned 8-bit byte, signed 16-bit short, etc.) and may specify how the samples are organized in memory. In the Java 2D(tm) API, built-in image processing operators may not operate on all possible sample types, but generally will work for unsigned integral samples of 16 bits or less. Some operators support a wider variety of sample types.
A collection of pixels is represented as a Raster, which consists of a DataBuffer and a SampleModel. The SampleModel allows access to samples in the DataBuffer and may provide low-level information that a programmer can use to directly manipulate samples and pixels in the DataBuffer.
This class is generally a fall back method for dealing with images. More efficient code will cast the SampleModel to the appropriate subclass and extract the information needed to directly manipulate pixels in the DataBuffer.
DataBuffer
,
Raster
,
ComponentSampleModel
,
PixelInterleavedSampleModel
,
BandedSampleModel
,
MultiPixelPackedSampleModel
,
SinglePixelPackedSampleModel
| Field Summary | |
|---|---|
protected int |
dataType
Data type of the DataBuffer storing the pixel data. |
protected int |
height
Height in pixels of the region of image data that this SampleModel describes. |
protected int |
numBands
Number of bands of the image data that this SampleModel describes. |
protected int |
width
Width in pixels of the region of image data that this SampleModel describes. |
| Constructor Summary | |
|---|---|
SampleModel(int dataType,
int w,
int h,
int numBands)
Constructs a SampleModel with the specified parameters. |
| Method Summary | |
|---|---|
abstract SampleModel |
createCompatibleSampleModel(int w,
int h)
Creates a SampleModel which describes data in this SampleModel's format, but with a different width and height. |
abstract DataBuffer |
createDataBuffer()
Creates a DataBuffer that corresponds to this SampleModel. |
abstract SampleModel |
createSubsetSampleModel(int[] bands)
Creates a new SampleModel with a subset of the bands of this SampleModel. |
Object |
getDataElements(int x,
int y,
int w,
int h,
Object obj,
DataBuffer data)
Returns the pixel data for the specified rectangle of pixels in a primitive array of type TransferType. |
abstract Object |
getDataElements(int x,
int y,
Object obj,
DataBuffer data)
Returns data for a single pixel in a primitive array of type TransferType. |
int |
getDataType()
Returns the data type of the DataBuffer storing the pixel data. |
int |
getHeight()
Returns the height in pixels. |
int |
getNumBands()
Returns the total number of bands of image data. |
abstract int |
getNumDataElements()
Returns the number of data elements needed to transfer a pixel via the getDataElements and setDataElements methods. |
double[] |
getPixel(int x,
int y,
double[] dArray,
DataBuffer data)
Returns the samples for the specified pixel in an array of double. |
float[] |
getPixel(int x,
int y,
float[] fArray,
DataBuffer data)
Returns the samples for the specified pixel in an array of float. |
int[] |
getPixel(int x,
int y,
int[] iArray,
DataBuffer data)
Returns the samples for a specified pixel in an int array, one sample per array element. |
double[] |
getPixels(int x,
int y,
int w,
int h,
double[] dArray,
DataBuffer data)
Returns all samples for a rectangle of pixels in a double array, one sample per array element. |
float[] |
getPixels(int x,
int y,
int w,
int h,
float[] fArray,
DataBuffer data)
Returns all samples for a rectangle of pixels in a float array, one sample per array element. |
int[] |
getPixels(int x,
int y,
int w,
int h,
int[] iArray,
DataBuffer data)
Returns all samples for a rectangle of pixels in an int array, one sample per array element. |
abstract int |
getSample(int x,
int y,
int b,
DataBuffer data)
Returns the sample in a specified band for the pixel located at (x,y) as an int. |
double |
getSampleDouble(int x,
int y,
int b,
DataBuffer data)
Returns the sample in a specified band for a pixel located at (x,y) as a double. |
float |
getSampleFloat(int x,
int y,
int b,
DataBuffer data)
Returns the sample in a specified band for the pixel located at (x,y) as a float. |
double[] |
getSamples(int x,
int y,
int w,
int h,
int b,
double[] dArray,
DataBuffer data)
Returns the samples for a specified band for a specified rectangle of pixels in a double array, one sample per array element. |
float[] |
getSamples(int x,
int y,
int w,
int h,
int b,
float[] fArray,
DataBuffer data)
Returns the samples for a specified band for the specified rectangle of pixels in a float array, one sample per array element. |
int[] |
getSamples(int x,
int y,
int w,
int h,
int b,
int[] iArray,
DataBuffer data)
Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element. |
abstract int[] |
getSampleSize()
Returns the size in bits of samples for all bands. |
abstract int |
getSampleSize(int band)
Returns the size in bits of samples for the specified band. |
int |
getTransferType()
Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods. |
int |
getWidth()
Returns the width in pixels. |
void |
setDataElements(int x,
int y,
int w,
int h,
Object obj,
DataBuffer data)
Sets the data for a rectangle of pixels in the specified DataBuffer from a primitive array of type TransferType. |
abstract void |
setDataElements(int x,
int y,
Object obj,
DataBuffer data)
Sets the data for a single pixel in the specified DataBuffer from a primitive array of type TransferType. |
void |
setPixel(int x,
int y,
double[] dArray,
DataBuffer data)
Sets a pixel in the DataBuffer using a double array of samples for input. |
void |
setPixel(int x,
int y,
float[] fArray,
DataBuffer data)
Sets a pixel in the DataBuffer using a float array of samples for input. |
void |
setPixel(int x,
int y,
int[] iArray,
DataBuffer data)
Sets a pixel in the DataBuffer using an int array of samples for input. |
void |
setPixels(int x,
int y,
int w,
int h,
double[] dArray,
DataBuffer data)
Sets all samples for a rectangle of pixels from a double array containing one sample per array element. |
void |
setPixels(int x,
int y,
int w,
int h,
float[] fArray,
DataBuffer data)
Sets all samples for a rectangle of pixels from a float array containing one sample per array element. |
void |
setPixels(int x,
int y,
int w,
int h,
int[] iArray,
DataBuffer data)
Sets all samples for a rectangle of pixels from an int array containing one sample per array element. |
void |
setSample(int x,
int y,
int b,
double s,
DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a double for input. |
void |
setSample(int x,
int y,
int b,
float s,
DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using a float for input. |
abstract void |
setSample(int x,
int y,
int b,
int s,
DataBuffer data)
Sets a sample in the specified band for the pixel located at (x,y) in the DataBuffer using an int for input. |
void |
setSamples(int x,
int y,
int w,
int h,
int b,
double[] dArray,
DataBuffer data)
Sets the samples in the specified band for the specified rectangle of pixels from a double array containing one sample per array element. |
void |
setSamples(int x,
int y,
int w,
int h,
int b,
float[] fArray,
DataBuffer data)
Sets the samples in the specified band for the specified rectangle of pixels from a float array containing one sample per array element. |
void |
setSamples(int x,
int y,
int w,
int h,
int b,
int[] iArray,
DataBuffer data)
Sets the samples in the specified band for the specified rectangle of pixels from an int array containing one sample per array element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int width
protected int height
protected int numBands
protected int dataType
DataBuffer
| Constructor Detail |
|---|
public SampleModel(int dataType, int w, int h, int numBands)
dataType
- The data type of the DataBuffer storing the pixel data.w
- The width (in pixels) of the region of image data.h
- The height (in pixels) of the region of image data.numBands
- The number of bands of the image data.
IllegalArgumentException
- if w
or h
is not greater than 0
IllegalArgumentException
- if the product of w
and h
is greater than
Integer.MAX_VALUE
IllegalArgumentException
- if dataType
is not
one of the supported data types| Method Detail |
|---|
public final int getWidth()
SampleModel
describes.public final int getHeight()
SampleModel
describes.public final int getNumBands()
SampleModel
describes.public abstract int getNumDataElements()
getDataElements(int, int, Object, DataBuffer)
,
getDataElements(int, int, int, int, Object, DataBuffer)
,
setDataElements(int, int, Object, DataBuffer)
,
setDataElements(int, int, int, int, Object, DataBuffer)
,
getTransferType()
public final int getDataType()
public int getTransferType()
getDataElements(int, int, Object, DataBuffer)
,
getDataElements(int, int, int, int, Object, DataBuffer)
,
setDataElements(int, int, Object, DataBuffer)
,
setDataElements(int, int, int, int, Object, DataBuffer)
,
getNumDataElements()
,
DataBuffer
public int[] getPixel(int x, int y, int[] iArray, DataBuffer data)
x, y
- The coordinates of the pixel locationiArray
- If non-null, returns the samples in this arraydata
- The DataBuffer containing the image data
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if iArray is too small to hold the output.setPixel(int, int, int[], DataBuffer)
public abstract Object getDataElements(int x, int y, Object obj, DataBuffer data)
The following code illustrates transferring data for one pixel from
DataBuffer db1
, whose storage layout is described by
SampleModel sm1
, to DataBuffer db2
, whose
storage layout is described by SampleModel sm2
.
The transfer will generally be more efficient than using
getPixel/setPixel.
SampleModel sm1, sm2; DataBuffer db1, db2; sm2.setDataElements(x, y, sm1.getDataElements(x, y, null, db1), db2);Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.
If obj is non-null, it should be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is non-null and is not large enough to hold the pixel data.
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.obj
- If non-null, a primitive array in which to return
the pixel data.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if obj is too small to hold the output.getNumDataElements()
,
getTransferType()
,
DataBuffer
,
setDataElements(int, int, Object, DataBuffer)
public Object getDataElements(int x, int y, int w, int h, Object obj, DataBuffer data)
The following code illustrates transferring data for a rectangular
region of pixels from
DataBuffer db1
, whose storage layout is described by
SampleModel sm1
, to DataBuffer db2
, whose
storage layout is described by SampleModel sm2
.
The transfer will generally be more efficient than using
getPixels/setPixels.
SampleModel sm1, sm2; DataBuffer db1, db2; sm2.setDataElements(x, y, w, h, sm1.getDataElements(x, y, w, h, null, db1), db2);Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.
If obj is non-null, it should be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is non-null and is not large enough to hold the pixel data.
x
- The minimum X coordinate of the pixel rectangle.y
- The minimum Y coordinate of the pixel rectangle.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.obj
- If non-null, a primitive array in which to return
the pixel data.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if obj is too small to hold the output.getNumDataElements()
,
getTransferType()
,
setDataElements(int, int, int, int, Object, DataBuffer)
,
DataBuffer
public abstract void setDataElements(int x, int y, Object obj, DataBuffer data)
The following code illustrates transferring data for one pixel from
DataBuffer db1
, whose storage layout is described by
SampleModel sm1
, to DataBuffer db2
, whose
storage layout is described by SampleModel sm2
.
The transfer will generally be more efficient than using
getPixel/setPixel.
SampleModel sm1, sm2; DataBuffer db1, db2; sm2.setDataElements(x, y, sm1.getDataElements(x, y, null, db1), db2);Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.
obj must be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is not large enough to hold the pixel data.
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.obj
- A primitive array containing pixel data.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if obj is too small to hold the input.getNumDataElements()
,
getTransferType()
,
getDataElements(int, int, Object, DataBuffer)
,
DataBuffer
public void setDataElements(int x, int y, int w, int h, Object obj, DataBuffer data)
The following code illustrates transferring data for a rectangular
region of pixels from
DataBuffer db1
, whose storage layout is described by
SampleModel sm1
, to DataBuffer db2
, whose
storage layout is described by SampleModel sm2
.
The transfer will generally be more efficient than using
getPixels/setPixels.
SampleModel sm1, sm2; DataBuffer db1, db2; sm2.setDataElements(x, y, w, h, sm1.getDataElements(x, y, w, h, null, db1), db2);Using getDataElements/setDataElements to transfer between two DataBuffer/SampleModel pairs is legitimate if the SampleModels have the same number of bands, corresponding bands have the same number of bits per sample, and the TransferTypes are the same.
obj must be a primitive array of type TransferType. Otherwise, a ClassCastException is thrown. An ArrayIndexOutOfBoundsException may be thrown if the coordinates are not in bounds, or if obj is not large enough to hold the pixel data.
x
- The minimum X coordinate of the pixel rectangle.y
- The minimum Y coordinate of the pixel rectangle.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.obj
- A primitive array containing pixel data.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if obj is too small to hold the input.getNumDataElements()
,
getTransferType()
,
getDataElements(int, int, int, int, Object, DataBuffer)
,
DataBuffer
public float[] getPixel(int x, int y, float[] fArray, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.fArray
- If non-null, returns the samples in this array.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if fArray is too small to hold the output.setPixel(int, int, float[], DataBuffer)
public double[] getPixel(int x, int y, double[] dArray, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.dArray
- If non-null, returns the samples in this array.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if dArray is too small to hold the output.setPixel(int, int, double[], DataBuffer)
public int[] getPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.iArray
- If non-null, returns the samples in this array.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if iArray is too small to hold the output.setPixels(int, int, int, int, int[], DataBuffer)
public float[] getPixels(int x, int y, int w, int h, float[] fArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.fArray
- If non-null, returns the samples in this array.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if fArray is too small to hold the output.setPixels(int, int, int, int, float[], DataBuffer)
public double[] getPixels(int x, int y, int w, int h, double[] dArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.dArray
- If non-null, returns the samples in this array.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if dArray is too small to hold the output.setPixels(int, int, int, int, double[], DataBuffer)
public abstract int getSample(int x, int y, int b, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.b
- The band to return.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds.setSample(int, int, int, int, DataBuffer)
public float getSampleFloat(int x, int y, int b, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.b
- The band to return.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds.public double getSampleDouble(int x, int y, int b, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.b
- The band to return.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds.public int[] getSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.b
- The band to return.iArray
- If non-null, returns the samples in this array.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds, or if iArray is too small to
hold the output.setSamples(int, int, int, int, int, int[], DataBuffer)
public float[] getSamples(int x, int y, int w, int h, int b, float[] fArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.b
- The band to return.fArray
- If non-null, returns the samples in this array.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds, or if fArray is too small to
hold the output.setSamples(int, int, int, int, int, float[], DataBuffer)
public double[] getSamples(int x, int y, int w, int h, int b, double[] dArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.b
- The band to return.dArray
- If non-null, returns the samples in this array.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds, or if dArray is too small to
hold the output.setSamples(int, int, int, int, int, double[], DataBuffer)
public void setPixel(int x, int y, int[] iArray, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.iArray
- The input samples in an int array.data
- The DataBuffer containing the image data.
NullPointerException
- if iArray or data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if iArray is too small to hold the input.getPixel(int, int, int[], DataBuffer)
public void setPixel(int x, int y, float[] fArray, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.fArray
- The input samples in a float array.data
- The DataBuffer containing the image data.
NullPointerException
- if fArray or data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if fArray is too small to hold the input.getPixel(int, int, float[], DataBuffer)
public void setPixel(int x, int y, double[] dArray, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.dArray
- The input samples in a double array.data
- The DataBuffer containing the image data.
NullPointerException
- if dArray or data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if fArray is too small to hold the input.getPixel(int, int, double[], DataBuffer)
public void setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.iArray
- The input samples in an int array.data
- The DataBuffer containing the image data.
NullPointerException
- if iArray or data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if iArray is too small to hold the input.getPixels(int, int, int, int, int[], DataBuffer)
public void setPixels(int x, int y, int w, int h, float[] fArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.fArray
- The input samples in a float array.data
- The DataBuffer containing the image data.
NullPointerException
- if fArray or data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if fArray is too small to hold the input.getPixels(int, int, int, int, float[], DataBuffer)
public void setPixels(int x, int y, int w, int h, double[] dArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.dArray
- The input samples in a double array.data
- The DataBuffer containing the image data.
NullPointerException
- if dArray or data is null.
ArrayIndexOutOfBoundsException
- if the coordinates are
not in bounds, or if dArray is too small to hold the input.getPixels(int, int, int, int, double[], DataBuffer)
public abstract void setSample(int x, int y, int b, int s, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.b
- The band to set.s
- The input sample as an int.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds.getSample(int, int, int, DataBuffer)
public void setSample(int x, int y, int b, float s, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.b
- The band to set.s
- The input sample as a float.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds.getSample(int, int, int, DataBuffer)
public void setSample(int x, int y, int b, double s, DataBuffer data)
x
- The X coordinate of the pixel location.y
- The Y coordinate of the pixel location.b
- The band to set.s
- The input sample as a double.data
- The DataBuffer containing the image data.
NullPointerException
- if data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds.getSample(int, int, int, DataBuffer)
public void setSamples(int x, int y, int w, int h, int b, int[] iArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.b
- The band to set.iArray
- The input samples in an int array.data
- The DataBuffer containing the image data.
NullPointerException
- if iArray or data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds, or if iArray is too small to
hold the input.getSamples(int, int, int, int, int, int[], DataBuffer)
public void setSamples(int x, int y, int w, int h, int b, float[] fArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.b
- The band to set.fArray
- The input samples in a float array.data
- The DataBuffer containing the image data.
NullPointerException
- if fArray or data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds, or if fArray is too small to
hold the input.getSamples(int, int, int, int, int, float[], DataBuffer)
public void setSamples(int x, int y, int w, int h, int b, double[] dArray, DataBuffer data)
x
- The X coordinate of the upper left pixel location.y
- The Y coordinate of the upper left pixel location.w
- The width of the pixel rectangle.h
- The height of the pixel rectangle.b
- The band to set.dArray
- The input samples in a double array.data
- The DataBuffer containing the image data.
NullPointerException
- if dArray or data is null.
ArrayIndexOutOfBoundsException
- if the coordinates or
the band index are not in bounds, or if dArray is too small to
hold the input.getSamples(int, int, int, int, int, double[], DataBuffer)
public abstract SampleModel createCompatibleSampleModel(int w, int h)
w
- the width of the image datah
- the height of the image data
SampleModel
describing the same image
data as this SampleModel
, but with a
different size.public abstract SampleModel createSubsetSampleModel(int[] bands)
bands
- the subset of bands of this SampleModel
SampleModel
with a subset of bands of this
SampleModel
.public abstract DataBuffer createDataBuffer()
DataBuffer
corresponding to this
SampleModel
.public abstract int[] getSampleSize()
public abstract int getSampleSize(int band)
band
- the specified band
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


alchemic_pinyin
中文汉字转拼音 >Inspired by chinese_pinyin.
Installation
- Add pinyin to your list of dependencies in
mix.exs
:
def deps do
[{:alchemic_pinyin, "~> 0.1.0"}]
end
- Ensure pinyin is started before your application:
def application do
[applications: [:alchemic_pinyin]]
end
Usage
iex> Pinyin.from_string("龡龢龣龤龥癩")
"chui he jue xie yu la"
iex> Pinyin.from_string("龡龢龣龤龥癩", tone: true)
"chùi hé júe xíe yù là"
iex> Pinyin.from_string("龡龢龣龤龥癩", splitter: "-")
"chui-he-jue-xie-yu-la"
iex> Pinyin.from_string("龡龢龣龤龥癩", [], &String.first/1)
"c"
benchmark
mix bench
OS X
2.7 GHz Intel Core i5 8 GB 1867 MHz DDR3
Settings:
duration: 1.0 s
BasicBench
[14:01:23] 1/1: hello pinyin
Finished in 4.11 seconds
BasicBench
hello pinyin 500000 6.73 µs/op


--- layout: post title: SIEnKS Published in Geoscientific Model Development ---
The Single-iteration Ensemble Kalman Smoother (SIEnKS) is now published in Geoscientific Model Development. This work extends traditional methods of ensemble variational data assimilation with a novel approach, optimized for short-range forecast systems. Our prototype technique is shown both to improve the accurracy and to reduce the leading-order cost of ensemble variational smoothing versus traditional 4D approaches. Further studies will follow to extend the prototype to realistic geophysical data assimilation. This prototype development relied on extensive numerical simulation and demonstration with the Julia package DataAssimilationBenchmarks.jl currently in open review in the Journal of Open Source Software.


It is rare indeed to find video links at Hooting Yard, but… good grief, this is superb! Mr Key's favourite beat combo, Henry Cow, performing “Living In The Heart Of The Beast” at Vevey in Switzerland in 1976. (It looks to me as if they're in the middle of a field*, which may explain the absence of the standard lamps which were such a beguiling feature of their usual stage set.) Irritatingly split into three parts. Watch, listen, and learn.
Incidentally, “Living In The Heart Of The Beast” was the piece that prompted Peter Blegvad's dismissal from the Henry Cow / Slapp Happy collective on the grounds of flippancy. Tim Hodgkinson wrote the music and, as Blegvad recalled in an interview in Hearsay magazine, “I was assigned the task for the collective to come up with suitable verbals, and I wrote two verses about a woman throwing raisins at a pile of bones. Tim just said, I'm sorry, this is not at all what we want. And he wrote reams of this political tirade. I admired his passion and application but it left me cold. I am to my bones a flippant individual”.
Well, it is a tirade, but it's still magnificent.
*NOTE : This being Switzerland, I am reminded, most appositely, of the timeless quotation “Here we are in the field of dreams, surrounded by fields of cows.” See here for the source.


i. Please click on the Initiate Review button to start the profile review
and
edit existing information/ enter a remark.
ii. You can navigate between the sections by clicking on respective tabs i.e.
Retailer information, Business Details, Liabilities Information & Documents.
iii. After typing a remark; please press Enter button.
iv. To submit the remarks, please click Submit. You can also submit all the
‘remarks’ by clicking Submit
all button.
v. If entered information appears to be correct/ in-correct, profile can be
directly approved/ rejected/
re-send as well without initiating the review.
i. Please click on the Review Disclaimer Documents button to view/upload
documents.
i. If entered information appears to be correct/ in-correct, profile can be
directly approved/ rejected.
ii. You can navigate between the sections by clicking on respective tabs i.e.
Retailer information, Business Details, Liabilities Information & Documents.
iii. After typing a remark; please press Enter button.
iv. To submit the remarks, please click Submit. You can also submit all the
‘remarks’ by clicking Submit
all button.


Module nonlinear
Classes
BlobNonlinearity
DifferentiableNonlinearity
ExponentialFunction
HistogramNonlinearity
InvertibleNonlinearity
LogisticFunction
Nonlinearity
TanhBlobNonlinearity
TrainableNonlinearity
Variables
__package__
[
hide private
]


This content has moved to
https://kubernetes.io/docs/tutorials/kubernetes-basics/
Module 3 | Explore your app
Pods and Nodes
‹
Back
To interact with the Terminal, please use the desktop/tablet version
Finished? Test your knowledge in the quiz.
Module 3 quiz
›


THE SEBA Brand philosophy is to create high quality skates, made by skaters for skaters.
It is also, and has always been the development of skating by all means, as a sport, a hobby or even an art.
Our products are tested and improved in real skating situations by the best skaters.


Pat's Salmon Cookies
Tasty Cookies, with variations of shapes.
Home
MENU
ABOUT
CONTACAT
SALES
Pat's Salmon Cookies Sales
Add Your Location:
location Name:
Minimun Customer Per hour:
Maximum Customer Per hour:
Average Cookies:


Schedule
Week 1 Jan 26 - Feb 1
Reading
D3, Chapters 1-4; VAD, Chapter 1
Cancelled, snow day.
Lecture 1: Introduction. What is visualization? Why is it important? Who are we? Course overview.
Introduction to Homework 1
Download Slides
Week 2 Feb 2 - Feb 8
Reading
D3, Chapters 5-8; VAD, Chapters 1-2
Section
Section 1: GIT, HTML, SVG, CSS, the DOM
Lecture 2: SKILLS: Introduction to D3.
Guest Speaker: Vadim Ogievetsky , co-creator of D3
Access Slides
Homework 0 due
Week 3 Feb 9 - Feb 15
Reading
D3, Chapters 9-11; VAD, Chapter 5
Section
Section 2: D3 & JS: Data loading, Data binding, Selections, Scales, Nesting.
Cancelled, snow day.
Week 4 Feb 16 - Feb 22
Reading
D3, Chapter 12; VAD, Chapters 3 & 4
Section
Section 2: D3 & JS: Data loading, Data binding, Selections, Scales, Nesting. Repeated due to snow days.
Lecture 5: The Visualization Alphabet: Marks and Channels.
Introduction to Homework 2
Download Slides
Homework 1 due
Week 5 Feb 23 - Mar 1
Section
Section 3: D3 & JS: Data Structures, Layouts
Week 6 Mar 2 - Mar 8
Reading
VAD, Chapters 6 & 7
Section
Section 4: Designing your Visualization
Week 7 Mar 9 - Mar 15
Reading
VAD, Chapter 9
Section
Section 5: D3 and JavaScript Design Guidelines. HW1 Review.
Homework 2 due.
Week 8 Mar 16 - Mar 22
Spring Recess
Week 9 Mar 23 - Mar 29
Reading
VAD, Chapter 8
Section
Section 6: Designing a multiple coordinated view system. Event handling.
Week 10 Mar 30 - Apr 5
Section
Section 7: Data scraping for final projects.
Homework 3 due
Homework 4 due
Project proposal due (part of homework)
Project teams submitted
Project repositories must be set up
Week 11 Apr 6 - Apr 12
Lecture 17: Social Visualization
Guest Speakers: Fernanda Viegas & Martin Wattenberg. Co-leaders of Google's "Big Picture" data visualization group.
Lecture 18: Visualization and Arts
Guest Speakers: Mark Schifferli and Terrence Fradet from Fathom
Week 12 Apr 13 - Apr 19
Lecture 19: Design Studio 4: Project peer feedback.
Final Project - Milestone 1 due
Week 13 Apr 20 - Apr 26
Week 14Apr 27 - May 3
Reading Period - No Class
Week 15May 4 - May 10
Reading Period
Final Project due
Wednesday May 6
SEAS Design Fair
Thursday May 7
Final Project Presentations
Week 16May 11 - May 17
Exam Period - No Class


Food Specials
This is the left column
This is the far right column
Staff
Home Page
Food Specials
Drink Specials
Full Menu


This years Google Code-in has been a real success for our organisation, Catrobat. 1162 Students all around the globe completed 558 tasks during November 28, 2017 and January 17, 2018. During this period, 3649 new programs have been uploaded to our sharing platform, share.catrob.at, which is an increase of +20.9%!
A big Thank you! to all Mentors and volunteers who are making events like these possible. I hope that all of you had as much fun as I had. Also thanks to all Students and the Google Team.


Cut 1 Torch a segment at the cursor.
Move the cursor to the target segment and press 1.
The segment is cut at the cursor point
Only primitives (line, arc, circle) are cut.


Constructor
new Router(map)
Maintains a list of triggers ("commands") and their behaviors.
Parameters:
| Name | Type | Description |
|---|---|---|
map |
Object | Map of command names => behaviors. |
- Source:
Extends
Methods
commit()
Increment the vector clock, broadcast all changes as a transaction.
- Overrides:
- Source:
deserialize(input) → {State}
Take a hex-encoded input and convert to a State object.
Parameters:
| Name | Type | Description |
|---|---|---|
input |
String | [description] |
- Overrides:
- Source:
Returns:
[description]
- Type
- State
fork() → {State}
- Overrides:
- Source:
Returns:
- Type
- State
get(path) → {Mixed}
Retrieve a key from the State.
Parameters:
| Name | Type | Description |
|---|---|---|
path |
Path | Key to retrieve. |
- Overrides:
- Source:
Returns:
- Type
- Mixed
inherits(scribe) → {Scribe}
Use an existing Scribe instance as a parent.
Parameters:
| Name | Type | Description |
|---|---|---|
scribe |
Scribe | Instance of Scribe to use as parent. |
- Overrides:
- Source:
Returns:
The configured instance of the Scribe.
- Type
- Scribe
now() → {Number}
Retrives the current timestamp, in milliseconds.
- Overrides:
- Source:
Returns:
Number representation of the millisecond Integer value.
- Type
- Number
render() → {String}
Compose a JSON string for network consumption.
- Overrides:
- Source:
Returns:
JSON-encoded String.
- Type
- String
(async) route(msg) → {Array}
Assembles a list of possible responses to the incoming request.
Parameters:
| Name | Type | Description |
|---|---|---|
msg |
String | Input message to route. |
- Source:
Returns:
List of outputs generated from the input string.
- Type
- Array
serialize(inputopt) → {Buffer}
Convert to Buffer.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
input |
Mixed |
<optional> |
Input to serialize. |
- Overrides:
- Source:
Returns:
Store-able blob.
- Type
- Buffer
set(path) → {Mixed}
Set a key in the State to a particular value.
Parameters:
| Name | Type | Description |
|---|---|---|
path |
Path | Key to retrieve. |
- Overrides:
- Source:
Returns:
- Type
- Mixed
toHTML()
Converts the State to an HTML document.
- Overrides:
- Source:
toString() → {String}
Unmarshall an existing state to an instance of a Blob.
- Overrides:
- Source:
Returns:
Serialized Blob.
- Type
- String
trust(source) → {Scribe}
Blindly bind event handlers to the Source.
Parameters:
| Name | Type | Description |
|---|---|---|
source |
Source | Event stream. |
- Overrides:
- Source:
Returns:
Instance of the Scribe.
- Type
- Scribe
use(plugin, name) → {Router}
Attaches a new handler to the router.
Parameters:
| Name | Type | Description |
|---|---|---|
plugin |
Plugin | Instance of the plugin. |
name |
Plugin.name | Name of the plugin. |
- Source:
Returns:
Configured instance of the router.
- Type
- Router


RentToday - Admin
Statistics
Rents
Users
Records
Films
User #ABC
RentToday
Templates
Examples
Admin
439k
Users
59k
Products
3.4k
Open Orders
19
Exceptions
Inventory Search
User Search
Rent detail
User detail
Record detail
Film detail


Please use chrome to get the best experience.
Press any key to start the game. Arrow keys to control the snake, whitespace to pause. F5 to restart the game.
Though there are many snake games already, I think I may regret if I don't implement this classic game on my own for even once. I tried to make it a little different so I added the wavy effect. Hope you enjoy it!
Author: Zero


Are you tired of paying ridiculous fees for camera and other equipment rentals? Bypass the middleman and rent from a real person!
sign up todayNo matter what kind of technology you have to share, UseMyTech makes it simple and secure to rent out your tech. You’re in full control of your availability, prices, and rules.
To keep you and your techs afe, we cover every rental with $1M USD in property damage protection and another $1M USD in insurance against accidents.
UseMyTech always requires guests to provide certain information before they can make a reservation—such as a confirmed phone number and email address. For added control, you can require guests to also provide recommendations from other hosts and a verified ID.
1
Share any tech without sign-up charges, from a camera to printer and everything in-between.
2
Choose your own schedule, prices, and requirements for renters. We’re there to help along the way.
3
Once your listing is live, qualified guests can reach out. You can message them with any questions before they rent.


{% extends "base.html" %} {% import "bootstrap/wtf.html" as wtf %} {% block title %} {{ _('Apache Credential Update') }} {% endblock title %} {% block content %}
{{ _('Hello,
Through the form bellow, you can change your password.
For this happen,
you must provide your username (based on the format defined by your administrator or enterprise),
first password or current password and the new one.')
}}


caca-config(1) caca-config(1) NAME caca-config - script to get information about the installed version of libcaca SYNOPSIS caca-config [ --prefix= DIR] [ --exec-prefix= DIR] [ --version ] [ --libs ] [ --cflags ] DESCRIPTION caca-config is a tool that is used to configure and determine the com‐ piler and linker flags that should be used to compile and link progams, libraries, and plugins that use libcaca. The use of caca-config is deprecated. The more generic tool pkg-config should be used instead. OPTIONS --cflags Print the compiler flags that are necessary to compile a program or library that uses libcaca. --exec-prefix=DIR If specified, use DIR instead of the installation exec prefix that libcaca was build with when computing the output for the --cflags and --libs options. This option must be specified before any of the --cflags and --libs options. --libs Print the linker flags that are necessary to link a program or library that uses libcaca. --prefix=DIR If specified, use PREFIX instead of the installation prefix that libcaca was built with when computing the output for the --cflags and --libs options. This option is also used for the exec prefix if --exec-prefix was not specified. This option must be specified before any of the --cflags and --libs options. --version Prints the currently installed version of libcaca on standard out‐ put. EXAMPLES gcc -o main.o $(caca-config --cflags) -c main.c is how you might use caca-config to compile a C source file for an executable program. gcc -o my_app $(caca-config --libs) main.o util.o is how you might use caca-config to link compiled objects into an executable program. SEE ALSO pkg-config(1) AUTHOR The libcaca library was written by Sam Hocevar<EMAIL_ADDRESS>This manual page was written for sdl-config by Branden Robinson, origi‐ nally for Progeny Linux Systems, Inc., and the Debian Project. It was adapted to libcaca by Sam Hocevar. libcaca 2003-11-22 caca-config(1)