net.aerith.misao.image.io
Class FitsHeader
java.lang.Object
|
+--net.aerith.misao.image.io.FitsHeader
- public class FitsHeader
- extends java.lang.Object
The FitsHeader
represents the keys and values of the
FITS header.
Field Summary |
protected java.lang.String |
header_string
The header string. |
protected java.util.Properties |
properties
The hash table of FITS header keys. |
Constructor Summary |
protected |
FitsHeader()
Constructs an empty FitsHeader . |
|
FitsHeader(MonoImage image)
Constructs a simple FitsHeader of the specified
image. |
Method Summary |
java.lang.String |
getProperty(java.lang.String key)
Gets the value of the specified key. |
static FitsHeader |
read(java.io.DataInput input)
Reads the header of FITS file and creates a new
FitsHeader . |
void |
write(java.io.DataOutput output)
Writes the FITS header. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
header_string
protected java.lang.String header_string
- The header string.
properties
protected java.util.Properties properties
- The hash table of FITS header keys.
FitsHeader
protected FitsHeader()
- Constructs an empty
FitsHeader
.
FitsHeader
public FitsHeader(MonoImage image)
throws UnsupportedBufferTypeException
- Constructs a simple
FitsHeader
of the specified
image. The type of FITS file is properly determined based on
the buffer type. It only supports BITPIX 8, 16 and 32 bits
images.
- Parameters:
image
- the image.- Throws:
- UnsupportedBufferTypeException - if the data type is
unsupported.
getProperty
public java.lang.String getProperty(java.lang.String key)
- Gets the value of the specified key.
- Parameters:
key
- the key.- Returns:
- the value of the specified key.
read
public static FitsHeader read(java.io.DataInput input)
throws java.io.IOException
- Reads the header of FITS file and creates a new
FitsHeader
.
- Parameters:
input
- the stream for data input.- Returns:
- the FITS header.
- Throws:
- java.io.IOException - if I/O error occurs.
write
public void write(java.io.DataOutput output)
throws java.io.IOException
- Writes the FITS header.
- Parameters:
output
- the output target.- Throws:
- java.io.IOException - if I/O error occurs.