|
|||||||||
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.ConvertArrayImpl
public class ConvertArrayImpl
Wraps an NDArray to produce a virtual NDArray whose pixels are modified using a Converter object. Amongst other possibilities this can perform type conversion and transform pixel values using a supplied real function.
Converter
,
TypeConverter
Constructor Summary | |
---|---|
ConvertArrayImpl(NDArray nda,
Converter conv)
Constructs a new ArrayImpl from an underlying NDArray and a supplied converter object. |
Method Summary | |
---|---|
AccessImpl |
getAccess()
Returns an object which can access the pixels of this ArrayImpl. |
Number |
getBadValue()
The magic bad value for data. |
Type |
getType()
Returns the primitive type of the data held by this object. |
Methods inherited from class uk.ac.starlink.array.WrapperArrayImpl |
---|
canMap, close, getMapped, getShape, 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 ConvertArrayImpl(NDArray nda, Converter conv)
nda
- the base NDArray which supplies the pixels to be
convertedconv
- a Converter object which operates on the pixels of nda.
Its base type (type1) must match the type of nda.
IllegalArgumentException
- if conv.getType1() is not equal
to nda.getType().Method Detail |
---|
public Type getType()
ArrayImpl
getType
in interface ArrayImpl
getType
in class WrapperArrayImpl
public Number getBadValue()
ArrayImpl
getBadValue
in interface ArrayImpl
getBadValue
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 |