public class ArrayObject extends DataObject
Constructor and Description |
---|
ArrayObject(File parentDir,
File fileObject,
Array array,
long offset)
Creats a new array instance.
|
ArrayObject(URL parent,
File fileObject,
Array array,
long offset)
Creats a new array instance.
|
Modifier and Type | Method and Description |
---|---|
BufferedImage |
as2DImage()
Returns a BufferedImage object with the type set to TYPE_BYTE_GRAY.
|
int |
getAxes()
Gets the number of dimensions.
|
int[] |
getDimensions()
Gets the dimensions of the array.
|
double |
getDouble(int[] position)
Gets an array element, as a double.
|
double |
getDouble(int row,
int column)
Gets an element of a 2-D array, as a double.
|
double |
getDouble(int i1,
int i2,
int i3)
Gets an element of a 3-D array, as a double.
|
double[][] |
getElements2D()
Gets the entire 2-D array, as doubles.
|
double[][][] |
getElements3D()
Gets the entire 3-D array, as doubles.
|
int |
getElementSize()
Gets the size of an array element.
|
int |
getInt(int[] position)
Gets an array element, as an int.
|
int |
getInt(int row,
int column)
Gets an element of a 2-D array, as an int.
|
int |
getInt(int i1,
int i2,
int i3)
Gets an element of a 3-D array, as an int.
|
long |
getLong(int[] position)
Gets an array element, as a long.
|
long |
getLong(int row,
int column)
Gets an element of a 2-D array, as a long.
|
long |
getLong(int i1,
int i2,
int i3)
Gets an element of a 3-D array, as a long.
|
boolean |
isImage()
Checks to see whether the array is an image.
|
getBuffer, getDataFile, getInputStream, getOffset, getSize, setSize
public ArrayObject(File parentDir, File fileObject, Array array, long offset) throws FileNotFoundException, IOException
parentDir
- the parent directory for the data filefileObject
- the file object metadataarray
- the array objectoffset
- the offset within the data fileIOException
- if there is an error opening the data fileFileNotFoundException
- if the data file is not foundpublic ArrayObject(URL parent, File fileObject, Array array, long offset) throws FileNotFoundException, IOException
parent
- the parent directory for the data filefileObject
- the file object metadataarray
- the array objectoffset
- the offset within the data fileIOException
- if there is an error opening the data fileFileNotFoundException
- if the data file is not foundpublic int[] getDimensions()
public int getAxes()
public int getElementSize()
public int getInt(int row, int column)
row
- the rowcolumn
- the columnpublic long getLong(int row, int column)
row
- the rowcolumn
- the columnpublic double getDouble(int row, int column)
row
- the rowcolumn
- the columnpublic int getInt(int i1, int i2, int i3)
i1
- the first indexi2
- the second indexi3
- the third indexpublic long getLong(int i1, int i2, int i3)
i1
- the first indexi2
- the second indexi3
- the third indexpublic double getDouble(int i1, int i2, int i3)
i1
- the first indexi2
- the second indexi3
- the third indexpublic int getInt(int[] position)
position
- the indices of the elementpublic long getLong(int[] position)
position
- the indices of the elementpublic double getDouble(int[] position)
position
- the indices of the elementpublic double[][] getElements2D()
public double[][][] getElements3D()
public boolean isImage()
public BufferedImage as2DImage()
Copyright © 2010–2017 Planetary Data System. All rights reserved.