Class ReplicatedBorder

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

public class ReplicatedBorder
extends java.lang.Object
implements BorderManager
Assess pixel outside image bounds have same value as the closest pixel on image border.
Author:
David Legland
  • Nested Class Summary

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

    BorderManager.Type
  • Constructor Summary

    Constructors
    Constructor Description
    ReplicatedBorder​(ij.process.ImageProcessor image)
    Creates a new Replicating Border Manager
  • Method Summary

    Modifier and Type Method Description
    int get​(int x, int y)
    Forces both of x and y to be between 0 and the corresponding image size, and returns the corresponding image value.
    float getf​(int x, int y)
    Forces both of x and y to be between 0 and the corresponding image size, and returns the corresponding image value.

    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

    • ReplicatedBorder

      public ReplicatedBorder​(ij.process.ImageProcessor image)
      Creates a new Replicating Border Manager
      Parameters:
      image - the image to expand
  • Method Details

    • get

      public int get​(int x, int y)
      Forces both of x and y to be between 0 and the corresponding image size, and returns the corresponding image value.
      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)
      Forces both of x and y to be between 0 and the corresponding image size, and returns the corresponding image value.
      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)