public class HDecompressor extends Object
DataInputStream dis = new DataInputStream( new FileInputStream(arg[0]));
byte [] pixels=Hdecomp.decomp( (InputStream)dis );
where the user needs to translate the byte stream back into a series of shorts.
DataInputStream dis = new DataInputStream( new FileInputStream(arg[0]));
Hdecomp hd = new Hdecomp(dis);
hd.decomp();
int[] pixels = hd.getImage();
int nx = hd.getNx();
int ny = hd.getNy();
| Constructor and Description |
|---|
HDecompressor()
Create a bare decompressor object.
|
HDecompressor(InputStream dis)
Create a decompressor associating it with a given input stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decompress()
Decompress the input stream.
|
static int[] |
decompress(InputStream fdis)
Hdecompress static method.
|
int[] |
getImage()
Get decompressed image as a one-d array of ints.
|
int |
getNx()
Get the X-dimension of the decompressed image.
|
int |
getNy()
Get the Y-dimension of the decompressed image.
|
void |
setInputStream(InputStream dis)
Set the input stream for an Hdecomp object.
|
public HDecompressor()
public HDecompressor(InputStream dis)
dis - The input stream from which the compressed data is derived.public void setInputStream(InputStream dis)
dis - The input stream from which the compressed data is derived.public static int[] decompress(InputStream fdis) throws Exception
fdis - The input stream from which compressed data
is to be extracted. It should begin with the
magic characters [0xDD, 0x99]. If the compressed data
is preceded by a FITS header it is the responsibility
of the program to skip past the header before
calling this routine.Exceptionpublic void decompress()
throws Exception
Exceptionpublic int getNx()
public int getNy()
public int[] getImage()