Interface BorderManager

All Known Implementing Classes:
ConstantBorder, MirroringBorder, PeriodicBorder, ReplicatedBorder

public interface BorderManager
Manages borders of an image, by providing methods for accessing values also for position out of image bounds.

 ImageProcessor image = ...
 BorderManager bm = new ReplicatedBorder(image);
 int value = bm.get(-5, -10);
 
Author:
David Legland
  • Nested Class Summary

    Nested Classes
    Modifier and Type Interface Description
    static class  BorderManager.Type
    A set of pre-defined border managers stored in an enumeration.
  • Method Summary

    Modifier and Type Method Description
    default ij.process.ImageProcessor addBorders​(ij.process.ImageProcessor image, int left, int right, int top, int bottom)
    Adds the specified number of pixels around the input image, and returns the resulting image.
    int get​(int x, int y)
    Returns the value corresponding to (x,y) position.
    float getf​(int x, int y)
    Returns the floating-point value corresponding to (x,y) position.
  • Method Details

    • addBorders

      default ij.process.ImageProcessor addBorders​(ij.process.ImageProcessor image, int left, int right, int top, int bottom)
      Adds the specified number of pixels around the input image, and returns the resulting image.
      Parameters:
      image - the input image
      left - the number of pixels to add to the left of the image
      right - the number of pixels to add to the right of the image
      top - the number of pixels to add on top of the image
      bottom - the number of pixels to add at the bottom of the image
      Returns:
      a new image with extended borders
    • get

      int get​(int x, int y)
      Returns the value corresponding to (x,y) position. Position can be outside original image bounds.
      Parameters:
      x - column index of the position
      y - row index of the position
      Returns:
      border corrected value
    • getf

      float getf​(int x, int y)
      Returns the floating-point value corresponding to (x,y) position. Position can be outside original image bounds.
      Parameters:
      x - column index of the position
      y - row index of the position
      Returns:
      border corrected value