com.xinapse.multisliceimage.roi
Enum MaskAction

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

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

This class represents the possible masking operation actions that can be applied to an ROI to mask out some of an image's pixels.


Enum Constant Summary
MASK_INSIDE
          MaskAction for masking pixels inside the ROI.
MASK_INSIDE_SOFT
          MaskAction for soft masking pixels inside the ROI.
MASK_OUTSIDE
          MaskAction for masking pixels outside the ROI.
MASK_OUTSIDE_SOFT
          MaskAction for soft masking pixels outside the ROI.
NONE
          MaskAction for no mask action.
 
Method Summary
static MaskAction getPreferredMaskAction()
          Returns the user's preferred mask action.
static void savePreferences()
          Saves the current preferred mask action to the user's preferences.
static void setPreference(MaskAction ma)
          Sets the user's preferred mask action.
 java.lang.String toString()
          Returns a string describing this MaskAction.
static MaskAction valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MaskAction[] 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

NONE

public static final MaskAction NONE
MaskAction for no mask action.


MASK_INSIDE

public static final MaskAction MASK_INSIDE
MaskAction for masking pixels inside the ROI.


MASK_OUTSIDE

public static final MaskAction MASK_OUTSIDE
MaskAction for masking pixels outside the ROI.


MASK_INSIDE_SOFT

public static final MaskAction MASK_INSIDE_SOFT
MaskAction for soft masking pixels inside the ROI.


MASK_OUTSIDE_SOFT

public static final MaskAction MASK_OUTSIDE_SOFT
MaskAction for soft masking pixels outside the ROI.

Method Detail

values

public static MaskAction[] 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 (MaskAction c : MaskAction.values())
    System.out.println(c);

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

valueOf

public static MaskAction 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

getPreferredMaskAction

public static MaskAction getPreferredMaskAction()
Returns the user's preferred mask action. Set from the user's preferences.

Returns:
the user's preferred mask action.

setPreference

public static void setPreference(MaskAction ma)
Sets the user's preferred mask action. Note that this does not permanently save the setting to user's preferences. To do this, use the method savePreferences.

Parameters:
ma - the user's new preferred mask action.

savePreferences

public static void savePreferences()
Saves the current preferred mask action to the user's preferences.


toString

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

Overrides:
toString in class java.lang.Enum<MaskAction>
Returns:
a string describing this MaskAction.


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