Interface BorderManager3D

All Known Implementing Classes:
ConstantBorder3D, MirroringBorder3D, PeriodicBorder3D, ReplicatedBorder3D

public interface BorderManager3D
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  BorderManager3D.Type
    A set of pre-defined border managers stored in an enumeration.
  • Method Summary

    Modifier and Type Method Description
    default ij.ImageStack addBorders​(ij.ImageStack image, int left, int right, int top, int bottom, int front, int back)
    Adds the specified number of voxels around the input image, and returns the resulting image.
    int get​(int x, int y, int z)
    Returns the value corresponding to (x,y) position.
  • Method Details

    • addBorders

      default ij.ImageStack addBorders​(ij.ImageStack image, int left, int right, int top, int bottom, int front, int back)
      Adds the specified number of voxels around the input image, and returns the resulting image.
      Parameters:
      image - the input image stack
      left - the number of voxels to add to the left
      right - the number of voxels to add to the right
      top - the number of voxels to add on top of the stack
      bottom - the number of voxels to add at the bottom of the stack
      front - the number of slices to add in front of the stack
      back - the number of slices to add behind the stack
      Returns:
      a new image with extended borders
    • get

      int get​(int x, int y, int z)
      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
      z - slice index of the position
      Returns:
      border corrected value