Package org.apache.sis.image
Class PixelIterator.FloatWindow
java.lang.Object
org.apache.sis.image.PixelIterator.Window<FloatBuffer>
org.apache.sis.image.PixelIterator.FloatWindow
- Enclosing class:
- PixelIterator
PixelIterator.Window
implementation backed by an array of float[]
.
This implementation is provided for completeness but is rarely used.
We do not attempt performance optimization for this case.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float[]
Sample values in the window (data
) and a temporary array (transfer
).private final float[]
Sample values in the window (data
) and a temporary array (transfer
).Fields inherited from class org.apache.sis.image.PixelIterator.Window
DIRECT, TRANSFER, TRANSFER_FROM_OTHER, values
-
Constructor Summary
ConstructorsConstructorDescriptionFloatWindow
(float[] data, float[] transfer) Creates a new window which will store the sample values in the givendata
array. -
Method Summary
Modifier and TypeMethodDescription(package private) Object
Performs the transfer between the underlying raster and this window.(package private) final PixelIterator
owner()
Returns the iterator that created this window.void
update()
Updates this window with the sample values in the region starting at current iterator position.Methods inherited from class org.apache.sis.image.PixelIterator.Window
getSize
-
Field Details
-
data
private final float[] dataSample values in the window (data
) and a temporary array (transfer
). Those arrays are overwritten whenupdate()
is invoked. -
transfer
private final float[] transferSample values in the window (data
) and a temporary array (transfer
). Those arrays are overwritten whenupdate()
is invoked.
-
-
Constructor Details
-
FloatWindow
FloatWindow(float[] data, float[] transfer) Creates a new window which will store the sample values in the givendata
array.
-
-
Method Details
-
owner
Returns the iterator that created this window.- Specified by:
owner
in classPixelIterator.Window<FloatBuffer>
-
getPixels
Performs the transfer between the underlying raster and this window.- Specified by:
getPixels
in classPixelIterator.Window<FloatBuffer>
- Parameters:
raster
- the raster from which to get the pixel values.subX
- the X coordinate of the upper-left pixel location.subY
- the Y coordinate of the upper-left pixel location.subWidth
- width of the pixel rectangle.subHeight
- height of the pixel rectangle.mode
- one ofPixelIterator.Window.DIRECT
,PixelIterator.Window.TRANSFER
orPixelIterator.Window.TRANSFER_FROM_OTHER
.- Returns:
- the array in which sample values have been stored.
-
update
public void update()Updates this window with the sample values in the region starting at current iterator position. This method assumes thatPixelIterator.next()
orPixelIterator.moveTo(int,int)
has been invoked.- Specified by:
update
in classPixelIterator.Window<FloatBuffer>
-