public interface Ndx
Modifier and Type | Method and Description |
---|---|
FrameSet |
getAst()
Get the world coordinate system of the NDX as
an AST
FrameSet . |
int |
getBadBits()
Gets the value of the badBits mask.
|
Source |
getEtc()
Returns the XML containing extension information for this NDX.
|
HdxFacade |
getHdxFacade()
Obtains a HdxFacade, which enables us to examine and manipulate
the Ndx in a DOM-like way.
|
NDArray |
getImage()
Returns the image component of this NDX.
|
String |
getLabel()
Returns the label string for this Ndx.
|
NDArray |
getQuality()
Returns the quality component of this NDX.
|
String |
getTitle()
Returns the title of this Ndx.
|
String |
getUnits()
Returns the units string for this Ndx.
|
NDArray |
getVariance()
Returns the variance component of this NDX.
|
boolean |
hasEtc()
Find out if the NDX contains user-defined extension information.
|
boolean |
hasLabel()
Indicates whether there is a label component.
|
boolean |
hasQuality()
Indicates whether there is a quality component.
|
boolean |
hasTitle()
Indicates whether there is a title component.
|
boolean |
hasUnits()
Indicates whether there is a units component.
|
boolean |
hasVariance()
Indicates whether there is a variance component.
|
boolean |
hasWCS()
Find out if the NDX has World Coordinate System information.
|
boolean |
isPersistent()
Indicates whether this Ndx represents a persistent object.
|
Source |
toXML(URL base)
Deprecated.
replaced by
getHdxFacade().getSource(base) |
NDArray getImage()
Note that this returns the raw image NDArray
object,
which should not in general be used directly for reading image
data, since it has not been masked by a quality component if present.
To obtain a properly masked version of the image data for read access,
use the Ndxs.getMaskedImage(Ndx)
method.
boolean hasVariance()
getVariance()
may be calledNDArray getVariance()
Note that this returns the raw variance
NDArray
object,
which should not in general be used directly for reading variance
data, since it has not been masked by a quality component if present.
To obtain a properly masked version of the variance data for read access,
use the Ndxs.getMaskedVariance(Ndx)
method.
May only be called if hasVariance()
returns true
.
UnsupportedOperationException
- if hasVariance
returns false
boolean hasQuality()
getQuality()
may be calledNDArray getQuality()
May only be called if hasQuality()
returns true
.
UnsupportedOperationException
- if hasQuality
returns false
boolean hasTitle()
getTitle()
may be calledString getTitle()
hasTitle()
returns true
.UnsupportedOperationException
- if hasTitle
returns false
boolean hasLabel()
getLabel()
may be calledString getLabel()
hasLabel()
returns true
.UnsupportedOperationException
- if hasLabel
returns false
boolean hasUnits()
getUnits()
may be calledString getUnits()
hasUnits()
returns true
.UnsupportedOperationException
- if hasUnits
returns false
boolean hasEtc()
getEtc()
may be calledSource getEtc()
<etc>
which contains an element for each extension.
May only be called if hasEtc()
returns true
.UnsupportedOperationException
- if hasEtc
returns false
SourceReader
boolean hasWCS()
If it exists, then the getAst()
method may be called to
access it as an AST FrameSet
.
Note: in due course, when the uk.ac.starlink.wcs
package has been released a getWCS
method will be
provided to access it as a WCS
object.
getAst()
(and in due course getWCS
can be calledFrameSet getAst()
FrameSet
.
Note: This method is intended as a temporary measure
until the uk.ac.starlink.wcs
package has been released.
At that time a getWCS
method will be provided, and
this one will be deprecated.
UnsupportedOperationException
- if hasWCS
returns false
hasWCS()
int getBadBits()
boolean isPersistent()
toXML(java.net.URL)
method all contain URLs referencing
genuine resources. If false, then this Ndx is in some sense
virtual, and one or more of the array elements in the the XML
generated by toXML
will reference phantom resources.Source toXML(URL base)
getHdxFacade().getSource(base)
Source
. Note that the
array components (image, variance, quality) of this Ndx will only
be recoverable from the returned XML in the case that the
isPersistent()
method returns true.
The XML in general may contain URLs, for instance referencing the
array components of the NDX. How these are written is determined
by the base
parameter; URLs will be written as relative
URLs relative to base
if this is possible (e.g. if they
share a part of their path). If there is no common part of the
path, including the case in which base
is null
,
then an absolute reference will be written.
Does not currently throw HdxException
if the
XML cannot be generated, but it should.
base
- the base URL against which URLs written within the XML
are considered relative. If null, all are written absolute.SourceReader
HdxFacade getHdxFacade()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.