public class ArrayObject extends DataObject
channel, dataObjectLocation, fileObject, localIdentifier, name, offset, parentDir
Constructor and Description |
---|
ArrayObject(java.io.File parentDir,
File fileObject,
Array array,
long offset)
Deprecated.
|
ArrayObject(java.io.File parentDir,
File fileObject,
Array array,
long offset,
DataObjectLocation location)
Creats a new array instance.
|
ArrayObject(java.net.URL parent,
File fileObject,
Array array,
long offset)
Deprecated.
|
ArrayObject(java.net.URL parent,
File fileObject,
Array array,
long offset,
DataObjectLocation location)
Creates a new array instance.
|
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
as2DImage()
Returns a BufferedImage object with the type set to TYPE_BYTE_GRAY.
|
void |
close() |
Array |
getArray() |
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[] |
getElements1D()
Gets the entire 1-D array, as doubles.
|
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.
|
ElementType |
getElementType() |
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.
|
void |
open() |
void |
setArray(Array array) |
closeChannel, getChannel, getDataFile, getDataObjectLocation, getInputStream, getLocalIdentifier, getName, getOffset, getSize, setDataObjectLocation, setLocalIdentifier, setName, setSize
public ArrayObject(java.io.File parentDir, File fileObject, Array array, long offset, DataObjectLocation location) throws java.io.FileNotFoundException, java.io.IOException, java.net.URISyntaxException
parentDir
- the parent directory for the data filefileObject
- the file object metadataarray
- the array objectoffset
- the offset within the data filejava.io.IOException
- if there is an error opening the data filejava.io.FileNotFoundException
- if the data file is not foundjava.net.URISyntaxException
public ArrayObject(java.net.URL parent, File fileObject, Array array, long offset, DataObjectLocation location) throws java.io.FileNotFoundException, java.io.IOException, java.net.URISyntaxException
parent
- the parent directory for the data filefileObject
- the file object metadataarray
- the array objectoffset
- the offset within the data filejava.io.IOException
- if there is an error opening the data filejava.io.FileNotFoundException
- if the data file is not foundjava.net.URISyntaxException
@Deprecated public ArrayObject(java.net.URL parent, File fileObject, Array array, long offset) throws java.io.FileNotFoundException, java.io.IOException, java.net.URISyntaxException
java.io.FileNotFoundException
java.io.IOException
java.net.URISyntaxException
@Deprecated public ArrayObject(java.io.File parentDir, File fileObject, Array array, long offset) throws java.io.FileNotFoundException, java.io.IOException, java.net.URISyntaxException
java.io.FileNotFoundException
java.io.IOException
java.net.URISyntaxException
public int[] getDimensions()
public int getAxes()
public int getElementSize()
public int getInt(int row, int column) throws java.io.IOException
row
- the rowcolumn
- the columnjava.io.IOException
public long getLong(int row, int column) throws java.io.IOException
row
- the rowcolumn
- the columnjava.io.IOException
public double getDouble(int row, int column) throws java.io.IOException
row
- the rowcolumn
- the columnjava.io.IOException
public int getInt(int i1, int i2, int i3) throws java.io.IOException
i1
- the first indexi2
- the second indexi3
- the third indexjava.io.IOException
public long getLong(int i1, int i2, int i3) throws java.io.IOException
i1
- the first indexi2
- the second indexi3
- the third indexjava.io.IOException
public double getDouble(int i1, int i2, int i3) throws java.io.IOException
i1
- the first indexi2
- the second indexi3
- the third indexjava.io.IOException
public int getInt(int[] position) throws java.io.IOException
position
- the indices of the elementjava.io.IOException
public long getLong(int[] position) throws java.io.IOException
position
- the indices of the elementjava.io.IOException
public double getDouble(int[] position) throws java.io.IOException
position
- the indices of the elementjava.io.IOException
public double[] getElements1D() throws java.io.IOException
java.io.IOException
public double[][] getElements2D() throws java.io.IOException
java.io.IOException
public double[][][] getElements3D() throws java.io.IOException
java.io.IOException
public boolean isImage()
public java.awt.image.BufferedImage as2DImage()
public ElementType getElementType()
public Array getArray()
public void setArray(Array array)
public void open() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
Copyright © 2023 Planetary Data System. All rights reserved.