public class PixelMapArrayImpl extends WrapperArrayImpl
OffsetMapper
object is used to define the mapping between pixels
in the base array and pixels in this array.
Note that no assumptions about contiguity of pixels can be made
while doing bulk data access on a PixelMapNDArray; where applicable
a WindowArrayImpl
is likely to be more efficient.
OffsetMapper
,
WindowArrayImpl
Constructor and Description |
---|
PixelMapArrayImpl(NDArray nda,
OrderedNDShape oshape,
OffsetMapper mapper)
Constructs a new ArrayImpl from a base NDArray and an OffsetMapper
object which transforms the offset of a pixel in the base array
to the offset of the same pixel in this PixelMapArrayImpl.
|
Modifier and Type | Method and Description |
---|---|
AccessImpl |
getAccess()
Returns an object which can access the pixels of this ArrayImpl.
|
OrderedNDShape |
getShape()
Returns an object representing the shape (origin and dimensions)
and pixel sequence of this object.
|
canMap, close, getBadValue, getMapped, getType, getWrapped, isRandom, isReadable, isWritable, multipleAccess, open, toString
public PixelMapArrayImpl(NDArray nda, OrderedNDShape oshape, OffsetMapper mapper)
nda
- the base NDArray which supplies the pixelsoshape
- the shape and pixel sequence of the NDArray to be
constructedmapper
- an OffsetMapper object which turns the offset of a
pixel in this NDArray into the offset of the
corresponding pixel in the base NDArrayUnsupportedOperationException
- if nda does not have random
accesspublic OrderedNDShape getShape()
ArrayImpl
getShape
in interface ArrayImpl
getShape
in class WrapperArrayImpl
public AccessImpl getAccess() throws IOException
ArrayImpl
This method will only be called after the sole call to open and before the sole call to close.
This method will only be called more than once if the multipleAccess method returns true.
It is the responsibility of the caller to close the returned AccessImpl when it is no longer required; this enables resources it may hold to be released.
getAccess
in interface ArrayImpl
getAccess
in class WrapperArrayImpl
IOException
- if there is an IO errorCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.