Enum BorderManager.Type

java.lang.Object
java.lang.Enum<BorderManager.Type>
inra.ijpb.data.border.BorderManager.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<BorderManager.Type>, java.lang.constant.Constable
Enclosing interface:
BorderManager

public static enum BorderManager.Type
extends java.lang.Enum<BorderManager.Type>
A set of pre-defined border managers stored in an enumeration. Each type is associated with a label, for better user-interface integration. The set of all labels can be obtained via static method getAllLabels(), and can be used as input of list dialogs. To get the type corresponding to a given label, use the twin method fromLabel(String).

 // init initial values 
 ImageProcessor image = ...
 String borderManagerName = "Periodic";
 
 // create border manager from name and image
 BorderManager.Type bmType = BorderManager.Type.fromLabel(borderManagerName);
 BorderManager bm = bmType.createBorderManager(image);
 int value = bm.get(-5, -10);
 
Author:
David Legland
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant Description
    BLACK
    uses black value (0) to fill border
    GRAY
    uses gray value (0) to fill border
    MIRRORED
    uses mirrored image to populate border
    PERIODIC
    uses periodic boundary to populate border
    REPLICATED
    replicates nearest pixel to populate border
    WHITE
    uses white value (0) to fill border
  • Method Summary

    Modifier and Type Method Description
    BorderManager createBorderManager​(ij.process.ImageProcessor image)
    Creates a new Border Manager for the input image.
    static BorderManager.Type fromLabel​(java.lang.String label)
    Determines the operation type from its label.
    static java.lang.String[] getAllLabels()  
    java.lang.String getLabel()  
    java.lang.String toString()  
    static BorderManager.Type valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static BorderManager.Type[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • REPLICATED

      public static final BorderManager.Type REPLICATED
      replicates nearest pixel to populate border
    • PERIODIC

      public static final BorderManager.Type PERIODIC
      uses periodic boundary to populate border
    • MIRRORED

      public static final BorderManager.Type MIRRORED
      uses mirrored image to populate border
    • BLACK

      public static final BorderManager.Type BLACK
      uses black value (0) to fill border
    • WHITE

      public static final BorderManager.Type WHITE
      uses white value (0) to fill border
    • GRAY

      public static final BorderManager.Type GRAY
      uses gray value (0) to fill border
  • Method Details

    • values

      public static BorderManager.Type[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static BorderManager.Type 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
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Enum<BorderManager.Type>
    • getLabel

      public java.lang.String getLabel()
      Returns:
      the label used to identify this border manager
    • createBorderManager

      public BorderManager createBorderManager​(ij.process.ImageProcessor image)
      Creates a new Border Manager for the input image.
      Parameters:
      image - the image to wrap
      Returns:
      a new instance of BorderManager
    • getAllLabels

      public static java.lang.String[] getAllLabels()
      Returns:
      all the labels used for identifying this enumeration.
    • fromLabel

      public static BorderManager.Type fromLabel​(java.lang.String label)
      Determines the operation type from its label.
      Parameters:
      label - the name of the border manager
      Returns:
      the enumeration item corresponding to the name
      Throws:
      java.lang.IllegalArgumentException - if label is not recognized.