Package org.esa.snap.core.datamodel
Class Mask
- 
- All Implemented Interfaces:
- Extensible,- Scaling,- SceneTransformProvider
 
 public class Mask extends Band AMaskis 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
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMask.BandMathsTypeA mask image type which is based on band math.static classMask.ImageTypeSpecifies a factory for thesource imageused by aMask.static classMask.RangeTypestatic classMask.VectorDataTypeA mask image type which is based on vector data.- 
Nested classes/interfaces inherited from class org.esa.snap.core.datamodel.RasterDataNodeRasterDataNode.RasterDataProcessor
 
- 
 - 
Field Summary- 
Fields inherited from class org.esa.snap.core.datamodel.BandANGULAR_VIEW_NULL_VALUE, PROPERTY_NAME_ANGULAR_BAND_INDEX, PROPERTY_NAME_ANGULAR_VALUE, PROPERTY_NAME_DATE, PROPERTY_NAME_DATE_BAND_INDEX, PROPERTY_NAME_SAMPLE_CODING, PROPERTY_NAME_SOLAR_FLUX, PROPERTY_NAME_SPECTRAL_BAND_INDEX, PROPERTY_NAME_SPECTRAL_BANDWIDTH, PROPERTY_NAME_SPECTRAL_WAVELENGTH
 - 
Fields inherited from class org.esa.snap.core.datamodel.RasterDataNodeINVALID_POS_TEXT, IO_ERROR_TEXT, NO_DATA_TEXT, PROPERTY_NAME_ANCILLARY_RELATIONS, PROPERTY_NAME_ANCILLARY_VARIABLES, PROPERTY_NAME_GEO_CODING, PROPERTY_NAME_IMAGE_INFO, PROPERTY_NAME_IMAGE_TO_MODEL_TRANSFORM, PROPERTY_NAME_LOG_10_SCALED, PROPERTY_NAME_MODEL_TO_SCENE_TRANSFORM, PROPERTY_NAME_NO_DATA_VALUE, PROPERTY_NAME_NO_DATA_VALUE_USED, PROPERTY_NAME_SCALING_FACTOR, PROPERTY_NAME_SCALING_OFFSET, PROPERTY_NAME_SCENE_TO_MODEL_TRANSFORM, PROPERTY_NAME_STX, PROPERTY_NAME_TIME_CODING, PROPERTY_NAME_VALID_PIXEL_EXPRESSION
 - 
Fields inherited from class org.esa.snap.core.datamodel.DataNodePROPERTY_NAME_DATA, PROPERTY_NAME_READ_ONLY, PROPERTY_NAME_SYNTHETIC, PROPERTY_NAME_UNIT
 - 
Fields inherited from class org.esa.snap.core.datamodel.ProductNodePROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description Mask(String name, int width, int height, Mask.ImageType imageType)Constructs a new mask.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptVisitor(ProductVisitor visitor)Accepts the given visitor.protected RenderedImagecreateSourceImage()CallscreateImage(this)in this mask's image type.voiddispose()Releases all of the resources used by this object instance and all of its owned children.ColorgetImageColor()PropertyContainergetImageConfig()doublegetImageTransparency()Mask.ImageTypegetImageType()ShapegetValidShape()Gets the shape of the area where this raster data contains valid samples.voidsetImageColor(Color color)voidsetImageTransparency(double transparency)voidupdateExpression(String oldExternalName, String newExternalName)Asks a product node to replace all occurences of and references to the node name given byoldExternalNamewitholdExternalName.- 
Methods inherited from class org.esa.snap.core.datamodel.BandcomputeStxImpl, createDefaultImageInfo, getAngularBandIndex, getAngularValue, getDate, getDateBandIndex, getFlagCoding, getIndexCoding, getRawStorageSize, getSampleCoding, getSolarFlux, getSpectralBandIndex, getSpectralBandwidth, getSpectralWavelength, isFlagBand, isIndexBand, isProductReaderDirectlyUsable, readRasterData, readRasterDataFully, removeFromFile, setAngularBandIndex, setAngularValue, setDate, setDateBandIndex, setSampleCoding, setSolarFlux, setSpectralBandIndex, setSpectralBandwidth, setSpectralWavelength, toString, writeRasterData, writeRasterDataFully
 - 
Methods inherited from class org.esa.snap.core.datamodel.AbstractBandensureMinLengthArray, ensureMinLengthArray, ensureMinLengthArray, ensureRasterData, getPixelDouble, getPixelFloat, getPixelInt, getPixels, getPixels, getPixels, getRasterHeight, getRasterWidth, loadRasterData, readPixels, readPixels, readPixels, setPixelDouble, setPixelFloat, setPixelInt, setPixels, setPixels, setPixels, unloadRasterData, writePixels, writePixels, writePixels
 - 
Methods inherited from class org.esa.snap.core.datamodel.RasterDataNodeaddAncillaryVariable, canBeOrthorectified, checkCompatibleRasterData, clearNoDataValue, createColorIndexedImage, createCompatibleRasterData, createCompatibleRasterData, createCompatibleSceneRasterData, createDefaultImageInfo, createMultiLevelModel, createPointing, createRgbImage, createTransectProfileData, fireImageInfoChanged, getAncillaryRelations, getAncillaryVariable, getAncillaryVariables, getGeoCoding, getGeophysicalDataType, getGeophysicalImage, getGeophysicalNoDataValue, getImageInfo, getImageInfo, getImageInfo, getImageToModelTransform, getModelToSceneTransform, getMultiLevelModel, getNoDataValue, getOverlayMaskGroup, getPixels, getPixels, getPixelString, getPointing, getRasterData, getRasterSize, getSampleFloat, getSampleInt, getScalingFactor, getScalingOffset, getSceneToModelTransform, getSourceImage, getStx, getStx, getTimeCoding, getValidMaskExpression, getValidMaskImage, getValidPixelExpression, hasIntPixels, hasRasterData, isCompatibleRasterData, isFloatingPointType, isGeophysicalImageSet, isLog10Scaled, isNoDataValueSet, isNoDataValueUsed, isPixelValid, isPixelValid, isPixelValid, isPixelWithinImageBounds, isScalingApplied, isSourceImageSet, isStxSet, isValidMaskImageSet, isValidMaskProperty, isValidMaskUsed, loadRasterData, processRasterData, quantizeRasterData, quantizeRasterData, readPixels, readPixels, readPixels, readRasterData, readRasterDataFully, readValidMask, removeAncillaryVariable, removeCachedImageData, resetValidMask, scale, scaleInverse, setAncillaryRelations, setGeoCoding, setGeophysicalNoDataValue, setImageInfo, setImageInfo, setImageToModelTransform, setLog10Scaled, setModelToSceneTransform, setModified, setNoDataValue, setNoDataValueUsed, setRasterData, setScalingFactor, setScalingOffset, setSceneToModelTransform, setSourceImage, setSourceImage, setStx, setTimeCoding, setValidPixelExpression, writePixels, writePixels, writePixels, writeRasterData, writeRasterDataFully
 - 
Methods inherited from class org.esa.snap.core.datamodel.DataNodecheckDataCompatibility, createCompatibleProductData, fireProductNodeDataChanged, getData, getDataElems, getDataElemSize, getDataType, getNumDataElems, getUnit, isReadOnly, isSynthetic, setData, setDataElems, setReadOnly, setSynthetic, setUnit
 - 
Methods inherited from class org.esa.snap.core.datamodel.ProductNodefireProductNodeChanged, fireProductNodeChanged, getDescription, getDisplayName, getName, getOwner, getProduct, getProductReader, getProductReaderSafe, getProductRefString, getProductSafe, getProductWriter, getProductWriterSafe, getRawStorageSize, isModified, isPartOfSubset, isValidNodeName, setDescription, setName, setNodeName, setOwner
 - 
Methods inherited from class com.bc.ceres.core.ExtensibleObjectgetExtension
 
- 
 
- 
- 
- 
Constructor Detail- 
Maskpublic 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- 
getImageTypepublic Mask.ImageType getImageType() - Returns:
- The image type of this mask.
 
 - 
getImageConfigpublic PropertyContainer getImageConfig() - Returns:
- The image configuration of this mask.
 
 - 
getImageColorpublic Color getImageColor() 
 - 
setImageColorpublic void setImageColor(Color color) 
 - 
getImageTransparencypublic double getImageTransparency() 
 - 
setImageTransparencypublic void setImageTransparency(double transparency) 
 - 
createSourceImageprotected RenderedImage createSourceImage() CallscreateImage(this)in this mask's image type.- Overrides:
- createSourceImagein class- Band
- Returns:
- The mask's source image.
- See Also:
- getImageType()
 
 - 
acceptVisitorpublic void acceptVisitor(ProductVisitor visitor) Description copied from class:BandAccepts 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:
- acceptVisitorin class- Band
- Parameters:
- visitor- the visitor, must not be- null
 
 - 
disposepublic void dispose() Description copied from class:BandReleases 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.
 - 
updateExpressionpublic void updateExpression(String oldExternalName, String newExternalName) Asks a product node to replace all occurences of and references to the node name given byoldExternalNamewitholdExternalName. Such references most often occur in band arithmetic expressions.- Overrides:
- updateExpressionin class- RasterDataNode
- Parameters:
- oldExternalName- The old node name.
- newExternalName- The new node name.
 
 - 
getValidShapepublic Shape getValidShape() Description copied from class:RasterDataNodeGets the shape of the area where this raster data contains valid samples. The method returnsnull, if the entire raster contains valid samples.- Overrides:
- getValidShapein class- RasterDataNode
- Returns:
- The shape of the area where the raster data has samples, can be null.
 
 
- 
 
-