public interface NetCDFService
extends loci.common.services.Service
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes and resets the service.
|
Object |
getArray(String path,
int[] origin,
int[] shape)
Retrieves an HDF path's values.
|
Vector<String> |
getAttributeList()
Retrieves an exhaustive list of the HDF paths for all attributes in the
HDF document.
|
String |
getAttributeValue(String path)
Retrieves an attribute's value.
|
int |
getDimension(String path)
Retrieves the length of a dimension.
|
String |
getFile()
Retrieves the current initialized file path.
|
Hashtable<String,Object> |
getVariableAttributes(String path)
Retrieves all of a variable's attributes.
|
Vector<String> |
getVariableList()
Retrieves an exhaustive list of the HDF paths for all variables in the
HDF document.
|
Object |
getVariableValue(String path)
Retrieves a variable's value.
|
void |
setFile(String file)
Initializes the service on a given file path.
|
void setFile(String file) throws IOException
file
- Path to initialize the service with.IOException
- If there is an error initializing the service
with file
.String getFile()
null
if the service
has yet to be initialized or is closed.Vector<String> getAttributeList()
Vector<String> getVariableList()
String getAttributeValue(String path)
path
- HDF path to the attribute.null
if the attribute is not a
string.Object getVariableValue(String path) throws loci.common.services.ServiceException
path
- HDF path to the variable.loci.common.services.ServiceException
- If there is an error with the range of values
or reading from the file.Array.copyTo1DJavaArray()
Object getArray(String path, int[] origin, int[] shape) throws loci.common.services.ServiceException
path
- HDF path to the values.origin
- Array specifying the starting index. If null, assume
all zeroes.shape
- Array specifying the extents in each dimension. This
becomes the shape of the returned Array.loci.common.services.ServiceException
- If there is an error with the range of values
or reading from the file.Variable.read(int[], int[])
,
Array.copyToNDJavaArray()
Hashtable<String,Object> getVariableAttributes(String path)
path
- HDF path to the variable.Array.copyTo1DJavaArray()
int getDimension(String path)
path
- HDF path to the dimension.void close() throws IOException
IOException
- If there is an error closing the file.Copyright © 2017 Open Microscopy Environment