|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.array.WrapperArrayImpl
uk.ac.starlink.array.PixelMapArrayImpl
public class PixelMapArrayImpl
Wraps an NDArray to produce a virtual ArrayImpl in which each pixel is
the same as a pixel of the base array, but in a different order.
An 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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class uk.ac.starlink.array.WrapperArrayImpl |
---|
canMap, close, getBadValue, getMapped, getType, getWrapped, isRandom, isReadable, isWritable, multipleAccess, open, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 NDArray
UnsupportedOperationException
- if nda does not have random
accessMethod Detail |
---|
public 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 error
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |