public class Rasters extends Object
| Constructor and Description |
|---|
Rasters(int width,
int height,
int samplesPerPixel,
int bitsPerSample)
Constructor
|
Rasters(int width,
int height,
int samplesPerPixel,
List<Integer> bitsPerSample)
Constructor
|
Rasters(int width,
int height,
int samplesPerPixel,
List<Integer> bitsPerSample,
Number[] interleaveValues)
Constructor
|
Rasters(int width,
int height,
int samplesPerPixel,
List<Integer> bitsPerSample,
Number[][] sampleValues)
Constructor
|
Rasters(int width,
int height,
int samplesPerPixel,
List<Integer> bitsPerSample,
Number[][] sampleValues,
Number[] interleaveValues)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToInterleave(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
|
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
|
Number[] |
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
|
Number |
getPixelSample(int sample,
int x,
int y)
Get a pixel sample value
|
int |
getSampleIndex(int x,
int y)
Get the sample index location
|
int |
getSamplesPerPixel()
Get the number of samples per pixel
|
Number[][] |
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(Number[] 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 vample value
|
void |
setSampleValues(Number[][] sampleValues)
Set the results stored by samples
|
int |
size()
Size in bytes of the image
|
int |
sizePixel()
Size in bytes of a pixel
|
int |
sizeSample(int sample)
Size in bytes of a sample
|
public Rasters(int width,
int height,
int samplesPerPixel,
List<Integer> bitsPerSample,
Number[][] sampleValues)
width - width of pixelsheight - height of pixelssamplesPerPixel - samples per pixelbitsPerSample - bits per samplesampleValues - empty sample values double arraypublic Rasters(int width,
int height,
int samplesPerPixel,
List<Integer> bitsPerSample,
Number[] interleaveValues)
width - width of pixelsheight - height of pixelssamplesPerPixel - samples per pixelbitsPerSample - bits per sampleinterleaveValues - empty interleaved values arraypublic Rasters(int width,
int height,
int samplesPerPixel,
List<Integer> bitsPerSample,
Number[][] sampleValues,
Number[] interleaveValues)
width - width of pixelsheight - height of pixelssamplesPerPixel - samples per pixelbitsPerSample - bits per samplesampleValues - empty sample values double arrayinterleaveValues - empty interleaved values arraypublic Rasters(int width,
int height,
int samplesPerPixel,
List<Integer> bitsPerSample)
width - width of pixelsheight - height of pixelssamplesPerPixel - samples per pixelbitsPerSample - bits per samplepublic Rasters(int width,
int height,
int samplesPerPixel,
int bitsPerSample)
width - width of pixelsheight - height of pixelssamplesPerPixel - samples per pixelbitsPerSample - single sample bits 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 coordinate,
Number value)
coordinate - coordinate locationvalue - valuepublic int getWidth()
public int getHeight()
public int getNumPixels()
public int getSamplesPerPixel()
public List<Integer> getBitsPerSample()
public Number[][] getSampleValues()
public void setSampleValues(Number[][] sampleValues)
sampleValues - sample valuespublic Number[] getInterleaveValues()
public void setInterleaveValues(Number[] 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 Number getPixelSample(int sample, int x, int y)
sample - sample index (>= 0 && < samplesPerPixel)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 && < samplesPerPixel)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 sizeSample(int sample)
sample - sample indexpublic int calculateRowsPerStrip(int planarConfiguration)
planarConfiguration - chunky or planarpublic int calculateRowsPerStrip(int planarConfiguration,
int maxBytesPerStrip)
planarConfiguration - chunky or planarmaxBytesPerStrip - attempted max bytes per stripCopyright © 2016 National Geospatial-Intelligence Agency. All rights reserved.