Package org.apache.sis.image
Class Transferer.FloatToFloat
java.lang.Object
org.apache.sis.image.Transferer
org.apache.sis.image.Transferer.FloatToFloat
- Enclosing class:
- 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 Summary
FieldsModifier and TypeFieldDescriptionprivate float[]
Temporary buffer where to copy data and apply operation.Fields inherited from class org.apache.sis.image.Transferer
band, region, source, target
-
Constructor Summary
ConstructorsConstructorDescriptionFloatToFloat
(Raster source, WritableRaster target, Rectangle aoi) Creates a new instance for transferring data between the two specified rasters. -
Method Summary
Modifier and TypeMethodDescription(package private) void
computeStrip
(org.opengis.referencing.operation.MathTransform1D converter) Copies source values in temporary buffer, applies conversion then copies to target.(package private) int
Subdivides the region to process in smaller strips, for smaller buffer.Methods inherited from class org.apache.sis.image.Transferer
compute, create, create, length
-
Field Details
-
buffer
private float[] bufferTemporary 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 classTransferer
- 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 classTransferer
- 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.
-