API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.image. SampleModel View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      SampleModel
Implements
Subclasses
Description
publicabstract abstract class SampleModel
  This abstract class defines an interface for extracting samples of pixels in an image.
Constructors
public SampleModel (int dataType, int w, int h, int numBands)
  Constructs a SampleModel with the specified parameters.
Methods
Hide/Show inherited methods
publicabstract SampleModel createCompatibleSampleModel (int w, int h)
  Creates a SampleModel which describes data in this SampleModel's format, but with a different width and height.
publicabstract DataBuffer createDataBuffer ()
  Creates a DataBuffer that corresponds to this SampleModel.
publicabstract SampleModel createSubsetSampleModel (int[] bands)
  Creates a new SampleModel with a subset of the bands of this SampleModel.
public 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.
publicabstract Object getDataElements (int x, int y, Object obj, DataBuffer data)
  Returns data for a single pixel in a primitive array of type TransferType.
publicfinal int getDataType ()
  Returns the data type of the DataBuffer storing the pixel data.
publicfinal int getHeight ()
  Returns the height in pixels.
publicfinal int getNumBands ()
  Returns the total number of bands of image data.
publicabstract int getNumDataElements ()
  Returns the number of data elements needed to transfer a pixel via the getDataElements and setDataElements methods.
public double getPixel (int x, int y, double[] dArray, DataBuffer data)
  Returns the samples for the specified pixel in an array of double.
public float getPixel (int x, int y, float[] fArray, DataBuffer data)
  Returns the samples for the specified pixel in an array of float.
public 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.
public 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.
public 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.
public 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.
publicabstract 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.
public 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.
public 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.
public 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.
public 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.
public 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.
publicabstract int getSampleSize ()
  Returns the size in bits of samples for all bands.
publicabstract int getSampleSize (int band)
  Returns the size in bits of samples for the specified band.
public int getTransferType ()
  Returns the TransferType used to transfer pixels via the getDataElements and setDataElements methods.
publicfinal int getWidth ()
  Returns the width in pixels.
public 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.
publicabstract 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.
public void setPixel (int x, int y, double[] dArray, DataBuffer data)
  Sets a pixel in the DataBuffer using a double array of samples for input.
public void setPixel (int x, int y, float[] fArray, DataBuffer data)
  Sets a pixel in the DataBuffer using a float array of samples for input.
public void setPixel (int x, int y, int[] iArray, DataBuffer data)
  Sets a pixel in the DataBuffer using an int array of samples for input.
public 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.
public 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.
public 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.
public 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.
public 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.
publicabstract 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.
public 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.
public 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.
public 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.
Fields
Hide/Show inherited fields
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.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar