Package com.xinapse.image
Enum Class SubSampleType
- All Implemented Interfaces:
Serializable,Comparable<SubSampleType>,Constable
An enumeration of the types of sub-sampling to be used for resampling images.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSub-sampling by averaging across nearest pixels.Sub-sampling by low-pass filtering and sinc interpolation.Sub-sampling by selecting the nearest neighbour. -
Method Summary
Modifier and TypeMethodDescriptionstatic SubSampleTypeReturns theSubSampleTypecorresponding to a String representation.static SubSampleTypegetPreferredSubSampleType(Preferences prefs, SubSampleType defaultType) Returns theSubSampleTypeset in the preferences.static voidsavePreferredSubSampleType(Preferences prefs, SubSampleType subSampleType) Save aSubSampleTypeto the preferences.toString()Returns a String describing this sub sampling type.static SubSampleTypeReturns the enum constant of this class with the specified name.static SubSampleType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NN
Sub-sampling by selecting the nearest neighbour. -
BY_AVERAGING
Sub-sampling by averaging across nearest pixels. -
LPF
Sub-sampling by low-pass filtering and sinc interpolation.
-
-
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
-
getInstance
Returns theSubSampleTypecorresponding to a String representation.- Parameters:
s- a String which has been obtained by a thetoString()method. Case is ignored.- Returns:
- the
SubSampleTypecorresponding to a String representation. - Throws:
InvalidArgumentException- if the String is invalid.
-
getPreferredSubSampleType
Returns theSubSampleTypeset in the preferences.- Parameters:
prefs- thePreferencesin which to look.defaultType- the defaultSubSampleTypeto return if not set in the Preferences.- Returns:
- the
SubSampleTypeset in the preferences, or the default.
-
savePreferredSubSampleType
Save aSubSampleTypeto the preferences.- Parameters:
prefs- thePreferencesin which to save the type.subSampleType- the type to save in the Preferences.
-
toString
Returns a String describing this sub sampling type.- Overrides:
toStringin classEnum<SubSampleType>- Returns:
- a String describing this sub sampling type.
-