visad.meteorology
Class SingleBandedImageImpl
- java.lang.Object
-
- visad.ThingImpl
-
- visad.DataImpl
-
- visad.FunctionImpl
-
- visad.FieldImpl
-
- visad.FlatField
-
- visad.meteorology.SingleBandedImageImpl
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Data, Field, FlatFieldIface, Function, SingleBandedImage, Thing
- Direct Known Subclasses:
- NavigatedImage, SatelliteImage
public class SingleBandedImageImpl extends FlatField implements SingleBandedImage
An implementation for representing single-banded planar satellite or radar imagery.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class visad.DataImpl
DataImpl.Syncher
-
-
Field Summary
-
Fields inherited from interface visad.Data
ABS, ACOS, ACOS_DEGREES, ADD, ASIN, ASIN_DEGREES, ATAN, ATAN_DEGREES, ATAN2, ATAN2_DEGREES, CEIL, COS, COS_DEGREES, DEGREES_TO_RADIANS, DEPENDENT, DIVIDE, EXP, FLOOR, INDEPENDENT, INV_ATAN2, INV_ATAN2_DEGREES, INV_DIVIDE, INV_POW, INV_REMAINDER, INV_SUBTRACT, LOG, MAX, MIN, MULTIPLY, NEAREST_NEIGHBOR, NEGATE, NO_ERRORS, NOP, POW, RADIANS_TO_DEGREES, REMAINDER, RINT, ROUND, SIN, SIN_DEGREES, SQRT, SUBTRACT, TAN, TAN_DEGREES, WEIGHTED_AVERAGE
-
-
Constructor Summary
Constructors Constructor and Description SingleBandedImageImpl(FlatField image, DateTime startTime, java.lang.String desc)Construct a SingleBandedImageImpl from a FlatField.SingleBandedImageImpl(FlatField image, DateTime startTime, java.lang.String desc, boolean copyData)Construct a SingleBandedImage from the FlatField specified.SingleBandedImageImpl(FunctionType function, Set domain, DateTime startTime, java.lang.String desc)Construct a SingleBandedImageImpl without any data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Databinary(Data data, int op, int samplingMode, int errorMode)Return the result of a binary operation between this instance and another operand.java.lang.StringgetDescription()Return a descriptive string for this image.float[][]getImageData()for effeciency provide access to the uncopied floatsRealgetMaxRangeValue()Get the maximum possible value for this imageRealgetMinRangeValue()Get the minimum possible value for this imageDateTimegetStartTime()Get the start time of the image.booleanisNavigated()Check to see if this image has a domain that can map to Latitude and Longitude.voidsetSamples(double[][] range, ErrorEstimate[] errors, boolean copy)Set the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet.voidsetSamples(float[][] range, ErrorEstimate[] errors, boolean copy)Set the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet.Dataunary(int op, int samplingMode, int errorMode)Return the result of a unary operation on this instance.Dataunary(int op, MathType new_type, int sampling_mode, int error_mode)return new SingleBandedImageImpl with value 'op this'-
Methods inherited from class visad.FlatField
adjustSamplingError, binary, clearMissing, clone, computeRanges, convertToField, derivative, derivative, derivative, derivative, derivative, equals, extract, extract, fillField, getDefaultRangeUnits, getFloats, getFloats, getRangeCoordinateSystem, getRangeCoordinateSystem, getRangeDimension, getRangeErrors, getRangeSets, getRangeUnits, getSample, getSample, getStringValues, getValues, getValues, getValues, grabBytes, isFlatField, isMissing, longString, main, makeField, makeField1, makeField2, resample, resampleDouble, setRangeErrors, setSample, setSample, setSamples, setSamples, setSamples, setSamples, setSamples, setSamples, setSamples, toString, unpackFloats, unpackValues
-
Methods inherited from class visad.FieldImpl
__getitem__, __len__, __setitem__, __setitem__, combine, combine, combine, combine, combine, domainEnumeration, domainFactor, domainFactor, domainMultiply, domainMultiply, domainMultiply, domainMultiply, extract, extract, getDomainCoordinateSystem, getDomainSet, getDomainUnits, getLength, setSample, setSample, setSample, setSamples
-
Methods inherited from class visad.FunctionImpl
__getitem__, __getitem__, evaluate, evaluate, evaluate, evaluate, getDomainDimension, resample
-
Methods inherited from class visad.DataImpl
__add__, __add__, __div__, __div__, __mod__, __mod__, __mul__, __mul__, __neg__, __pow__, __pow__, __radd__, __rdiv__, __rmod__, __rmul__, __rpow__, __rsub__, __sub__, __sub__, abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, ceil, ceil, changeMathType, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, max, max, min, min, multiply, multiply, negate, negate, notifyReferences, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees
-
Methods inherited from class visad.ThingImpl
addReference, removeReference
-
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface visad.Field
domainEnumeration, domainFactor, domainMultiply, domainMultiply, extract, getDefaultRangeUnits, getDomainSet, getFloats, getFloats, getLength, getRangeCoordinateSystem, getRangeCoordinateSystem, getRangeUnits, getSample, getStringValues, getValues, getValues, isFlatField, setSample, setSample, setSample, setSample, setSamples, setSamples, setSamples
-
Methods inherited from interface visad.Function
derivative, derivative, derivative, derivative, derivative, evaluate, evaluate, evaluate, evaluate, getDomainCoordinateSystem, getDomainDimension, getDomainUnits, resample, resample
-
Methods inherited from interface visad.Data
abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, adjustSamplingError, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, isMissing, local, log, log, longString, longString, max, max, min, min, multiply, multiply, negate, negate, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees
-
Methods inherited from interface visad.Thing
addReference, removeReference
-
-
-
-
Constructor Detail
-
SingleBandedImageImpl
public SingleBandedImageImpl(FunctionType function, Set domain, DateTime startTime, java.lang.String desc) throws VisADException
Construct a SingleBandedImageImpl without any data.- Parameters:
function- FunctionType for this image. It must have a Range that has only one (Real) component.domain- DomainSet for this image.startTime- starting time of the image.desc- description- Throws:
VisADException- couldn't create the SingleBandedImageImpl
-
SingleBandedImageImpl
public SingleBandedImageImpl(FlatField image, DateTime startTime, java.lang.String desc) throws VisADException
Construct a SingleBandedImageImpl from a FlatField.- Parameters:
image- FlatField representing an image. It must have a Range that only has one (Real) component.startTime- starting time of the image.desc- description- Throws:
VisADException- couldn't create the SingleBandedImageImpl
-
SingleBandedImageImpl
public SingleBandedImageImpl(FlatField image, DateTime startTime, java.lang.String desc, boolean copyData) throws VisADException
Construct a SingleBandedImage from the FlatField specified.- Parameters:
image- FlatField representing an image. It must have a Range that only has one (Real) component.startTime- starting time of the image.desc- descriptioncopyData- make a copy of the data on setSample call- Throws:
VisADException- couldn't create the SingleBandedImageImpl
-
-
Method Detail
-
getStartTime
public DateTime getStartTime()
Get the start time of the image.- Specified by:
getStartTimein interfaceSingleBandedImage- Returns:
- DateTime representing the start time of the image.
-
getDescription
public java.lang.String getDescription()
Return a descriptive string for this image.- Specified by:
getDescriptionin interfaceSingleBandedImage- Returns:
- description
-
getMinRangeValue
public Real getMinRangeValue()
Get the minimum possible value for this image- Specified by:
getMinRangeValuein interfaceSingleBandedImage- Returns:
- a Real representing the minimum possible value. Using a Real allows us to associate units and error estimates with the value
-
getMaxRangeValue
public Real getMaxRangeValue()
Get the maximum possible value for this image- Specified by:
getMaxRangeValuein interfaceSingleBandedImage- Returns:
- a Real representing the maximum possible value. Using a Real allows us to associate units and error estimates with the value
-
isNavigated
public boolean isNavigated()
Check to see if this image has a domain that can map to Latitude and Longitude.- Specified by:
isNavigatedin interfaceSingleBandedImage- Returns:
- true if it has navigation, otherwise false
-
setSamples
public void setSamples(float[][] range, ErrorEstimate[] errors, boolean copy) throws VisADException, java.rmi.RemoteExceptionSet the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet. Overridden so we can set max and min values.- Specified by:
setSamplesin interfaceFlatFieldIface- Overrides:
setSamplesin classFlatField- Parameters:
range- pixel values as doubleserrors- ErrorEstimates for values (may be null);copy- flag to make a copy of value array or not- Throws:
VisADException- couldn't set valuesjava.rmi.RemoteException- couldn't set remote object
-
setSamples
public void setSamples(double[][] range, ErrorEstimate[] errors, boolean copy) throws VisADException, java.rmi.RemoteExceptionSet the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet. Overridden so we can set max and min values.- Specified by:
setSamplesin interfaceFlatFieldIface- Overrides:
setSamplesin classFlatField- Parameters:
range- pixel values as doubleserrors- ErrorEstimates for values (may be null);copy- flag to make a copy of value array or not- Throws:
VisADException- couldn't set valuesjava.rmi.RemoteException- couldn't set remote object
-
unary
public Data unary(int op, MathType new_type, int sampling_mode, int error_mode) throws VisADException
return new SingleBandedImageImpl with value 'op this'- Specified by:
unaryin interfaceData- Overrides:
unaryin classFlatField- Parameters:
op- operation to perform (e.g., NOP, ABS, COS)new_type- MathType of new objectsampling_mode- sampling mode to use (e.g., NEAREST_NEIGHBOR, WEIGHTED_AVERAGE)error_mode- error estimate mode (e.g., NO_ERROR, DEPENDENT, independent)- Returns:
- new FlatField corresponding to the requested operation
- Throws:
VisADException- couldn't create new VisAD object
-
binary
public Data binary(Data data, int op, int samplingMode, int errorMode) throws VisADException, java.rmi.RemoteException
Return the result of a binary operation between this instance and another operand. If the other operand is an object of this class and the result of theDataImpl.binary(Data, int, int, int)method is aFlatFieldfrom which an object of this class can be constructed, then this method returns an instance of this class with a description determined by the input descriptions and the operation and a time equal to the average times of the input; otherwise, the object resulting from theFlatField.binary(visad.Data, int, visad.MathType, int, int)method is returned.- Specified by:
binaryin interfaceData- Overrides:
binaryin classDataImpl- Parameters:
data- The other operand of the operation.op- The operation to perform (e.g.Data.ADD,Data.DIVIDE, etc.).samplingMode- The sampling mode. One ofData.NEAREST_NEIGHBORorData.WEIGHTED_AVERAGE.errorMode- The error propagation mode. One ofData.NO_ERRORS,Data.INDEPENDENT, orData.DEPENDENT.- Returns:
- The result of the operation on this instance and the other operand.
- Throws:
VisADException- if a VisAD failure occurs.RemovetException- if a Java RMI failure occurs.java.rmi.RemoteException- an RMI error occurred
-
unary
public Data unary(int op, int samplingMode, int errorMode) throws VisADException, java.rmi.RemoteException
Return the result of a unary operation on this instance. If the result of theDataImpl.unary(int, int, int)method is aFlatFieldfrom which an object of this class can be constructed, then this method returns an instance of this class with a description determined by the input description and the operation and a time equal to the time of this instance; otherwise, the object resulting from theFlatField.unary(int, visad.MathType, int, int)method is returned.- Specified by:
unaryin interfaceData- Overrides:
unaryin classDataImpl- Parameters:
op- The operation to perform (e.g.Data.ABS,Data.COS, etc.).samplingMode- The sampling mode. One ofData.NEAREST_NEIGHBORorData.WEIGHTED_AVERAGE.errorMode- The error propagation mode. One ofData.NO_ERRORS,Data.INDEPENDENT, orData.DEPENDENT.- Returns:
- The result of the operation on this instance.
- Throws:
VisADException- if a VisAD failure occurs.RemovetException- if a Java RMI failure occurs.java.rmi.RemoteException- an RMI error occurred
-
getImageData
public float[][] getImageData() throws VisADExceptionfor effeciency provide access to the uncopied floats- Throws:
VisADException
-
-
DMelt 3.0 © DataMelt by jWork.ORG