public class FitsNdxHandler
extends java.lang.Object
When reading an NDX from a FITS file, the handler will look for the NDX_XML header; if one is found it will retrieve the metadata from the XML stored in the referenced table extension as described above. If this header is not present, it will make an NDX with no components apart from the image array it is pointed at and any WCS defined by FITS WCS headers in that HDU in the normal way.
The coordinate system information of an NDX written to a FITS file is currently written to the Image HDU for use by non-NDX-aware software. However, the WCS is read from the XML if present, so in the case of discrepancies between the two the WCS represented in the FITS headers may be out of date.
FitsArrayBuilder
class. If an HDU other than the first one is referenced, that is
where the NDX_XML header will be sought.
This is a singleton class; use getInstance()
to get an instance.
Modifier and Type | Method and Description |
---|---|
static FitsNdxHandler |
getInstance()
Returns a FitsNdxHandler.
|
boolean |
makeBlankNdx(java.net.URL url,
Ndx template) |
org.w3c.dom.Document |
makeHdxDocument(java.net.URL url) |
javax.xml.transform.Source |
makeHdxSource(java.net.URL url) |
Ndx |
makeNdx(java.net.URL url,
uk.ac.starlink.array.AccessMode mode) |
void |
outputNdx(nom.tam.util.ArrayDataOutput strm,
java.net.URL url,
Ndx ndx)
Writes an NDX to a given output stream.
|
boolean |
outputNdx(java.net.URL url,
Ndx ndx) |
public static FitsNdxHandler getInstance()
public Ndx makeNdx(java.net.URL url, uk.ac.starlink.array.AccessMode mode) throws java.io.IOException
java.io.IOException
public boolean makeBlankNdx(java.net.URL url, Ndx template) throws java.io.IOException
java.io.IOException
public boolean outputNdx(java.net.URL url, Ndx ndx) throws java.io.IOException
java.io.IOException
public void outputNdx(nom.tam.util.ArrayDataOutput strm, java.net.URL url, Ndx ndx) throws java.io.IOException
strm
- the stream to which the NDX should be writtenurl
- the URL represented by the stream; may be nullndx
- the ndx to writejava.io.IOException
public org.w3c.dom.Document makeHdxDocument(java.net.URL url) throws HdxException
HdxException
public javax.xml.transform.Source makeHdxSource(java.net.URL url) throws HdxException
HdxException
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.