public class ConvertArrayImpl extends WrapperArrayImpl
Converter
,
TypeConverter
Constructor and Description |
---|
ConvertArrayImpl(NDArray nda,
Converter conv)
Constructs a new ArrayImpl from an underlying NDArray and a supplied
converter object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
canMap, close, getMapped, getShape, getWrapped, isRandom, isReadable, isWritable, multipleAccess, open, toString
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().public Type getType()
ArrayImpl
getType
in interface ArrayImpl
getType
in class WrapperArrayImpl
public Number getBadValue()
ArrayImpl
null
if there is no bad value.
The return value must not change over the lifetime of the object.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 errorCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.