Class ConstantBorder

java.lang.Object
inra.ijpb.data.border.ConstantBorder
All Implemented Interfaces:
BorderManager

public class ConstantBorder
extends java.lang.Object
implements BorderManager
Returns either image pixel when position is inside image bounds, or a constant value when position is outside of image bounds.
Author:
David Legland
  • Nested Class Summary

    Nested classes/interfaces inherited from interface inra.ijpb.data.border.BorderManager

    BorderManager.Type
  • Constructor Summary

    Constructors
    Constructor Description
    ConstantBorder​(ij.process.ImageProcessor image, float value)
    Creates a new Constant Border Manager
  • Method Summary

    Modifier and Type Method Description
    int get​(int x, int y)
    Returns either image pixel when position is inside image bounds, or a constant value when position is outside of image bounds.
    float getf​(int x, int y)
    Returns either image pixel when position is inside image bounds, or a constant value when position is outside of image bounds.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface inra.ijpb.data.border.BorderManager

    addBorders
  • Constructor Details

    • ConstantBorder

      public ConstantBorder​(ij.process.ImageProcessor image, float value)
      Creates a new Constant Border Manager
      Parameters:
      image - the image to expand
      value - the value used to expand the borders.
  • Method Details

    • get

      public int get​(int x, int y)
      Returns either image pixel when position is inside image bounds, or a constant value when position is outside of image bounds.
      Specified by:
      get in interface BorderManager
      Parameters:
      x - column index of the position
      y - row index of the position
      Returns:
      border corrected value
      See Also:
      BorderManager.get(int, int)
    • getf

      public float getf​(int x, int y)
      Returns either image pixel when position is inside image bounds, or a constant value when position is outside of image bounds.
      Specified by:
      getf in interface BorderManager
      Parameters:
      x - column index of the position
      y - row index of the position
      Returns:
      border corrected value
      See Also:
      BorderManager.getf(int, int)