Package org.apache.sis.image
Class PositionalConsistencyImage
java.lang.Object
org.apache.sis.image.PlanarImage
org.apache.sis.image.ComputedImage
org.apache.sis.image.SourceAlignedImage
org.apache.sis.image.PositionalConsistencyImage
- All Implemented Interfaces:
RenderedImage
,Disposable
Estimation of positional error for each pixel in an image computed by
ResampledImage
.
This is the implementation of ResampledImage.POSITIONAL_CONSISTENCY_KEY
property value.- Since:
- 1.1
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]
Properties added by this image, no matter if present in source image or not.Properties inherited from the source image.private final org.opengis.referencing.operation.MathTransform
A copy ofResampledImage.toSourceSupport
with the support translation removed.private final org.opengis.referencing.operation.MathTransform
The inverse ofResampledImage.toSource
.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
ConstructorsConstructorDescriptionPositionalConsistencyImage
(ResampledImage image, org.opengis.referencing.operation.MathTransform toSource) Creates a new instance for the given image. -
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
-
INHERITED_PROPERTIES
Properties inherited from the source image. Must be consistent with the switch case statement delegating to the source image ingetProperty(String)
.- See Also:
-
ADDED_PROPERTIES
Properties added by this image, no matter if present in source image or not. Must be consistent with the switch case statement doing its own calculation ingetProperty(String)
.- See Also:
-
toSource
private final org.opengis.referencing.operation.MathTransform toSourceA copy ofResampledImage.toSourceSupport
with the support translation removed. The result may be different thanResampledImage.toSource
if the transform has been replaced byResamplingGrid
. -
toTarget
private final org.opengis.referencing.operation.MathTransform toTargetThe inverse ofResampledImage.toSource
. Should not be concatenated withtoSource
because optimizations applied by Apache SIS during concatenations may hide the errors that we want to visualize.
-
-
Constructor Details
-
PositionalConsistencyImage
PositionalConsistencyImage(ResampledImage image, org.opengis.referencing.operation.MathTransform toSource) throws org.opengis.referencing.operation.TransformException Creates a new instance for the given image.- Throws:
org.opengis.referencing.operation.TransformException
-
-
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.
-
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
-