Documentation of 'visad.data.AreaImageCacheAdapter' Java class
AreaImageCacheAdapter
visad.data

Class AreaImageCacheAdapter

    • Method Detail

      • getId

        public java.lang.String getId()
      • getSample

        public Data getSample(int index)
                       throws VisADException,
                              java.rmi.RemoteException
        Description copied from class: FlatField
        Get the range value at the index-th sample. FlatField does not override evaluate, but the correctness of FlatField.evaluate depends on overriding getSample
        Specified by:
        getSample in interface Field
        Overrides:
        getSample in class FlatField
        Parameters:
        index - index of requested range sample
        Returns:
        Data object (Real, RealTuple, or Tuple) corresponding to the range at the index-th sample.
        Throws:
        VisADException - problem getting data
        java.rmi.RemoteException - problem getting data from remote object
      • getDomainUnits

        public Unit[] getDomainUnits()
        Description copied from class: FieldImpl
        Returns the units of the values in the domain set. The units may differ from the default units of the underlying MathType of the domain, but will be convertible with them.
        Specified by:
        getDomainUnits in interface Function
        Overrides:
        getDomainUnits in class FieldImpl
        Returns:
        The units of the values in the domain set.
      • getRangeCoordinateSystem

        public CoordinateSystem[] getRangeCoordinateSystem()
                                                    throws TypeException
        Description copied from class: FlatField
        Returns the range CoordinateSystem assuming that the range type is a RealTupleType (and throws a TypeException if its not). This may differ from default CoordinateSystem of range RealTupleType, but must be convertable; the index has length = 1 (since all samples have the same Units).
        Specified by:
        getRangeCoordinateSystem in interface Field
        Overrides:
        getRangeCoordinateSystem in class FlatField
        Returns:
        The CoordinateSystem of the RealTuple range. Will not be null and will be of length 1.
        Throws:
        TypeException - The type of the range is neither RealType nor RealTupleType.
      • getRangeCoordinateSystem

        public CoordinateSystem[] getRangeCoordinateSystem(int component)
                                                    throws TypeException
        Description copied from class: FlatField
        Returns the CoordinateSystem of a component of the range. The MathType of the range shall be a TupleType.
        Specified by:
        getRangeCoordinateSystem in interface Field
        Overrides:
        getRangeCoordinateSystem in class FlatField
        Parameters:
        component - The index of the component. The value shall be greater than or equal to zero and less that the number of components in the TupleType of the range.
        Returns:
        The CoordinateSystem of the i-th component. Won't be null and will be of length 1. The single element might be null.
        Throws:
        TypeException - The type of the range is either RealType or RealTupleType.
      • getRangeUnits

        public Unit[][] getRangeUnits()
        Description copied from class: FlatField
        return array of Units associated with each RealType component of range; these may differ from default Units of range RealTypes, but must be convertable; the second index has length = 1 (since all samples have the same Units)
        Specified by:
        getRangeUnits in interface Field
        Overrides:
        getRangeUnits in class FlatField
      • getDefaultRangeUnits

        public Unit[] getDefaultRangeUnits()
        Description copied from class: FlatField
        Get default range Unit-s for 'Flat' components.
        Specified by:
        getDefaultRangeUnits in interface Field
        Overrides:
        getDefaultRangeUnits in class FlatField
        Returns:
        array of the default Units for each of the RealTypes components in the flattened range.
      • getValues

        public double[][] getValues()
                             throws VisADException
        Description copied from class: FlatField
        Returns the range values in their default units as doubles.
        Specified by:
        getValues in interface Field
        Overrides:
        getValues in class FlatField
        Returns:
        The range values in their default units as determined by the MathType of the range. Element [i][j] is the jth sample value of the ith component of the range.
        Throws:
        VisADException - if a VisAD object couldn't be created.
      • getValues

        public double[][] getValues(boolean copy)
                             throws VisADException
        Description copied from class: FlatField
        Returns the range values in their default units as doubles.
        Specified by:
        getValues in interface Field
        Overrides:
        getValues in class FlatField
        Parameters:
        copy - Whether or not the returned array might be the actual range array. If true, then the returned array will not be the actual range array.
        Returns:
        The range values in their default units as determined by the MathType of the range. Element [i][j] is the jth sample value of the ith component of the range.
        Throws:
        VisADException - if a VisAD object couldn't be created.
      • getValues

        public double[] getValues(int index)
                           throws VisADException
        Description copied from class: FlatField
        Get values for 'Flat' components in default range Unit-s.
        Specified by:
        getValues in interface FlatFieldIface
        Overrides:
        getValues in class FlatField
        Returns:
        The range values in their default units as determined by the MathType of the range. Element [i] is the value of the ith component of the flattened range.
        Throws:
        VisADException - if a VisAD object couldn't be created.
      • getFloats

        public float[][] getFloats(boolean copy)
                            throws VisADException
        Description copied from class: FlatField
        Returns the range values in their default units as floats.
        Specified by:
        getFloats in interface Field
        Overrides:
        getFloats in class FlatField
        Parameters:
        copy - Whether or not the returned array might be the actual range array. If true, then the returned array will not be the actual range array.
        Returns:
        The range values in their default units as determined by the MathType of the range. Element [i][j] is the jth sample value of the ith component of the range.
        Throws:
        VisADException - if a VisAD object couldn't be created.
      • getDomainSet

        public Set getDomainSet()
        Description copied from class: FieldImpl

        Returns the domain-set of this instance. The actual set is returned: it is not a copy or a clone.

        Note that it is possible to simultaneously modify the domain-set of both this instance and of a clone by modifying the values in the array returned by invoking getSamples(false) on the domain-set of either this instance or the clone. Don't do this unless you enjoy debugging.

        Specified by:
        getDomainSet in interface Field
        Overrides:
        getDomainSet in class FieldImpl
        Returns:
        The actual domain-set of this instance.
      • setSample

        public void setSample(int index,
                              Data range)
                       throws VisADException,
                              java.rmi.RemoteException
        Description copied from class: FlatField
        Set the range value at the index-th sample
        Specified by:
        setSample in interface Field
        Overrides:
        setSample in class FlatField
        Parameters:
        index - index to set
        range - range value to set
        Throws:
        VisADException - if range's MathType is incompatible or some other error.
        java.rmi.RemoteException - if the Remote object couldn't be created.
      • setSample

        public void setSample(int index,
                              Data range,
                              boolean copy)
                       throws VisADException,
                              java.rmi.RemoteException
        Description copied from class: FlatField
        Set the range value at the index-th sample
        Specified by:
        setSample in interface Field
        Overrides:
        setSample in class FlatField
        Parameters:
        index - index to set
        range - range value to set
        copy - flag to copy values - meaningless for FlatField
        Throws:
        VisADException - if range's MathType is incompatible or some other error.
        java.rmi.RemoteException - if the Remote object couldn't be created.
      • setSamples

        public void setSamples(double[][] data)
                        throws java.rmi.RemoteException,
                               VisADException
        Description copied from class: FlatField
        set range array as range values of this FlatField; the array is dimensioned double[number_of_range_components][number_of_range_samples]; the order of range values must be the same as the order of domain indices in the DomainSet
        Specified by:
        setSamples in interface Field
        Overrides:
        setSamples in class FlatField
        Throws:
        java.rmi.RemoteException
        VisADException
      • setSamples

        public void setSamples(double[][] range,
                               ErrorEstimate[] errors,
                               boolean copy)
                        throws VisADException,
                               java.rmi.RemoteException
        Description copied from class: SingleBandedImageImpl
        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. Overridden so we can set max and min values.
        Specified by:
        setSamples in interface FlatFieldIface
        Overrides:
        setSamples in class SingleBandedImageImpl
        Parameters:
        range - pixel values as doubles
        errors - ErrorEstimates for values (may be null);
        copy - flag to make a copy of value array or not
        Throws:
        VisADException - couldn't set values
        java.rmi.RemoteException - couldn't set remote object
      • isMissing

        public boolean isMissing()
        Description copied from class: FlatField
        Test whether range values are missing
        Specified by:
        isMissing in interface Data
        Overrides:
        isMissing in class FlatField
        Returns:
        true if the range values have not been set
      • binary

        public Data binary(Data data,
                           int op,
                           MathType new_type,
                           int sampling_mode,
                           int error_mode)
                    throws VisADException,
                           java.rmi.RemoteException
        Description copied from class: FlatField
        Return new Field with value 'this op data'. test for various relations between types of this and data; note return type may not be FlatField, in case data is a Field and this matches its range
        Specified by:
        binary in interface Data
        Overrides:
        binary in class FlatField
        Parameters:
        data - object to operate on
        op - operation to perform (e.g. ADD, SUB, MULT)
        new_type - MathType of new object
        sampling_mode - sampling mode to use (e.g., NEAREST_NEIGHBOR, WEIGHTED_AVERAGE)
        error_mode - error estimate mode (e.g., NO_ERROR, DEPENDENT, independent)
        Returns:
        new Field corresponding to the requested operation
        Throws:
        VisADException - couldn't create new VisAD object
        java.rmi.RemoteException - couldn't create new Remote object
      • unary

        public Data unary(int op,
                          MathType new_type,
                          int sampling_mode,
                          int error_mode)
                   throws VisADException
        Description copied from class: SatelliteImage
        return new SatelliteImage with value 'op this'
        Specified by:
        unary in interface Data
        Overrides:
        unary in class SatelliteImage
        Parameters:
        op - operation to perform (e.g., NOP, ABS, COS)
        new_type - MathType of new object
        sampling_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
      • domainFactor

        public Field domainFactor(RealType factor)
                           throws VisADException,
                                  java.rmi.RemoteException
        Description copied from class: FieldImpl
        Factors this instance into a (nested) field-of-fields. The type of the domain of the outer field will be the type specified. The type of the domains of the inner fields will be the remainder of the original domain after the outer domain is factored out. Range data is not copied for FieldImpls, but will be for FlatFields.
        Specified by:
        domainFactor in interface Field
        Overrides:
        domainFactor in class FieldImpl
        Parameters:
        factor - The type of the domain for the outer field.
        Returns:
        The field-of-fields realization of this instance.
        Throws:
        DomainException - The domain of this instance cannot be factored as requested.
        VisADException - VisAD failure.
        java.rmi.RemoteException - Java RMI failure.
        See Also:
        for copy information
      • resample

        public Field resample(Set set,
                              int sampling_mode,
                              int error_mode)
                       throws VisADException,
                              java.rmi.RemoteException
        Description copied from class: FlatField
        Resamples the range to domain samples of a given set. Resampling is either by nearest neighbor or mulit-linear interpolation. NOTE: This code is very similar to FieldImpl.resample(Set,int,int).
        Specified by:
        resample in interface Function
        Overrides:
        resample in class FlatField
        Parameters:
        set - The set of points at which to resample this field.
        sampling_mode - Resampling mode: Data.NEAREST_NEIGHBOR or Data.WEIGHTED_AVERAGE
        error_mode - Error estimation mode: Data.DEPENDENT, Data.INDEPENDENT, or Data.NO_ERRORS.
        Returns:
        Field of resampled data. RangeSet objects in result are set to DoubleSet. NOTE: May return this (i.e., not a copy).
        Throws:
        VisADException - unable to resample function
        java.rmi.RemoteException - Java RMI exception
      • computeRanges

        public DataShadow computeRanges(ShadowType type,
                                        DataShadow shadow)
                                 throws VisADException
        Description copied from interface: Data
        Recursive version of computeRanges(), called down through Data object tree.
        Specified by:
        computeRanges in interface Data
        Overrides:
        computeRanges in class FlatField
        Parameters:
        type - ShadowType generated for MathType of this
        shadow - DataShadow instance whose contained double[][] array and animation sampling Set are modified according to RealType values in this, and used as return value
        Returns:
        DataShadow instance containing double[][] array of RealType ranges, and an animation sampling Set
        Throws:
        VisADException - a VisAD error occurred
      • adjustSamplingError

        public Data adjustSamplingError(Data error,
                                        int error_mode)
                                 throws VisADException,
                                        java.rmi.RemoteException
        Description copied from class: FlatField
        return a FlatField that clones this, except its ErrorEstimate-s are adjusted for sampling errors in error
        Specified by:
        adjustSamplingError in interface Data
        Overrides:
        adjustSamplingError in class FlatField
        error_mode - may be Data.INDEPENDENT, Data.DEPENDENT or Data.NO_ERRORS;
        Returns:
        clone of this, except with ErrorEstimates set according to values in error
        Throws:
        VisADException - a VisAD error occurred
        java.rmi.RemoteException - an RMI error occurred
      • isFlatField

        public boolean isFlatField()
        Description copied from interface: Field
        return true if this a FlatField or a RemoteField adapting a FlatField
        Specified by:
        isFlatField in interface Field
        Overrides:
        isFlatField in class FlatField
      • clone

        public java.lang.Object clone()
        Clones this instance. This implementation violates the general clone() contract in that the returned object will compare unequal to this instance. As such, this method should probably not be invoked.
        Overrides:
        clone in class FlatField
        Returns:
        A clone of this instance.
      • longString

        public java.lang.String longString(java.lang.String pre)
        Specified by:
        longString in interface Data
        Overrides:
        longString in class FlatField
        Parameters:
        pre - String added to start of each line
        Returns:
        a longer String than returned by toString(), indented by pre (a string of blanks)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class FlatField
        Returns:
        a String representation of this

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.