Package noaa.coastwatch.render
Class HybridView
java.lang.Object
noaa.coastwatch.render.EarthDataView
noaa.coastwatch.render.HybridView
- All Implemented Interfaces:
Cloneable,Renderable
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
-
Field Summary
Fields inherited from class noaa.coastwatch.render.EarthDataView
changed, image, imageDims, overlays, progress, stopRendering, trans, UPDATE_FRACTION, verbose -
Constructor Summary
ConstructorsConstructorDescriptionHybridView(List<EarthDataView> viewList, List<MaskOverlay> maskList) Constructs a new hybrid view. -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a copy of this object.Gets a legend for annotation of the data view.voidInvalidates the view.protected voidPrepares this view for rendering using the specified graphics object.voidreset()Resets the view to the full data resolution.voidresize(double factor) Changes the view size by the specified factor.voidsetCenter(DataLocation center) Sets the view center to a new data location.voidsetCenterAndScale(DataLocation center, double scale) Set the center and scale of this viewvoidsetImageAffine(AffineTransform affine) Sets the image affine transform.voidSets the view to a new size.voidsetVerbose(boolean flag) Sets the verbose mode flag.Methods inherited from class noaa.coastwatch.render.EarthDataView
addOverlay, addOverlays, computeCaches, containsOverlay, getArea, getBounds, getCenter, getCorners, getImageAffine, getOrientationAffine, getOverlays, getProgress, getResolution, getScale, getSize, getSubregion, getTransform, getUpsideDown, hasCompatibleCaches, hasCoordinateCaches, isChanged, isPrepared, isRendering, magnify, magnify, magnify, main, removeOverlay, render, resize, resizeHeight, resizeMaxAspect, resizeWidth, setChanged, setProgress, setProperties, showSubregion, stopRendering, transform, transform
-
Constructor Details
-
HybridView
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
Description copied from class:EarthDataViewSets 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:
setImageAffinein classEarthDataView- Parameters:
affine- the image affine transform, or null for no transform.
-
setVerbose
public void setVerbose(boolean flag) Description copied from class:EarthDataViewSets the verbose mode flag.- Overrides:
setVerbosein classEarthDataView
-
invalidate
public void invalidate()Description copied from class:EarthDataViewInvalidates the view. This causes the view to be completely reconstructed upon the next call torender().- Overrides:
invalidatein classEarthDataView
-
setCenter
Description copied from class:EarthDataViewSets the view center to a new data location. The image dimensions and image scaling factor are unaffected.- Overrides:
setCenterin classEarthDataView- 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:EarthDataViewSet the center and scale of this view- Overrides:
setCenterAndScalein classEarthDataView- 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
Description copied from class:EarthDataViewChanges 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:
resizein classEarthDataView- 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
Description copied from class:EarthDataViewResets 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:
resetin classEarthDataView- Throws:
NoninvertibleTransformException- if the image to data transform is not invertible.
-
setSize
Description copied from class:EarthDataViewSets the view to a new size. The data center location and image scaling factor remain unaffected.- Overrides:
setSizein classEarthDataView- Parameters:
imageDims- the new image dimensions.- Throws:
NoninvertibleTransformException- if the image to data transform is not invertible.
-
getLegend
Description copied from class:EarthDataViewGets a legend for annotation of the data view. This default method returns null, but subclasses may override this method to provide a legend.- Overrides:
getLegendin classEarthDataView- Returns:
- a legend or null if no legend is available.
-
clone
Description copied from class:EarthDataViewCreates and returns a copy of this object. Child classes should override this method if they contain any deep structure that needs copying.- Overrides:
clonein classEarthDataView
-
prepare
Description copied from class:EarthDataViewPrepares 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:
preparein classEarthDataView
-