Enum Class SubSampleType

java.lang.Object
java.lang.Enum<SubSampleType>
com.xinapse.image.SubSampleType
All Implemented Interfaces:
Serializable, Comparable<SubSampleType>, Constable

public enum SubSampleType extends Enum<SubSampleType>
An enumeration of the types of sub-sampling to be used for resampling images.
  • Enum Constant Details

    • NN

      public static final SubSampleType NN
      Sub-sampling by selecting the nearest neighbour.
    • BY_AVERAGING

      public static final SubSampleType BY_AVERAGING
      Sub-sampling by averaging across nearest pixels.
    • LPF

      public static final SubSampleType LPF
      Sub-sampling by low-pass filtering and sinc interpolation.
  • Method Details

    • values

      public static SubSampleType[] 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

      public static SubSampleType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getInstance

      public static SubSampleType getInstance(String s) throws InvalidArgumentException
      Returns the SubSampleType corresponding to a String representation.
      Parameters:
      s - a String which has been obtained by a the toString() method. Case is ignored.
      Returns:
      the SubSampleType corresponding to a String representation.
      Throws:
      InvalidArgumentException - if the String is invalid.
    • getPreferredSubSampleType

      public static SubSampleType getPreferredSubSampleType(Preferences prefs, SubSampleType defaultType)
      Returns the SubSampleType set in the preferences.
      Parameters:
      prefs - the Preferences in which to look.
      defaultType - the default SubSampleType to return if not set in the Preferences.
      Returns:
      the SubSampleType set in the preferences, or the default.
    • savePreferredSubSampleType

      public static void savePreferredSubSampleType(Preferences prefs, SubSampleType subSampleType)
      Save a SubSampleType to the preferences.
      Parameters:
      prefs - the Preferences in which to save the type.
      subSampleType - the type to save in the Preferences.
    • toString

      public String toString()
      Returns a String describing this sub sampling type.
      Overrides:
      toString in class Enum<SubSampleType>
      Returns:
      a String describing this sub sampling type.