net.grelf.image
Class FITS

java.lang.Object
  extended by net.grelf.image.FITS

public class FITS
extends java.lang.Object

For loading and saving images as files in FITS format.
Loading will create an object implementing the interface net.grelf.image.Image. Notes:

  1. Loads each image found in a file and holds its metadata (eg, exposure settings) as an ordered list.
  2. For 3D arrays (FITS NAXES=3) it is assumed that the axis with the smallest length is the channels (bands) axis.
  3. The code can create images with more than 3 channels if the the number of bits per channel is greater than 16. (In GRIP in that case only the first 3 channels will be displayed but the "Split channels" option on the levels menu will create as many monochrome images as there are channels. Any group of 3 can then be recombined via the image table.) If the image in the file has only 8 or 16 bits per channel then instead the file loader creates multiple monochrome images (and GRIP will display them all in separate frames).


Constructor Summary
FITS()
           
 
Method Summary
 java.util.List<Image> loadImage(java.io.File file)
          Version not using any third party packages, to avoid creating unnecessary intermediate data arrays.
static java.lang.String padTo(int paddedLength, java.lang.String s)
          Appends space characters (code 32) to a String.
static java.lang.StringBuffer padTo(int paddedLength, java.lang.StringBuffer sb)
          Appends space characters (code 32) to a StringBuffer.
static java.lang.String rJustified20(int n)
          Makes n into a right-justified String of length 20.
 void saveImage(java.lang.String filePath, Image image)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FITS

public FITS()
Method Detail

saveImage

public void saveImage(java.lang.String filePath,
                      Image image)

padTo

public static java.lang.String padTo(int paddedLength,
                                     java.lang.String s)
Appends space characters (code 32) to a String.


padTo

public static java.lang.StringBuffer padTo(int paddedLength,
                                           java.lang.StringBuffer sb)
Appends space characters (code 32) to a StringBuffer.


rJustified20

public static java.lang.String rJustified20(int n)
Makes n into a right-justified String of length 20.


loadImage

public java.util.List<Image> loadImage(java.io.File file)
Version not using any third party packages, to avoid creating unnecessary intermediate data arrays.