|
|||||||||
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.WindowArrayImpl
public class WindowArrayImpl
Wraps an NDArray to produce a virtual ArrayImpl with a different shape. The result is a 'window' on the base array; a given position (coordinate vector) refers to the same pixel in both base and wrapping array, but pixels outside the window will not exist in the wrapping array and pixels in the window which do not fall within the bounds of the base array are given the bad value (for a readable array) or ignored (for a writable array).
The window may fall wholly or partially within or without the bounds of the base array, but must be of the same dimensionality as it.
Constructor Summary | |
---|---|
WindowArrayImpl(NDArray nda,
NDShape window)
Constructs a new ArrayImpl from a base NDArray and a given window shape. |
Method Summary | |
---|---|
AccessImpl |
getAccess()
Returns an object which can access the pixels of this ArrayImpl. |
BadHandler |
getBadHandler()
|
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 WindowArrayImpl(NDArray nda, NDShape window)
nda
- the base NDArray which supplies the original pixel valueswindow
- the shape of the window through which the base
array will be viewed. Must have the same number
of dimensions as nda
IllegalArgumentException
- if window has a different number of
dimensions from ndaMethod Detail |
---|
public OrderedNDShape getShape()
ArrayImpl
getShape
in interface ArrayImpl
getShape
in class WrapperArrayImpl
public BadHandler getBadHandler()
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 |