public class LociForm extends Form implements FormBlockReader, FormFileInformer, FormProgressInformer, MetadataReader
| Modifier and Type | Field and Description |
|---|---|
protected double |
percent
Percent complete for current operation.
|
protected IFormatReader |
reader
Reader to use for open-related functions.
|
protected FileFilter[] |
rFilters
File filters for reader formats.
|
protected FileFilter[] |
wFilters
File filters for writer formats.
|
protected IFormatWriter |
writer
Writer to use for save-related functions.
|
| Constructor and Description |
|---|
LociForm()
Constructs a new LociForm that handles anything from loci.formats.
|
LociForm(IFormatReader reader)
Constructs a new LociForm that handles the given reader.
|
LociForm(IFormatReader reader,
IFormatWriter writer)
Constructs a new LociForm that handles the given reader/writer pair.
|
LociForm(IFormatWriter writer)
Constructs a new LociForm that handles the given writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String id,
Data data,
boolean replace)
Adds data to an existing image file.
|
void |
close()
Closes any open files.
|
int |
getBlockCount(String id)
Determines the number of images in the given image file.
|
String[] |
getDefaultSuffixes()
Returns the default file suffixes for this file format.
|
FormNode |
getForms(Data data)
Returns the data forms that are compatible with a data object.
|
Hashtable |
getMetadata(String id)
Obtains the hashtable containing the metadata field/value pairs from
the given image file.
|
Object |
getMetadataValue(String id,
String field)
Obtains the specified metadata field's value for the given file.
|
double |
getPercentComplete()
Gets the percentage complete of the form's current operation.
|
IFormatReader |
getReader()
Gets the IFormatReader backing this form's reading capabilities.
|
FileFilter[] |
getReaderFilters()
Gets file filters for use with formats supported for reading.
|
IFormatWriter |
getWriter()
Gets the IFormatWriter backing this form's writing capabilities.
|
FileFilter[] |
getWriterFilters()
Gets file filters for use with formats supported for writing.
|
void |
initHandler(IFormatHandler h,
String id) |
boolean |
isThisType(byte[] block)
Checks if the given block is a valid header for an image file.
|
boolean |
isThisType(String name)
Checks if the given string is a valid filename for an image file.
|
static void |
main(String[] args) |
DataImpl |
open(String id)
Opens an existing image file from the given filename.
|
DataImpl |
open(String id,
int block_number)
Obtains the specified image from the given image file.
|
DataImpl |
open(URL url)
Opens an existing image file from the given URL.
|
void |
save(String id,
Data data,
boolean replace)
Saves a VisAD Data object at the given location.
|
void |
setFrameRate(int fps)
Sets the frames per second to use when writing files.
|
void |
testRead(String[] args)
A utility method for test reading a file from the command line,
and displaying the results in a simple display.
|
getMathTypeprotected IFormatReader reader
protected IFormatWriter writer
protected double percent
protected FileFilter[] rFilters
protected FileFilter[] wFilters
public LociForm()
public LociForm(IFormatReader reader)
public LociForm(IFormatWriter writer)
public LociForm(IFormatReader reader, IFormatWriter writer)
public IFormatReader getReader()
public IFormatWriter getWriter()
public void setFrameRate(int fps)
public void testRead(String[] args) throws VisADException, IOException
VisADExceptionIOExceptionpublic FileFilter[] getReaderFilters()
public FileFilter[] getWriterFilters()
public DataImpl open(String id) throws BadFormException, IOException, VisADException
open in class FormNodeBadFormExceptionIOExceptionVisADExceptionpublic void save(String id, Data data, boolean replace) throws BadFormException, IOException, RemoteException, VisADException
save in class FormNodeBadFormExceptionIOExceptionRemoteExceptionVisADExceptionpublic void add(String id, Data data, boolean replace) throws BadFormException
add in class FormNodeBadFormException - Always thrown (this method not
implemented).public DataImpl open(URL url) throws BadFormException, IOException, VisADException
open in class FormNodeUnimplementedException - Always thrown (this method not
implemented).BadFormExceptionIOExceptionVisADExceptionpublic FormNode getForms(Data data)
public DataImpl open(String id, int block_number) throws BadFormException, IOException, VisADException
open in interface FormBlockReaderid - The file from which to load data blocks.block_number - The block number of the block to load.VisADException - If the block number is invalid.BadFormExceptionIOExceptionpublic int getBlockCount(String id) throws BadFormException, IOException, VisADException
getBlockCount in interface FormBlockReaderid - The file for which to get a block count.BadFormExceptionIOExceptionVisADExceptionpublic void close()
throws BadFormException,
IOException,
VisADException
close in interface FormBlockReaderBadFormExceptionIOExceptionVisADExceptionpublic boolean isThisType(String name)
isThisType in interface FormFileInformername - name of the filepublic boolean isThisType(byte[] block)
isThisType in interface FormFileInformerblock - block of bytes from filepublic String[] getDefaultSuffixes()
getDefaultSuffixes in interface FormFileInformerpublic double getPercentComplete()
getPercentComplete in interface FormProgressInformerpublic Object getMetadataValue(String id, String field) throws BadFormException, IOException, VisADException
getMetadataValue in interface MetadataReaderfield - the name associated with the metadata fieldBadFormExceptionIOExceptionVisADExceptionpublic Hashtable getMetadata(String id) throws BadFormException, IOException, VisADException
getMetadata in interface MetadataReaderid - the filenameBadFormExceptionIOExceptionVisADExceptionpublic void initHandler(IFormatHandler h, String id) throws BadFormException, IOException
BadFormExceptionIOExceptionCopyright © 1996–2023 The SSEC Visualization Project. All rights reserved.