java.awt.image

Class PixelInterleavedSampleModel

public class PixelInterleavedSampleModel extends ComponentSampleModel

A SampleModel that uses exactly one element of the raster’s {@link DataBuffer} per pixel, holds all bands in a single bank, and stores band data in pixel-interleaved manner.

Since: 1.2

Constructor Summary
PixelInterleavedSampleModel(int dataType, int width, int height, int pixelStride, int scanlineStride, int[] bandOffsets)
Method Summary
SampleModelcreateCompatibleSampleModel(int width, int height)
Creates a new SampleModel that is like this one, but uses the specified width and height.
SampleModelcreateSubsetSampleModel(int[] bands)
Creates a new SampleModel that is like this one, but uses only a subset of its bands.

Constructor Detail

PixelInterleavedSampleModel

public PixelInterleavedSampleModel(int dataType, int width, int height, int pixelStride, int scanlineStride, int[] bandOffsets)

Method Detail

createCompatibleSampleModel

public SampleModel createCompatibleSampleModel(int width, int height)
Creates a new SampleModel that is like this one, but uses the specified width and height.

Parameters: width the number of pixels in the horizontal direction. height the number of pixels in the vertical direction.

createSubsetSampleModel

public SampleModel createSubsetSampleModel(int[] bands)
Creates a new SampleModel that is like this one, but uses only a subset of its bands.

Parameters: bands an array whose elements indicate which bands shall be part of the subset. For example, [0, 2, 3] would create a SampleModel containing bands #0, #2 and #3.