com.xinapse.multisliceimage.roi
Enum CombineMode

java.lang.Object
  extended by java.lang.Enum<CombineMode>
      extended by com.xinapse.multisliceimage.roi.CombineMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CombineMode>

public enum CombineMode
extends java.lang.Enum<CombineMode>

An enumeration of possible ROI combination operations that can be be applied to a set of ROIs to create a single resulting ROI.


Nested Class Summary
static class CombineMode.Panel
          A JPanel for selecting a CombineMode.
 
Enum Constant Summary
INTERSECTION
          CombineMode for creating the intersection of all ROIs.
UNION
          CombineMode for creating a union of all ROIs.
XOR
          CombineMode for creating the exclusive OR (XOR) of all ROIs.
 
Method Summary
static CombineMode getPreferredCombineMode(java.util.prefs.Preferences prefs, CombineMode defaultCombineMode)
          Returns the CombineMode set in the UserPreferences, or the default CombineMode, if none is set in the Preferences.
static void savePreferences(CombineMode combineMode, java.util.prefs.Preferences prefs)
          Saves the supplied CombineMode as the user's preferrred CombineMode.
 java.lang.String toString()
          Returns a string describing this CombineMode.
static CombineMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CombineMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNION

public static final CombineMode UNION
CombineMode for creating a union of all ROIs.


INTERSECTION

public static final CombineMode INTERSECTION
CombineMode for creating the intersection of all ROIs.


XOR

public static final CombineMode XOR
CombineMode for creating the exclusive OR (XOR) of all ROIs.

Method Detail

values

public static CombineMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CombineMode c : CombineMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CombineMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Returns a string describing this CombineMode.

Overrides:
toString in class java.lang.Enum<CombineMode>
Returns:
a java.lang.String describing this CombineMode.

savePreferences

public static void savePreferences(CombineMode combineMode,
                                   java.util.prefs.Preferences prefs)
Saves the supplied CombineMode as the user's preferrred CombineMode.

Parameters:
combineMode - the CombineMode to save in the user's preferences.
prefs - the user Preferences in which to save the CombineMode.

getPreferredCombineMode

public static CombineMode getPreferredCombineMode(java.util.prefs.Preferences prefs,
                                                  CombineMode defaultCombineMode)
Returns the CombineMode set in the UserPreferences, or the default CombineMode, if none is set in the Preferences.

Parameters:
prefs - the user Preferences in which to look for the preferred CombineMode.
defaultCombineMode - the default to return if the preferred CombineMode cannot be found in the user Preferences.
Returns:
the user's preferred CombineMode.


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