|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvisad.data.FormNode
visad.data.Form
visad.data.bio.LociForm
LociForm is the VisAD data adapter for images handled by the loci.formats package. It works by wrapping a loci.formats.FormatReader and/or loci.formats.FormatWriter object.
| Field Summary | |
protected double |
percent
Percent complete for current operation. |
protected FormatReader |
reader
Reader to use for open-related functions. |
protected FormatWriter |
writer
Writer to use for save-related functions. |
| Fields inherited from class visad.data.Form |
mathType |
| Constructor Summary | |
LociForm()
Constructs a new LociForm that handles anything from loci.formats. |
|
LociForm(FormatReader reader)
Constructs a new LociForm that handles the given reader. |
|
LociForm(FormatReader reader,
FormatWriter writer)
Constructs a new LociForm that handles the given reader/writer pair. |
|
LociForm(FormatWriter writer)
Constructs a new LociForm that handles the given writer. |
|
| Method Summary | |
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. |
Object |
getOMENode(String id)
Obtains a loci.ome.xml.OMENode object representing the file's metadata as an OME-XML DOM structure. |
double |
getPercentComplete()
Gets the percentage complete of the form's current operation. |
FormatReader |
getReader()
Gets the FormatReader backing this form's reading capabilities. |
FormatWriter |
getWriter()
Gets the FormatWriter backing this form's writing capabilities. |
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. |
| Methods inherited from class visad.data.Form |
getMathType |
| Methods inherited from class visad.data.FormNode |
getName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected FormatReader reader
protected FormatWriter writer
protected double percent
| Constructor Detail |
public LociForm()
public LociForm(FormatReader reader)
public LociForm(FormatWriter writer)
public LociForm(FormatReader reader,
FormatWriter writer)
| Method Detail |
public FormatReader getReader()
public FormatWriter getWriter()
public void setFrameRate(int fps)
public void testRead(String[] args)
throws VisADException,
IOException
VisADException
IOException
public DataImpl open(String id)
throws BadFormException,
IOException,
VisADException
open in class FormNodeBadFormException
IOException
VisADException
public void save(String id,
Data data,
boolean replace)
throws BadFormException,
IOException,
RemoteException,
VisADException
save in class FormNodeBadFormException
IOException
RemoteException
VisADException
public 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).
BadFormException
IOException
VisADExceptionpublic FormNode getForms(Data data)
getForms in class FormNode
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.
BadFormException
IOException
public int getBlockCount(String id)
throws BadFormException,
IOException,
VisADException
getBlockCount in interface FormBlockReaderid - The file for which to get a block count.
BadFormException
IOException
VisADException
public void close()
throws BadFormException,
IOException,
VisADException
close in interface FormBlockReaderBadFormException
IOException
VisADExceptionpublic boolean isThisType(String name)
isThisType in interface FormFileInformername - name of the file
public boolean isThisType(byte[] block)
isThisType in interface FormFileInformerblock - block of bytes from file
public String[] getDefaultSuffixes()
getDefaultSuffixes in interface FormFileInformerpublic double getPercentComplete()
getPercentComplete in interface FormProgressInformer
public Object getMetadataValue(String id,
String field)
throws BadFormException,
IOException,
VisADException
getMetadataValue in interface MetadataReaderfield - the name associated with the metadata field
BadFormException
IOException
VisADException
public Hashtable getMetadata(String id)
throws BadFormException,
IOException,
VisADException
getMetadata in interface MetadataReaderid - the filename
BadFormException
IOException
VisADException
public Object getOMENode(String id)
throws BadFormException,
IOException,
VisADException
getOMENode in interface OMEReaderBadFormException - if the loci.ome.xml package is not present
IOException
VisADException
public static void main(String[] args)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||