Package inra.ijpb.plugins
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
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 interfaceij.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 imageremoveLeft
- flag to remove labels in the left borderremoveRight
- flag to remove labels in the right borderremoveTop
- flag to remove labels in the top borderremoveBottom
- flag to remove labels in the bottom borderremoveFront
- flag to remove labels in the front borderremoveBack
- flag to remove labels in the back border- Returns:
- label image without border labels
-