public class Rasters extends Object
| Constructor and Description |
|---|
Rasters(int width,
int height,
FieldType[] fieldTypes)
Constructor
|
Rasters(int width,
int height,
FieldType[] fieldTypes,
ByteBuffer interleaveValues)
Constructor
|
Rasters(int width,
int height,
FieldType[] fieldTypes,
ByteBuffer[] sampleValues)
Constructor
|
Rasters(int width,
int height,
FieldType[] fieldTypes,
ByteBuffer[] sampleValues,
ByteBuffer interleaveValues)
Constructor
|
Rasters(int width,
int height,
FieldType[] fieldTypes,
ByteOrder order)
Constructor
|
Rasters(int width,
int height,
int[] bitsPerSamples,
int[] sampleFormats)
Constructor
Creates Rasters object where one bits per sample and sample format is
provided for each sample
|
Rasters(int width,
int height,
int[] bitsPerSamples,
int[] sampleFormats,
ByteOrder order)
Constructor
Creates Rasters object where one bits per sample and sample format is
provided for each sample
|
Rasters(int width,
int height,
int samplesPerPixel,
FieldType fieldType)
Constructor
Creates Rasters object where given field type used for each sample.
|
Rasters(int width,
int height,
int samplesPerPixel,
FieldType fieldType,
ByteOrder order)
Constructor
Creates Rasters object where given field type used for each sample.
|
Rasters(int width,
int height,
int samplesPerPixel,
int bitsPerSample,
int sampleFormat)
Constructor
Creates Rasters object where given bits per sample and sample format is
used for each sample
|
Rasters(int width,
int height,
int samplesPerPixel,
int bitsPerSample,
int sampleFormat,
ByteOrder order)
Constructor
Creates Rasters object where given bits per sample and sample format is
used for each sample
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToInterleave(int sampleIndex,
int coordinate,
Number value)
Add a value to the interleaved results
|
void |
addToSample(int sampleIndex,
int coordinate,
Number value)
Add a value to the sample results
|
int |
calculateRowsPerStrip(int planarConfiguration)
Calculate the rows per strip to write
|
int |
calculateRowsPerStrip(int planarConfiguration,
int maxBytesPerStrip)
Calculate the rows per strip to write
|
List<Integer> |
getBitsPerSample()
Get the bits per sample
|
FieldType[] |
getFieldTypes()
Returns field types
|
Number |
getFirstPixelSample(int x,
int y)
Get the first pixel sample value, useful for single sample pixels
(grayscale)
|
int |
getHeight()
Get the height of pixels
|
int |
getInterleaveIndex(int x,
int y)
Get the interleave index location
|
ByteBuffer |
getInterleaveValues()
Get the results stored as interleaved pixel samples
|
int |
getNumPixels()
Return the number of pixels
|
Number[] |
getPixel(int x,
int y)
Get the pixel sample values
|
byte[] |
getPixelRow(int y,
ByteOrder newOrder)
Returns byte array of pixel row.
|
Number |
getPixelSample(int sample,
int x,
int y)
Get a pixel sample value
|
List<Integer> |
getSampleFormat()
Returns list of sample types constants
Returns list of sample types constants (SAMPLE_FORMAT_UNSIGNED_INT,
SAMPLE_FORMAT_SIGNED_INT or SAMPLE_FORMAT_FLOAT) for each sample in
sample list @see getFieldTypes().
|
int |
getSampleIndex(int x,
int y)
Get the sample index location
|
byte[] |
getSampleRow(int y,
int sample,
ByteOrder newOrder)
Returns byte array of sample row.
|
int |
getSamplesPerPixel()
Get the number of samples per pixel
|
ByteBuffer[] |
getSampleValues()
Get the results stored by samples
|
int |
getWidth()
Get the width of pixels
|
boolean |
hasInterleaveValues()
True if the results are stored interleaved
|
boolean |
hasSampleValues()
True if the results are stored by samples
|
void |
setFirstPixelSample(int x,
int y,
Number value)
Set the first pixel sample value, useful for single sample pixels
(grayscale)
|
void |
setInterleaveValues(ByteBuffer interleaveValues)
Set the results stored as interleaved pixel samples
|
void |
setPixel(int x,
int y,
Number[] values)
Set the pixel sample values
|
void |
setPixelSample(int sample,
int x,
int y,
Number value)
Set a pixel sample value
|
void |
setSampleValues(ByteBuffer[] sampleValues)
Set the results stored by samples
|
int |
size()
Size in bytes of the image
|
int |
sizePixel()
Size in bytes of a pixel
|
public Rasters(int width,
int height,
FieldType[] fieldTypes,
ByteBuffer[] sampleValues)
width - width of pixelsheight - height of pixelsfieldTypes - field type for each samplesampleValues - empty sample values buffer arraypublic Rasters(int width,
int height,
FieldType[] fieldTypes,
ByteBuffer interleaveValues)
width - width of pixelsheight - height of pixelsfieldTypes - field type for each sampleinterleaveValues - empty interleaved values bufferpublic Rasters(int width,
int height,
FieldType[] fieldTypes,
ByteBuffer[] sampleValues,
ByteBuffer interleaveValues)
width - width of pixelsheight - height of pixelsfieldTypes - Field type for each samplesampleValues - empty sample values buffer arrayinterleaveValues - empty interleaved values bufferpublic Rasters(int width,
int height,
int samplesPerPixel,
FieldType fieldType)
width - width of pixelsheight - height of pixelssamplesPerPixel - number of samples per pixelfieldType - type of field for each samplepublic Rasters(int width,
int height,
int samplesPerPixel,
FieldType fieldType,
ByteOrder order)
width - width of pixelsheight - height of pixelssamplesPerPixel - number of samples per pixelfieldType - type of field for each sampleorder - byte orderpublic Rasters(int width,
int height,
int[] bitsPerSamples,
int[] sampleFormats)
width - width of pixelsheight - height of pixelsbitsPerSamples - bits per samplessampleFormats - sample formatspublic Rasters(int width,
int height,
int[] bitsPerSamples,
int[] sampleFormats,
ByteOrder order)
width - width of pixelsheight - height of pixelsbitsPerSamples - bits per samplessampleFormats - sample formatsorder - byte orderpublic Rasters(int width,
int height,
int samplesPerPixel,
int bitsPerSample,
int sampleFormat)
width - width of pixelsheight - height of pixelssamplesPerPixel - number of samples per pixelbitsPerSample - bits per each samplesampleFormat - format for each samplepublic Rasters(int width,
int height,
int samplesPerPixel,
int bitsPerSample,
int sampleFormat,
ByteOrder order)
width - width of pixelsheight - height of pixelssamplesPerPixel - number of samples per pixelbitsPerSample - bits per each samplesampleFormat - format for each sampleorder - byte orderpublic Rasters(int width,
int height,
FieldType[] fieldTypes)
width - width of pixelsheight - height of pixelsfieldTypes - field types per samplepublic boolean hasSampleValues()
public boolean hasInterleaveValues()
public void addToSample(int sampleIndex,
int coordinate,
Number value)
sampleIndex - sample indexcoordinate - coordinate locationvalue - valuepublic void addToInterleave(int sampleIndex,
int coordinate,
Number value)
sampleIndex - sample indexcoordinate - coordinate locationvalue - valuepublic int getWidth()
public int getHeight()
public int getNumPixels()
public int getSamplesPerPixel()
public List<Integer> getBitsPerSample()
public List<Integer> getSampleFormat()
TiffConstantspublic ByteBuffer[] getSampleValues()
public void setSampleValues(ByteBuffer[] sampleValues)
sampleValues - sample valuespublic ByteBuffer getInterleaveValues()
public void setInterleaveValues(ByteBuffer interleaveValues)
interleaveValues - interleaved valuespublic Number[] getPixel(int x, int y)
x - x coordinate (>= 0 && < getWidth())y - y coordinate (>= 0 && < getHeight())public void setPixel(int x,
int y,
Number[] values)
x - x coordinate (>= 0 && < getWidth())y - y coordinate (>= 0 && < getHeight())values - pixel valuespublic byte[] getPixelRow(int y,
ByteOrder newOrder)
y - Row indexnewOrder - Desired byte order of result byte arraypublic byte[] getSampleRow(int y,
int sample,
ByteOrder newOrder)
y - Row indexsample - Sample indexnewOrder - Desired byte order of resulting byte arraypublic Number getPixelSample(int sample, int x, int y)
sample - sample index (>= 0 && < getSamplesPerPixel())x - x coordinate (>= 0 && < getWidth())y - y coordinate (>= 0 && < getHeight())public void setPixelSample(int sample,
int x,
int y,
Number value)
sample - sample index (>= 0 && < getSamplesPerPixel())x - x coordinate (>= 0 && < getWidth())y - y coordinate (>= 0 && < getHeight())value - pixel valuepublic Number getFirstPixelSample(int x, int y)
x - x coordinate (>= 0 && < getWidth())y - y coordinate (>= 0 && < getHeight())public void setFirstPixelSample(int x,
int y,
Number value)
x - x coordinate (>= 0 && < getWidth())y - y coordinate (>= 0 && < getHeight())value - pixel valuepublic int getSampleIndex(int x,
int y)
x - x coordinatey - y coordinatepublic int getInterleaveIndex(int x,
int y)
x - x coordinatey - y coordinatepublic int size()
public int sizePixel()
public int calculateRowsPerStrip(int planarConfiguration)
planarConfiguration - chunky or planarpublic int calculateRowsPerStrip(int planarConfiguration,
int maxBytesPerStrip)
planarConfiguration - chunky or planarmaxBytesPerStrip - attempted max bytes per strippublic FieldType[] getFieldTypes()
Copyright © 2017 National Geospatial-Intelligence Agency. All rights reserved.