com.xinapse.multisliceimage.Analyze
Class ANZColourMapping

java.lang.Object
  extended by com.xinapse.multisliceimage.ColourMapping
      extended by com.xinapse.multisliceimage.Analyze.ANZColourMapping
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.Icon

public class ANZColourMapping
extends ColourMapping

Class to handle Analyze lookup files (colour mapping files).

Lookup files end in the extension ".lkup" or ".LKUP" and consist of a binary format with 256 entries, where each entry is 3-byte triplet of RBG values for that entry.


Field Summary
static java.lang.String LOWERCASEEXTENSION
          The file extension for Analyze lookup files in lower case form.
static short NENTRIES
          The number of entries in an Analyze colour mapping lookup file.
static java.lang.String UPPERCASEEXTENSION
          The file extension for Analyze lookup files in upper case form.
 
Fields inherited from class com.xinapse.multisliceimage.ColourMapping
BLUE, cm, CYAN, DEFAULT_GAMMA, DEFAULT_MAX_LUMINANCE, DEFAULT_MIN_LUMINANCE, GREEN, HOBS, MAGENTA, MAX_GAMMA, MAX_LUMINANCE, MIN_GAMMA, MIN_LUMINANCE, MONOCHROME1, MONOCHROME2, RBOW1, RBOW2, RED, STEP, YELLOW
 
Constructor Summary
ANZColourMapping(java.lang.String filename)
          Constructs an ANZColourMapping Object by reading the values from the given file.
 
Method Summary
static void writeToFile(ColourMapping colourMapping, java.lang.String filename)
          Writes the specified ColourMapping to an Analyze Colour Lookup file (.lkup).
 
Methods inherited from class com.xinapse.multisliceimage.ColourMapping
addUserColourMapping, clone, colourLookup, colourLookupColourPacked, colourLookupRGBByPlane, colourLookupRGBInterlaced, deleteUserColourMapping, getAllColourMappings, getBuiltInMappings, getColour, getEntriesString, getGamma, getIconHeight, getIconWidth, getInstance, getMaxLuminance, getMinLuminance, getNSlots, getUserMappings, isGreyScale, main, makeTransparent, newInstance, paintIcon, savePreferences, setDisplaySettings, setRGB, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UPPERCASEEXTENSION

public static final java.lang.String UPPERCASEEXTENSION
The file extension for Analyze lookup files in upper case form.

See Also:
Constant Field Values

LOWERCASEEXTENSION

public static final java.lang.String LOWERCASEEXTENSION
The file extension for Analyze lookup files in lower case form.

See Also:
Constant Field Values

NENTRIES

public static final short NENTRIES
The number of entries in an Analyze colour mapping lookup file.

See Also:
Constant Field Values
Constructor Detail

ANZColourMapping

public ANZColourMapping(java.lang.String filename)
                 throws ANZException,
                        java.io.IOException,
                        java.io.FileNotFoundException
Constructs an ANZColourMapping Object by reading the values from the given file.

Parameters:
filename - the file name for the lookup, with or without the extension.
Throws:
ANZException - if the file format is bad.
java.io.FileNotFoundException - if the supplied filename cannot be found.
java.io.IOException - if an I/O error occurs.
Method Detail

writeToFile

public static void writeToFile(ColourMapping colourMapping,
                               java.lang.String filename)
                        throws java.io.IOException
Writes the specified ColourMapping to an Analyze Colour Lookup file (.lkup).

Parameters:
colourMapping - the ColourMapping to be written.
filename - the name of the file to be written.
Throws:
java.io.IOException - if the ColourMapping cannot be written.


Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.