visad.data.mcidas
Class AreaAdapter
- java.lang.Object
-
- visad.data.mcidas.AreaAdapter
-
public class AreaAdapter extends java.lang.Objectthis is an adapter for McIDAS AREA images
-
-
Constructor Summary
Constructors Constructor and Description AreaAdapter(java.lang.String imageSource)Create a VisAD FlatField from a local McIDAS AREA file or a URL.AreaAdapter(java.lang.String imageSource, boolean pack)Create a VisAD FlatField from a local McIDAS AREA file or a URL.AreaAdapter(java.lang.String imageSource, int cal)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 informationAreaAdapter(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 parametersAreaAdapter(java.lang.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 parametersAreaAdapter(java.lang.String imageSource, int startLine, int startEle, int numLines, int numEles, int lineMag, int eleMag, int band)Create a VisAD FlatField from a local McIDAS AREA subsected according to the parametersAreaAdapter(java.lang.String imageSource, int startLine, int startEle, int numLines, int numEles, int lineMag, int eleMag, int band, boolean pack)Create a VisAD FlatField from a local McIDAS AREA subsected according to the parametersAreaAdapter(java.lang.String imageSource, int startLine, int startEle, int numLines, int numEles, int lineMag, int eleMag, int cal, int band)Create a VisAD FlatField from a local McIDAS AREA subsected according to the parametersAreaAdapter(java.lang.String imageSource, int startLine, int startEle, int numLines, int numEles, int lineMag, int eleMag, int cal, int band, boolean pack)Create a VisAD FlatField from a local McIDAS AREA subsected according to the parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AreaDirectorygetAreaDirectory()get the AreaDirectory of the imageAreaFilegetAreaFile()Get the instance of the AreaFile used herein.CoordinateSystemgetCoordinateSystem()get the CoordinateSystem of the imageFlatFieldgetData()Return a FlatField representing the image.int[]getDimensions()get the dimensions of the imageSingleBandedImagegetImage()Retrieves the first (and/or only) band in an image as a SingleBandedImageDateTimegetImageStartTime()Retrieves the time of the start of the image scan as a VisAD DateTime.DateTimegetNominalTime()Retrieves the "nominal" time of the image as a VisAD DateTime.
-
-
-
Constructor Detail
-
AreaAdapter
public AreaAdapter(java.lang.String imageSource) throws java.io.IOException, VisADExceptionCreate 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 cal) throws java.io.IOException, VisADExceptionCreate a VisAD FlatField from a local McIDAS AREA file or a URL.- Parameters:
imageSource- name of local file or a URL to locate file.cal- type of calibration to perform on retrieved data; ignored if 'unit' is specified inimageSource.- 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, boolean pack) throws java.io.IOException, VisADExceptionCreate 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:
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, VisADExceptionCreate 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 readnumEles- 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, VisADExceptionCreate 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 readnumEles- number of elements to readband- band number to get- 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, boolean pack) throws java.io.IOException, VisADExceptionCreate 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 readnumEles- number of elements to readband- band number to getpack- pack data if possible. If calibration is BRIT, images are packed into bytes- 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 lineMag, int eleMag, int band) throws java.io.IOException, VisADExceptionCreate 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 readnumEles- number of elements to readband- band number to getlineMag- magnification for lineseleMag- magnification for elements- 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 lineMag, int eleMag, int cal, int band) throws java.io.IOException, VisADExceptionCreate 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 readnumEles- number of elements to readlineMag- magnification for lineseleMag- magnification for elementscal- type of calibration to perform on retrieved data; ignored if 'unit' is specified inimageSource.band- band number to get- 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 lineMag, int eleMag, int band, boolean pack) throws java.io.IOException, VisADExceptionCreate 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 readnumEles- number of elements to readband- band number to getlineMag- magnification for lineseleMag- magnification for elementspack- pack data if possible. If calibration is BRIT, images are packed into bytes- 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 lineMag, int eleMag, int cal, int band, boolean pack) throws java.io.IOException, VisADExceptionCreate 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 readnumEles- number of elements to readlineMag- magnification for lineseleMag- magnification for elementscal- type of calibration to perform on retrieved data; ignored if 'unit' is specified inimageSource.band- band number to getpack- pack data if possible. If calibration is BRIT, images are packed into bytes- Throws:
java.io.IOException- if there was a problem reading the file.VisADException- if an unexpected problem occurs.
-
-
Method Detail
-
getAreaFile
public AreaFile getAreaFile()
Get the instance of the AreaFile used herein. Do NOT attempt to then use the AreaFile.getData() method!! Use this AreaAdapter's getData() method to fetch the FlatField containing the data values.- Returns:
- the instance of the AreaFile
-
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.- Returns:
- nominal image time
- 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.- Returns:
- time of the start of the image scan
- 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
-
-
DMelt 3.0 © DataMelt by jWork.ORG