Package org.apache.sis.image
Class Visualization.InterpConvertOneBand
java.lang.Object
org.apache.sis.image.Interpolation
org.apache.sis.image.Visualization.InterpConvert
org.apache.sis.image.Visualization.InterpConvertOneBand
- Enclosing class:
- Visualization
Same as
Visualization.InterpConvert
optimized for the single-band case.
This class uses the more efficient MathTransform1D.transform(double)
method.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.opengis.referencing.operation.MathTransform1D
Conversion from floating point values to values to store as integers in the destination image.Fields inherited from class org.apache.sis.image.Visualization.InterpConvert
converter, interpolation
Fields inherited from class org.apache.sis.image.Interpolation
BILINEAR, LANCZOS, NEAREST
-
Constructor Summary
ConstructorsConstructorDescriptionInterpConvertOneBand
(Interpolation interpolation, org.opengis.referencing.operation.MathTransform1D converter) Creates a new object combining the given interpolation with the given conversion of sample values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
interpolate
(DoubleBuffer source, int numBands, double xfrac, double yfrac, double[] writeTo, int writeToOffset) Delegates toResampledImage.interpolation
, then convert sample values in all bands.Methods inherited from class org.apache.sis.image.Visualization.InterpConvert
getSupportSize, toCompatible
-
Field Details
-
singleConverter
private final org.opengis.referencing.operation.MathTransform1D singleConverterConversion from floating point values to values to store as integers in the destination image.
-
-
Constructor Details
-
InterpConvertOneBand
InterpConvertOneBand(Interpolation interpolation, org.opengis.referencing.operation.MathTransform1D converter) Creates a new object combining the given interpolation with the given conversion of sample values.
-
-
Method Details
-
interpolate
public void interpolate(DoubleBuffer source, int numBands, double xfrac, double yfrac, double[] writeTo, int writeToOffset) Delegates toResampledImage.interpolation
, then convert sample values in all bands.- Overrides:
interpolate
in classVisualization.InterpConvert
- Parameters:
source
- pixel values from the source image to use for interpolation.numBands
- number of bands. This is the number of values to put in thewriteTo
array.xfrac
- the X subsample position, usually (but not always) in the range [0 … 1).yfrac
- the Y subsample position, usually (but not always) in the range [0 … 1).writeTo
- the array where this method shall write interpolated values.writeToOffset
- index of the first value to put in thewriteTo
array.
-