## visad.util
Class DualRes

    java.lang.Object
      visad.util.DualRes

Direct Known Subclasses:
  ResSwitcher

public class DualRes
extends Object

Maintains two representations for a given data reference: one at high (normal) resolution, and one at low (scaled-down) resolution. When greater rendering speed is necessary, programs can utilize the computed low-resolution data. When more detail is required, programs can switch back to the hi-resolution data.

Field Summary
`static boolean` `DEBUG` Debugging flag.
`protected DataReferenceImpl` `hi_ref` High-resolution data reference.
`protected DataReferenceImpl` `lo_ref` Low-resolution data reference.

Constructor Summary
`DualRes(DataReferenceImpl ref)` Constructs an object to maintain both high- and low-resolution representations for the referenced data.

Method Summary
`DataReferenceImpl` `getHighResReference()` Gets the DataReference corresponding to the full-resolution data.
`DataReferenceImpl` `getLowResReference()` Gets the DataReference corresponding to the scaled-down data.
`double` `getResolutionScale()` Gets the factor by which the low-resolution representation is scaled down from the high-resolution one.
`static FieldImpl` `rescale(FieldImpl field, double scale)` Rescales a field by the given scale factor.
`static FieldImpl` `rescale(FieldImpl field, int[] lengths)` Rescales a field by the given scale factor.
`void` `setResolutionScale(double scale)` Sets the factor by which the low-resolution representation is scaled down from the high-resolution one.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEBUG

    public static boolean DEBUG

  Debugging flag.

### hi_ref

    protected DataReferenceImpl hi_ref

  High-resolution data reference.

### lo_ref

    protected DataReferenceImpl lo_ref

  Low-resolution data reference.

Constructor Detail

### DualRes

    public DualRes(DataReferenceImpl ref)
            throws VisADException,
                   RemoteException

  Constructs an object to maintain both high- and low-resolution representations for the referenced data.

Method Detail

### rescale

    public static FieldImpl rescale(FieldImpl field,
                                    double scale)
                             throws VisADException,
                                    RemoteException

  Rescales a field by the given scale factor.

  Throws:
    `VisADException`
    `RemoteException`

### rescale

    public static FieldImpl rescale(FieldImpl field,
                                    int[] lengths)
                             throws VisADException,
                                    RemoteException

  Rescales a field by the given scale factor.

  Throws:
    `VisADException`
    `RemoteException`

### setResolutionScale

    public void setResolutionScale(double scale)
                            throws VisADException

  Sets the factor by which the low-resolution representation is scaled down from the high-resolution one.

  Throws:
    `VisADException`

### getResolutionScale

    public double getResolutionScale()

  Gets the factor by which the low-resolution representation is scaled down from the high-resolution one.

### getHighResReference

    public DataReferenceImpl getHighResReference()

  Gets the DataReference corresponding to the full-resolution data.

### getLowResReference

    public DataReferenceImpl getLowResReference()

  Gets the DataReference corresponding to the scaled-down data.