jfits
Class FitsConvert

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by jfits.FitsConvert
All Implemented Interfaces:
Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class FitsConvert
extends PropertyBundles

Reads a fits image, applies a scaling algorithm, does flipping if necessary and saves it as a png file.


Nested Class Summary
static class FitsConvert.Allsky
          Reads the allsky file given in the first command line argument and saves it as the second one.
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static int DEFSCALING
          The default scaling algotihm used.
private static boolean DEFXFLIP
          Default flipping along x-axis.
private static boolean DEFYFLIP
          Default flipping along y-axis.
static String KEY_SCALING
          The default scaling algorithm.
static String KEY_XFLIP
          The flipping along the x-axis.
static String KEY_YFLIP
          The flipping along the y-axis.
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
FitsConvert(Map prop)
          Defaults flipping and scaling.
 
Method Summary
 boolean convert(File in, File out, String ext)
          Reads the fits file with the given name and stroes it as the second name.
static void main(String[] arg)
          Reads the file given in the first command line argument and saves it as the second one.
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_SCALING

public static final String KEY_SCALING
The default scaling algorithm.

See Also:
Constant Field Values

KEY_XFLIP

public static final String KEY_XFLIP
The flipping along the x-axis.

See Also:
Constant Field Values

KEY_YFLIP

public static final String KEY_YFLIP
The flipping along the y-axis.

See Also:
Constant Field Values

DEFSCALING

private static final int DEFSCALING
The default scaling algotihm used.

See Also:
Constant Field Values

DEFXFLIP

private static final boolean DEFXFLIP
Default flipping along x-axis.

See Also:
Constant Field Values

DEFYFLIP

private static final boolean DEFYFLIP
Default flipping along y-axis.

See Also:
Constant Field Values
Constructor Detail

FitsConvert

public FitsConvert(Map prop)
Defaults flipping and scaling.

Method Detail

convert

public boolean convert(File in,
                       File out,
                       String ext)
Reads the fits file with the given name and stroes it as the second name.


main

public static void main(String[] arg)
Reads the file given in the first command line argument and saves it as the second one. If a third argument is given, we use this as a format identifier, otherwise we default to png.