Module ij
Package ij.plugin

Class FITS_Writer

  • All Implemented Interfaces:
    PlugIn

    public class FITS_Writer
    extends Object
    implements PlugIn
    This plugin saves a 16 or 32 bit image in FITS format. It is a stripped-down version of the SaveAs_FITS plugin from the collection of astronomical image processing plugins by Jennifer West at http://www.umanitoba.ca/faculties/science/astronomy/jwest/plugins.html.
    Version 2010-11-23 : corrects 16-bit writing, adds BZERO & BSCALE updates (K.A. Collins, Univ. Louisville).
    Version 2008-09-07 : preserves non-minimal FITS header if already present (F.V. Hessman, Univ. Goettingen).
    Version 2008-12-15 : fixed END card recognition bug (F.V. Hessman, Univ. Goettingen).
    Version 2019-11-03 : various updates (K.A. Collins, CfA-Harvard and Smithsonian).
    • Constructor Detail

      • FITS_Writer

        public FITS_Writer()
    • Method Detail

      • run

        public void run​(String path)
        Description copied from interface: PlugIn
        This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.
        Specified by:
        run in interface PlugIn
      • getHeader

        public static String[] getHeader​(ImagePlus img)
        Extracts the original FITS header from the Properties object of the ImagePlus image (or from the current slice label in the case of an ImageStack) and returns it as an array of String objects representing each card. Taken from the ImageJ astroj package (www.astro.physik.uni-goettingen.de/~hessman/ImageJ/Astronomy)
        Parameters:
        img - The ImagePlus image which has the FITS header in it's "Info" property.