visad.data
Class AreaImageAccessor

java.lang.Object
  extended by visad.data.AreaImageAccessor
All Implemented Interfaces:
Comparable<AreaImageAccessor>, FlatFieldCacheAccessor

public class AreaImageAccessor
extends Object
implements FlatFieldCacheAccessor, Comparable<AreaImageAccessor>

Knows how to read local satellite data to be used by a cache adaptor. TODO: Add capability to work in conjunciton with ADDE data sources including the IDV ucar.visad.data.CachedFlatField.


Constructor Summary
AreaImageAccessor(String source, int band, int[][][] readCache)
          Create an instance.
 
Method Summary
 int compareTo(AreaImageAccessor that)
           
protected  int[][][] getAreaData()
           
 Date getNominalTime()
           
 String getSource()
           
 boolean isAddeSource()
           
 double[][] readFlatField()
           
 float[][] readFlatFieldFloats()
           
 void setAreaParams(int startLine, int numLines, int lineMag, int startElem, int numElems, int elemMag)
          Set AREA file subsetting parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AreaImageAccessor

public AreaImageAccessor(String source,
                         int band,
                         int[][][] readCache)
                  throws VisADException
Create an instance. No data is read at this time.

Parameters:
source - As described in AreaFileFactory.getAreaFileInstance(String).
band - The band number of the image.
readCache - Array to use as a cache for reading AREA data into. If null data will not be read by-reference. See AreaFile.getData(int[][][]).
Throws:
VisADException
Method Detail

setAreaParams

public void setAreaParams(int startLine,
                          int numLines,
                          int lineMag,
                          int startElem,
                          int numElems,
                          int elemMag)
Set AREA file subsetting parameters.

Parameters:
startLine -
numLines -
lineMag -
startElem -
numElems -
elemMag -

isAddeSource

public boolean isAddeSource()

getAreaData

protected int[][][] getAreaData()
                         throws AreaFileException,
                                AddeURLException
Throws:
AreaFileException
AddeURLException

getSource

public String getSource()

readFlatField

public double[][] readFlatField()
Specified by:
readFlatField in interface FlatFieldCacheAccessor

readFlatFieldFloats

public float[][] readFlatFieldFloats()
Specified by:
readFlatFieldFloats in interface FlatFieldCacheAccessor

getNominalTime

public Date getNominalTime()

compareTo

public int compareTo(AreaImageAccessor that)
Specified by:
compareTo in interface Comparable<AreaImageAccessor>