Class PositionalConsistencyImage

All Implemented Interfaces:
RenderedImage, Disposable

final class PositionalConsistencyImage extends SourceAlignedImage
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 Details

    • INHERITED_PROPERTIES

      private static final Set<String> INHERITED_PROPERTIES
      Properties inherited from the source image. Must be consistent with the switch case statement delegating to the source image in getProperty(String).
      See Also:
    • ADDED_PROPERTIES

      private static final String[] 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 in getProperty(String).
      See Also:
    • toSource

      private final org.opengis.referencing.operation.MathTransform toSource
      A copy of ResampledImage.toSourceSupport with the support translation removed. The result may be different than ResampledImage.toSource if the transform has been replaced by ResamplingGrid.
    • toTarget

      private final org.opengis.referencing.operation.MathTransform toTarget
      The inverse of ResampledImage.toSource. Should not be concatenated with toSource 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

      public Object getProperty(String key)
      Gets a property from this image.
      Specified by:
      getProperty in interface RenderedImage
      Overrides:
      getProperty in class PlanarImage
      Parameters:
      key - the name of the property to get.
      Returns:
      the property value, or Image.UndefinedProperty if none.
    • getPropertyNames

      public String[] getPropertyNames()
      Returns the names of all recognized properties.
      Specified by:
      getPropertyNames in interface RenderedImage
      Overrides:
      getPropertyNames in class PlanarImage
      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 class ComputedImage
      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. Otherwise null.
      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 class SourceAlignedImage
    • equals

      public boolean equals(Object object)
      Compares the given object with this image for equality.
      Overrides:
      equals in class SourceAlignedImage