visad.data.qt
Class QTForm

java.lang.Object
  extended by visad.data.FormNode
      extended by visad.data.Form
          extended by visad.data.qt.QTForm
All Implemented Interfaces:
FormFileInformer

public class QTForm
extends Form
implements FormFileInformer

QTForm is the VisAD data form for QuickTime movie files. To use it, QuickTime for Java must be installed. Much of this form's code was adapted from Wayne Rasband's QuickTime Movie Opener and QuickTime Movie Writer plugins for ImageJ (available at http://rsb.info.nih.gov/ij/).


Field Summary
static int FRAME_RATE
           
 
Fields inherited from class visad.data.Form
mathType
 
Constructor Summary
QTForm()
          Constructs a new QuickTime movie file form.
 
Method Summary
 void add(java.lang.String id, Data data, boolean replace)
          Adds data to an existing QuickTime movie.
 java.lang.String[] getDefaultSuffixes()
          Returns the default file suffixes for the QuickTime movie formats.
 FormNode getForms(Data data)
          Return the data forms that are compatible with a data object.
 boolean isThisType(byte[] block)
          Checks if the given block is a valid header for a QuickTime movie.
 boolean isThisType(java.lang.String name)
          Checks if the given string is a valid filename for a QuickTime movie.
static void main(java.lang.String[] args)
          Run 'java visad.data.qt.QTForm in_file out_file' to convert in_file to out_file in QuickTime movie format.
 DataImpl open(java.lang.String id)
          Opens an existing QuickTime movie from the given location.
 DataImpl open(java.net.URL url)
          Opens an existing QuickTime movie from the given URL.
 void save(java.lang.String id, Data data, boolean replace)
          Saves a VisAD Data object to a QuickTime movie at the given location.
 
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

FRAME_RATE

public static final int FRAME_RATE
See Also:
Constant Field Values
Constructor Detail

QTForm

public QTForm()
Constructs a new QuickTime movie file form.

Method Detail

isThisType

public boolean isThisType(java.lang.String name)
Checks if the given string is a valid filename for a QuickTime movie.

Specified by:
isThisType in interface FormFileInformer

isThisType

public boolean isThisType(byte[] block)
Checks if the given block is a valid header for a QuickTime movie.

Specified by:
isThisType in interface FormFileInformer

getDefaultSuffixes

public java.lang.String[] getDefaultSuffixes()
Returns the default file suffixes for the QuickTime movie formats.

Specified by:
getDefaultSuffixes in interface FormFileInformer

save

public void save(java.lang.String id,
                 Data data,
                 boolean replace)
          throws BadFormException,
                 java.io.IOException,
                 java.rmi.RemoteException,
                 VisADException
Saves a VisAD Data object to a QuickTime movie at the given location.

Specified by:
save in class FormNode
Throws:
BadFormException
java.io.IOException
java.rmi.RemoteException
VisADException

add

public void add(java.lang.String id,
                Data data,
                boolean replace)
         throws BadFormException
Adds data to an existing QuickTime movie.

Specified by:
add in class FormNode
Throws:
BadFormException - Always thrown (method is not implemented).

open

public DataImpl open(java.lang.String id)
              throws BadFormException,
                     java.io.IOException,
                     VisADException
Opens an existing QuickTime movie from the given location.

Specified by:
open in class FormNode
Returns:
VisAD Data object containing QuickTime data.
Throws:
BadFormException
java.io.IOException
VisADException

open

public DataImpl open(java.net.URL url)
              throws BadFormException,
                     java.io.IOException,
                     VisADException
Opens an existing QuickTime movie from the given URL.

Specified by:
open in class FormNode
Throws:
BadFormException - Always thrown (method is not implemented).
java.io.IOException
VisADException

getForms

public FormNode getForms(Data data)
Description copied from class: FormNode
Return the data forms that are compatible with a data object.

Specified by:
getForms in class FormNode

main

public static void main(java.lang.String[] args)
                 throws VisADException,
                        java.rmi.RemoteException,
                        java.io.IOException
Run 'java visad.data.qt.QTForm in_file out_file' to convert in_file to out_file in QuickTime movie format.

Throws:
VisADException
java.rmi.RemoteException
java.io.IOException