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 classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionCombineMode
for creating the intersection of all ROIs.CombineMode
for creating a union of all ROIs.CombineMode
for creating the exclusive OR (XOR) of all ROIs. -
Method Summary
Modifier and TypeMethodDescriptionstatic CombineMode
getPreferredCombineMode
(Preferences prefs, CombineMode defaultCombineMode) Returns theCombineMode
set in the UserPreferences, or the defaultCombineMode
, if none is set in the Preferences.static void
savePreferences
(CombineMode combineMode, Preferences prefs) Saves the suppliedCombineMode
as the user's preferrred CombineMode.toString()
Returns a string describing thisCombineMode
.static CombineMode
Returns 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
CombineMode
for creating a union of all ROIs. -
INTERSECTION
CombineMode
for creating the intersection of all ROIs. -
XOR
CombineMode
for 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:
toString
in classEnum<CombineMode>
- Returns:
- a
String
describing thisCombineMode
.
-
savePreferences
Saves the suppliedCombineMode
as the user's preferrred CombineMode.- Parameters:
combineMode
- theCombineMode
to 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 theCombineMode
set 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 preferredCombineMode
cannot be found in the user Preferences.- Returns:
- the user's preferred
CombineMode
.
-