visad.data.mcidas
Class AreaAdapter

java.lang.Object
  extended by visad.data.mcidas.AreaAdapter

public class AreaAdapter
extends java.lang.Object

this is an adapter for McIDAS AREA images


Constructor Summary
AreaAdapter(java.lang.String imageSource)
          Create a VisAD FlatField from a local McIDAS AREA file or a URL.
AreaAdapter(java.lang.String imageSource, int startLine, int startEle, int numLines, int numEles)
          Create a VisAD FlatField from a local McIDAS AREA file using the subsecting information
AreaAdapter(java.lang.String imageSource, int startLine, int startEle, int numLines, int numEles, int band)
          Create a VisAD FlatField from a local McIDAS AREA subsected according to the parameters
 
Method Summary
 AreaDirectory getAreaDirectory()
          get the AreaDirectory of the image
 CoordinateSystem getCoordinateSystem()
          get the CoordinateSystem of the image
 FlatField getData()
          Return a FlatField representing the image.
 int[] getDimensions()
          get the dimensions of the image
 SingleBandedImage getImage()
          Retrieves the first (and/or only) band in an image as a SingleBandedImage
 DateTime getImageStartTime()
          Retrieves the time of the start of the image scan as a VisAD DateTime.
 DateTime getNominalTime()
          Retrieves the "nominal" time of the image as a VisAD DateTime.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AreaAdapter

public AreaAdapter(java.lang.String imageSource)
            throws java.io.IOException,
                   VisADException
Create a VisAD FlatField from a local McIDAS AREA file or a URL.

Parameters:
imageSource - name of local file or a URL to locate file.
Throws:
java.io.IOException - if there was a problem reading the file.
VisADException - if an unexpected problem occurs.

AreaAdapter

public AreaAdapter(java.lang.String imageSource,
                   int startLine,
                   int startEle,
                   int numLines,
                   int numEles)
            throws java.io.IOException,
                   VisADException
Create a VisAD FlatField from a local McIDAS AREA file using the subsecting information

Parameters:
imageSource - name of local file or a URL to locate file.
startLine - starting line from the file (AREA coordinates)
startEle - starting element from the file (AREA coordinates)
numLines - number of lines to read
numEles - number of elements to read
Throws:
java.io.IOException - if there was a problem reading the file.
VisADException - if an unexpected problem occurs.

AreaAdapter

public AreaAdapter(java.lang.String imageSource,
                   int startLine,
                   int startEle,
                   int numLines,
                   int numEles,
                   int band)
            throws java.io.IOException,
                   VisADException
Create a VisAD FlatField from a local McIDAS AREA subsected according to the parameters

Parameters:
imageSource - name of local file or a URL to locate file.
startLine - starting line from the file (AREA coordinates)
startEle - starting element from the file (AREA coordinates)
numLines - number of lines to read
numEles - number of elements to read
band - band number to get
Throws:
java.io.IOException - if there was a problem reading the file.
VisADException - if an unexpected problem occurs.
Method Detail

getDimensions

public int[] getDimensions()
get the dimensions of the image

Returns:
dim[0]=number of bands, dim[1] = number of elements, dim[2] = number of lines

getCoordinateSystem

public CoordinateSystem getCoordinateSystem()
get the CoordinateSystem of the image

Returns:
the CoordinateSystem object

getAreaDirectory

public AreaDirectory getAreaDirectory()
get the AreaDirectory of the image

Returns:
the AreaDirectory object

getData

public FlatField getData()
Return a FlatField representing the image. The field will look like the following:

Returns:
image as a FlatField

getNominalTime

public DateTime getNominalTime()
                        throws VisADException
Retrieves the "nominal" time of the image as a VisAD DateTime. This may or may not be the start of the image scan. Values are derived from the 4th and 5th words in the AREA file directory.

Throws:
VisADException
See Also:
McIDAS Programmer's Manual, getImageStartTime()

getImageStartTime

public DateTime getImageStartTime()
                           throws VisADException
Retrieves the time of the start of the image scan as a VisAD DateTime. Values are derived from the 46th and 47th words in the AREA file directory.

Throws:
VisADException
See Also:
McIDAS Programmer's Manual, getNominalTime()

getImage

public SingleBandedImage getImage()
                           throws VisADException
Retrieves the first (and/or only) band in an image as a SingleBandedImage

Returns:
SingleBandedImage representation of the FlatField from getData(). If there is navigation associated with the image, the returned image is a NavigatedImage.
Throws:
VisADException