Class RemoveBorderLabelsPlugin

java.lang.Object
inra.ijpb.plugins.RemoveBorderLabelsPlugin
All Implemented Interfaces:
ij.plugin.PlugIn

public class RemoveBorderLabelsPlugin
extends java.lang.Object
implements ij.plugin.PlugIn
Removes all labels that touch the selected border, and replace them with value 0. The plugins first opens a dialog that allows to choose the borders to consider. For 3D images, front and back borders can also be chosen. Then the labels that touch at least one of the selected borders are replaced by the value zero. The result is shown in a new ImagePlus.
Author:
David Legland
See Also:
LabelImages
  • Constructor Summary

    Constructors
    Constructor Description
    RemoveBorderLabelsPlugin()  
  • Method Summary

    Modifier and Type Method Description
    static ij.ImagePlus remove​(ij.ImagePlus labelImage, boolean removeLeft, boolean removeRight, boolean removeTop, boolean removeBottom, boolean removeFront, boolean removeBack)
    Remove labels in the border of the image
    void run​(java.lang.String arg0)  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RemoveBorderLabelsPlugin

      public RemoveBorderLabelsPlugin()
  • Method Details

    • run

      public void run​(java.lang.String arg0)
      Specified by:
      run in interface ij.plugin.PlugIn
    • remove

      public static ij.ImagePlus remove​(ij.ImagePlus labelImage, boolean removeLeft, boolean removeRight, boolean removeTop, boolean removeBottom, boolean removeFront, boolean removeBack)
      Remove labels in the border of the image
      Parameters:
      labelImage - input label image
      removeLeft - flag to remove labels in the left border
      removeRight - flag to remove labels in the right border
      removeTop - flag to remove labels in the top border
      removeBottom - flag to remove labels in the bottom border
      removeFront - flag to remove labels in the front border
      removeBack - flag to remove labels in the back border
      Returns:
      label image without border labels