Class Transferer.FloatToFloat

java.lang.Object
org.apache.sis.image.Transferer
org.apache.sis.image.Transferer.FloatToFloat
Enclosing class:
Transferer

private static final class Transferer.FloatToFloat extends Transferer
Read float values from the source raster and write float values in a temporary buffer. Note that reading and writing data has float does not imply that raster data type must be that type. The temporary buffer will be written in the target raster as a separated step. The use of a temporary buffer is needed when the target raster does not use the float type, or does not use a layout that allows us to write directly in the raster array.
  • Field Details

    • buffer

      private float[] buffer
      Temporary buffer where to copy data and apply operation.
  • Constructor Details

    • FloatToFloat

      FloatToFloat(Raster source, WritableRaster target, Rectangle aoi)
      Creates a new instance for transferring data between the two specified rasters.
  • Method Details

    • prepareTransferRegion

      int prepareTransferRegion()
      Subdivides the region to process in smaller strips, for smaller buffer.
      Overrides:
      prepareTransferRegion in class Transferer
      Returns:
      region.y + region.height.
      See Also:
    • computeStrip

      void computeStrip(org.opengis.referencing.operation.MathTransform1D converter) throws org.opengis.referencing.operation.TransformException
      Copies source values in temporary buffer, applies conversion then copies to target.
      Specified by:
      computeStrip in class Transferer
      Parameters:
      converter - the operation to apply on sample values in current region and current band number.
      Throws:
      org.opengis.referencing.operation.TransformException - if an error occurred during calculation.