## visad.data.mcidas
Class AreaAdapter

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

public class AreaAdapter
extends Object

this is an adapter for McIDAS AREA images

Constructor Summary
`AreaAdapter(String imageSource)` Create a VisAD FlatField from a local McIDAS AREA file or a URL.
`AreaAdapter(String imageSource, boolean pack)` Create a VisAD FlatField from a local McIDAS AREA file or a URL.
`AreaAdapter(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(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
`AreaAdapter(String imageSource, int startLine, int startEle, int numLines, int numEles, int band, boolean pack)` 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(String imageSource)
                throws 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:
  `IOException` - if there was a problem reading the file.
  `VisADException` - if an unexpected problem occurs.

### AreaAdapter

    public AreaAdapter(String imageSource,
                       boolean pack)
                throws 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.
  `pack` - pack data if possible. If calibration is BRIT, images are packed into bytes
Throws:
  `IOException` - if there was a problem reading the file.
  `VisADException` - if an unexpected problem occurs.

### AreaAdapter

    public AreaAdapter(String imageSource,
                       int startLine,
                       int startEle,
                       int numLines,
                       int numEles)
                throws 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:
  `IOException` - if there was a problem reading the file.
  `VisADException` - if an unexpected problem occurs.

### AreaAdapter

    public AreaAdapter(String imageSource,
                       int startLine,
                       int startEle,
                       int numLines,
                       int numEles,
                       int band)
                throws 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:
  `IOException` - if there was a problem reading the file.
  `VisADException` - if an unexpected problem occurs.

### AreaAdapter

    public AreaAdapter(String imageSource,
                       int startLine,
                       int startEle,
                       int numLines,
                       int numEles,
                       int band,
                       boolean pack)
                throws 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
  `pack` - pack data if possible. If calibration is BRIT, images are packed into bytes
Throws:
  `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:

  - Domain - Linear2DSet of (ImageLine, ImageElement) with AREACoordinateSystem to Lat/Lon (may be null).
  - Range - One or more bands. If calibration type is BRIT, Integer1DSets are used as the range sets with length 255. (brightness 255 is same as 254).

  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`