Class Mask

  • All Implemented Interfaces:
    Extensible, Scaling, SceneTransformProvider

    public class Mask
    extends Band
    A Mask is used to mask image pixels of other raster data nodes.

    This is a preliminary API under construction for BEAM 4.7. Not intended for public use.

    Since:
    BEAM 4.7
    • Constructor Detail

      • Mask

        public Mask​(String name,
                    int width,
                    int height,
                    Mask.ImageType imageType)
        Constructs a new mask.
        Parameters:
        name - The new mask's name.
        width - The new mask's raster width.
        height - The new mask's raster height.
        imageType - The new mask's image type.
    • Method Detail

      • getImageType

        public Mask.ImageType getImageType()
        Returns:
        The image type of this mask.
      • getImageConfig

        public PropertyContainer getImageConfig()
        Returns:
        The image configuration of this mask.
      • getImageColor

        public Color getImageColor()
      • setImageColor

        public void setImageColor​(Color color)
      • getImageTransparency

        public double getImageTransparency()
      • setImageTransparency

        public void setImageTransparency​(double transparency)
      • acceptVisitor

        public void acceptVisitor​(ProductVisitor visitor)
        Description copied from class: Band
        Accepts the given visitor. This method implements the well known 'Visitor' design pattern of the gang-of-four. The visitor pattern allows to define new operations on the product data model without the need to add more code to it. The new operation is implemented by the visitor.

        The method simply calls visitor.visit(this).

        Overrides:
        acceptVisitor in class Band
        Parameters:
        visitor - the visitor, must not be null
      • dispose

        public void dispose()
        Description copied from class: Band
        Releases all of the resources used by this object instance and all of its owned children. Its primary use is to allow the garbage collector to perform a vanilla job.

        This method should be called only if it is for sure that this object instance will never be used again. The results of referencing an instance of this class after a call to dispose() are undefined.

        Overrides of this method should always call super.dispose(); after disposing this instance.

        Overrides:
        dispose in class Band
      • updateExpression

        public void updateExpression​(String oldExternalName,
                                     String newExternalName)
        Asks a product node to replace all occurences of and references to the node name given by oldExternalName with oldExternalName. Such references most often occur in band arithmetic expressions.
        Overrides:
        updateExpression in class RasterDataNode
        Parameters:
        oldExternalName - The old node name.
        newExternalName - The new node name.
      • getValidShape

        public Shape getValidShape()
        Description copied from class: RasterDataNode
        Gets the shape of the area where this raster data contains valid samples. The method returns null, if the entire raster contains valid samples.
        Overrides:
        getValidShape in class RasterDataNode
        Returns:
        The shape of the area where the raster data has samples, can be null.