Package com.xinapse.multisliceimage.roi
Enum Class CombineMode
- All Implemented Interfaces:
Serializable,Comparable<CombineMode>,Constable
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
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCombineModefor creating the intersection of all ROIs.CombineModefor creating a union of all ROIs.CombineModefor creating the exclusive OR (XOR) of all ROIs. -
Method Summary
Modifier and TypeMethodDescriptionstatic CombineModegetPreferredCombineMode(Preferences prefs, CombineMode defaultCombineMode) Returns theCombineModeset in the UserPreferences, or the defaultCombineMode, if none is set in the Preferences.static voidsavePreferences(CombineMode combineMode, Preferences prefs) Saves the suppliedCombineModeas the user's preferrred CombineMode.toString()Returns a string describing thisCombineMode.static CombineModeReturns the enum constant of this class with the specified name.static CombineMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNION
CombineModefor creating a union of all ROIs. -
INTERSECTION
CombineModefor creating the intersection of all ROIs. -
XOR
CombineModefor creating the exclusive OR (XOR) of all ROIs.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
Returns a string describing thisCombineMode.- Overrides:
toStringin classEnum<CombineMode>- Returns:
- a
Stringdescribing thisCombineMode.
-
savePreferences
Saves the suppliedCombineModeas the user's preferrred CombineMode.- Parameters:
combineMode- theCombineModeto save in the user's preferences.prefs- the user Preferences in which to save theCombineMode.
-
getPreferredCombineMode
public static CombineMode getPreferredCombineMode(Preferences prefs, CombineMode defaultCombineMode) Returns theCombineModeset in the UserPreferences, or the defaultCombineMode, if none is set in the Preferences.- Parameters:
prefs- the user Preferences in which to look for the preferredCombineMode.defaultCombineMode- the default to return if the preferredCombineModecannot be found in the user Preferences.- Returns:
- the user's preferred
CombineMode.
-