Package org.esa.snap.core.datamodel
Class Mask
- All Implemented Interfaces:
Extensible
,Scaling
,SceneTransformProvider
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A mask image type which is based on band math.static class
Specifies a factory for thesource image
used by aMask
.static class
static class
A mask image type which is based on vector data.Nested classes/interfaces inherited from class org.esa.snap.core.datamodel.RasterDataNode
RasterDataNode.RasterDataProcessor
-
Field Summary
Fields inherited from class org.esa.snap.core.datamodel.Band
ANGULAR_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.RasterDataNode
INVALID_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.DataNode
PROPERTY_NAME_DATA, PROPERTY_NAME_READ_ONLY, PROPERTY_NAME_SYNTHETIC, PROPERTY_NAME_UNIT
Fields inherited from class org.esa.snap.core.datamodel.ProductNode
PROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionMask
(String name, int width, int height, Mask.ImageType imageType) Constructs a new mask. -
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptVisitor
(ProductVisitor visitor) Accepts the given visitor.protected RenderedImage
CallscreateImage(this)
in this mask's image type.void
dispose()
Releases all of the resources used by this object instance and all of its owned children.double
Gets the shape of the area where this raster data contains valid samples.void
setImageColor
(Color color) void
setImageTransparency
(double transparency) void
updateExpression
(String oldExternalName, String newExternalName) Asks a product node to replace all occurences of and references to the node name given byoldExternalName
witholdExternalName
.Methods inherited from class org.esa.snap.core.datamodel.Band
computeStxImpl, 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.AbstractBand
ensureMinLengthArray, 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.RasterDataNode
addAncillaryVariable, 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, hasGeoCoding, 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.DataNode
checkDataCompatibility, createCompatibleProductData, fireProductNodeDataChanged, getData, getDataElems, getDataElemSize, getDataType, getNumDataElems, getUnit, isReadOnly, isSynthetic, setData, setDataElems, setReadOnly, setSynthetic, setUnit
Methods inherited from class org.esa.snap.core.datamodel.ProductNode
fireProductNodeChanged, 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.ExtensibleObject
getExtension
-
Constructor Details
-
Mask
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 Details
-
getImageType
- Returns:
- The image type of this mask.
-
getImageConfig
- Returns:
- The image configuration of this mask.
-
getImageColor
-
setImageColor
-
getImageTransparency
public double getImageTransparency() -
setImageTransparency
public void setImageTransparency(double transparency) -
createSourceImage
CallscreateImage(this)
in this mask's image type.- Overrides:
createSourceImage
in classBand
- Returns:
- The mask's source image.
- See Also:
-
acceptVisitor
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 classBand
- Parameters:
visitor
- the visitor, must not benull
-
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. -
updateExpression
Asks a product node to replace all occurences of and references to the node name given byoldExternalName
witholdExternalName
. Such references most often occur in band arithmetic expressions.- Overrides:
updateExpression
in classRasterDataNode
- Parameters:
oldExternalName
- The old node name.newExternalName
- The new node name.
-
getValidShape
Description copied from class:RasterDataNode
Gets the shape of the area where this raster data contains valid samples. The method returnsnull
, if the entire raster contains valid samples.- Overrides:
getValidShape
in classRasterDataNode
- Returns:
- The shape of the area where the raster data has samples, can be
null
.
-