Class HybridView

java.lang.Object
noaa.coastwatch.render.EarthDataView
noaa.coastwatch.render.HybridView
All Implemented Interfaces:
Cloneable, Renderable

public class HybridView extends EarthDataView

The HybridView class is an earth data view that combines a set of data views. The hybrid view is a combination of data view layers with masks that control the transparency of each layer.

Since:
3.7.1
Author:
Peter Hollemans
  • Constructor Details

    • HybridView

      public HybridView(List<EarthDataView> viewList, List<MaskOverlay> maskList)
      Constructs a new hybrid view.
      Parameters:
      viewList - the list of views to create a hybrid. The views are composited starting with index 0.
      maskList - the list of mask overlays that determine which of the view pixels should be used in the hybrid. If a mask overlay pixel is active, the corresponding view pixel is made transparent. If a mask overlay is null, the image view is not masked.
  • Method Details

    • setImageAffine

      public void setImageAffine(AffineTransform affine)
      Description copied from class: EarthDataView
      Sets the image affine transform. When the view is rendered, the new image affine will be used to transform the image coordinates prior to rendering. Any overlays rendered will be unaffected.
      Overrides:
      setImageAffine in class EarthDataView
      Parameters:
      affine - the image affine transform, or null for no transform.
    • setVerbose

      public void setVerbose(boolean flag)
      Description copied from class: EarthDataView
      Sets the verbose mode flag.
      Overrides:
      setVerbose in class EarthDataView
    • invalidate

      public void invalidate()
      Description copied from class: EarthDataView
      Invalidates the view. This causes the view to be completely reconstructed upon the next call to render().
      Overrides:
      invalidate in class EarthDataView
    • setCenter

      public void setCenter(DataLocation center) throws NoninvertibleTransformException
      Description copied from class: EarthDataView
      Sets the view center to a new data location. The image dimensions and image scaling factor are unaffected.
      Overrides:
      setCenter in class EarthDataView
      Parameters:
      center - the new center data location.
      Throws:
      NoninvertibleTransformException - if the image to data transform is not invertible.
    • setCenterAndScale

      public void setCenterAndScale(DataLocation center, double scale) throws NoninvertibleTransformException
      Description copied from class: EarthDataView
      Set the center and scale of this view
      Overrides:
      setCenterAndScale in class EarthDataView
      Parameters:
      center - the new center data location.
      scale - the new scaling factor for the view (desired ratio of data pixels to image pixels).
      Throws:
      NoninvertibleTransformException
      See Also:
    • resize

      public void resize(double factor) throws NoninvertibleTransformException
      Description copied from class: EarthDataView
      Changes the view size by the specified factor. The view dimensions are changed, as well as the data to image scaling so that the same data is displayed in the resized view. The center data location is unaffected.
      Overrides:
      resize in class EarthDataView
      Parameters:
      factor - the factor by which to change the view size. Factors greater than 1 increase the view size and factors less than 1 decrease the view size.
      Throws:
      NoninvertibleTransformException - if the image to data transform is not invertible.
    • reset

      public void reset() throws NoninvertibleTransformException
      Description copied from class: EarthDataView
      Resets the view to the full data resolution. The center data location is reset to the center of the data, the image:data scaling factor to 1, and the image dimensions to the full data dimensions.
      Overrides:
      reset in class EarthDataView
      Throws:
      NoninvertibleTransformException - if the image to data transform is not invertible.
    • setSize

      public void setSize(Dimension imageDims) throws NoninvertibleTransformException
      Description copied from class: EarthDataView
      Sets the view to a new size. The data center location and image scaling factor remain unaffected.
      Overrides:
      setSize in class EarthDataView
      Parameters:
      imageDims - the new image dimensions.
      Throws:
      NoninvertibleTransformException - if the image to data transform is not invertible.
    • getLegend

      public Legend getLegend()
      Description copied from class: EarthDataView
      Gets a legend for annotation of the data view. This default method returns null, but subclasses may override this method to provide a legend.
      Overrides:
      getLegend in class EarthDataView
      Returns:
      a legend or null if no legend is available.
    • clone

      public Object clone()
      Description copied from class: EarthDataView
      Creates and returns a copy of this object. Child classes should override this method if they contain any deep structure that needs copying.
      Overrides:
      clone in class EarthDataView
    • prepare

      protected void prepare(Graphics2D g)
      Description copied from class: EarthDataView
      Prepares this view for rendering using the specified graphics object. This method is called when any changes have occurred that require the view to be completely reconstructed, such as a change in view size or data window.
      Specified by:
      prepare in class EarthDataView