Package org.apache.sis.image
Class MaskImage
java.lang.Object
org.apache.sis.image.PlanarImage
org.apache.sis.image.ComputedImage
org.apache.sis.image.SourceAlignedImage
org.apache.sis.image.MaskImage
- All Implemented Interfaces:
RenderedImage
,Disposable
Mask of missing values.
This is the implementation of "org.apache.sis.Mask" property value.
- Since:
- 1.1
- Version:
- 1.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.opengis.referencing.operation.MathTransform
Convert integer values to floating point values, ornull
if none.Fields inherited from class org.apache.sis.image.SourceAlignedImage
POSITIONAL_PROPERTIES
Fields inherited from class org.apache.sis.image.ComputedImage
sampleModel, SOURCE_PADDING_KEY
Fields inherited from class org.apache.sis.image.PlanarImage
GRID_GEOMETRY_KEY, MASK_KEY, POSITIONAL_ACCURACY_KEY, SAMPLE_RESOLUTIONS_KEY, STATISTICS_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Raster
computeTile
(int tileX, int tileY, WritableRaster tile) Invoked when a tile need to be computed or updated.boolean
Compares the given object with this image for equality.getProperty
(String key) Gets a property from this image.String[]
Returns the names of all recognized properties.int
hashCode()
Returns a hash code value for this image.Methods inherited from class org.apache.sis.image.SourceAlignedImage
filterPropertyNames, getColorModel, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth, prefetch
Methods inherited from class org.apache.sis.image.ComputedImage
clearErrorFlags, createTile, dispose, equalsBase, getDestination, getSampleModel, getSource, getSource, getSources, getTile, getWritableTileIndices, hashCodeBase, hasTileWriters, isTileWritable, markDirtyTiles, markTileWritable, reference, setDestination, sourceTileChanged
-
Field Details
-
converter
private final org.opengis.referencing.operation.MathTransform converterConvert integer values to floating point values, ornull
if none. This is needed since we useFloat.isNaN(float)
for identifying values to mask.
-
-
Constructor Details
-
MaskImage
MaskImage(ResampledImage image) Creates a new instance for the given image.
-
-
Method Details
-
getProperty
Gets a property from this image.- Specified by:
getProperty
in interfaceRenderedImage
- Overrides:
getProperty
in classPlanarImage
- Parameters:
key
- the name of the property to get.- Returns:
- the property value, or
Image.UndefinedProperty
if none.
-
getPropertyNames
Returns the names of all recognized properties.- Specified by:
getPropertyNames
in interfaceRenderedImage
- Overrides:
getPropertyNames
in classPlanarImage
- Returns:
- names of all recognized properties, or
null
if none.
-
computeTile
protected Raster computeTile(int tileX, int tileY, WritableRaster tile) throws org.opengis.referencing.operation.TransformException Invoked when a tile need to be computed or updated.- Specified by:
computeTile
in classComputedImage
- Parameters:
tileX
- the column index of the tile to compute.tileY
- the row index of the tile to compute.tile
- if the tile already exists but needs to be updated, the tile to update. Otherwisenull
.- Returns:
- computed tile for the given indices.
- Throws:
org.opengis.referencing.operation.TransformException
- if an error occurred while computing pixel coordinates.
-
hashCode
public int hashCode()Returns a hash code value for this image.- Overrides:
hashCode
in classSourceAlignedImage
-
equals
Compares the given object with this image for equality.- Overrides:
equals
in classSourceAlignedImage
-