public class Binarize<T extends RealType<T>> extends ContextCommand
Dataset
of type BitType
. Uses an
input Dataset that will be thresholded. Thresholding options can be specified
which are used to discriminate pixel values. The input Dataset can become the
mask if desired.Modifier and Type | Field and Description |
---|---|
static String |
BLACK |
static String |
DEFAULT_METHOD |
static String |
INSIDE |
static String |
OUTSIDE |
static String |
WHITE |
Constructor and Description |
---|
Binarize() |
Modifier and Type | Method and Description |
---|---|
boolean |
changeInput()
Gets whether to change input data to contain the output mask.
|
boolean |
fillMaskBackground()
Gets whether to fill background pixels of binary mask or not.
|
boolean |
fillMaskForeground()
Gets whether to fill foreground pixels of binary mask or not.
|
Dataset |
inputData()
Gets the reference input data.
|
Dataset |
inputMask()
Gets the preexisting mask (if any).
|
String |
maskColor()
Gets the color of the mask pixels.
|
String |
maskPixels()
Gets which pixels are considered part of the mask.
|
Dataset |
outputMask()
Gets the output mask.
|
void |
run() |
void |
setChangeInput(boolean val)
Sets whether to change input data to contain the output mask.
|
void |
setDefaultThresholdMethod()
Sets the threshold method to the default algorithm.
|
void |
setFillMaskBackground(boolean val)
Sets whether to fill background pixels of binary mask or not to the given
specified value.
|
void |
setFillMaskForeground(boolean val)
Sets whether to fill foreground pixels of binary mask or not to the given
specified value.
|
void |
setInputData(Dataset dataset)
Sets the reference input data.
|
void |
setInputMask(Dataset dataset)
Sets the preexisting mask (if any).
|
void |
setMaskColor(String blackOrWhite)
Sets the color of the mask pixels.
|
void |
setMaskPixels(String insideOrOutside)
Sets which pixels are considered part of the mask.
|
void |
setThresholdEachPlane(boolean val)
Set whether to threshold each plane separately or to threshold the whole
image at once.
|
void |
setThresholdMethod(net.imagej.threshold.ThresholdMethod thresholdMethod)
Sets the threshold method to use for pixel discrimination.
|
boolean |
thresholdEachPlane()
Gets whether to threshold each plane separately or to threshold the whole
image at once.
|
net.imagej.threshold.ThresholdMethod |
thresholdMethod()
Gets the threshold method used for pixel discrimination.
|
cancel, getCancelReason, isCanceled
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setContext
public static final String INSIDE
public static final String OUTSIDE
public static final String WHITE
public static final String BLACK
public static final String DEFAULT_METHOD
public void setThresholdMethod(net.imagej.threshold.ThresholdMethod thresholdMethod)
thresholdMethod
- The name of the threshold method to use.public net.imagej.threshold.ThresholdMethod thresholdMethod()
public void setMaskPixels(String insideOrOutside)
insideOrOutside
- One of the values INSIDE or OUTSIDE.public String maskPixels()
public void setMaskColor(String blackOrWhite)
blackOrWhite
- One of the values BLACK or WHITE.public String maskColor()
public void setThresholdEachPlane(boolean val)
public boolean thresholdEachPlane()
public void setFillMaskForeground(boolean val)
val
- The specified value.public boolean fillMaskForeground()
public void setFillMaskBackground(boolean val)
val
- The specified value.public boolean fillMaskBackground()
public void setInputData(Dataset dataset)
dataset
- public Dataset inputData()
public void setInputMask(Dataset dataset)
public Dataset inputMask()
public Dataset outputMask()
public void setChangeInput(boolean val)
public boolean changeInput()
public void setDefaultThresholdMethod()
public void run()
Copyright © 2014–2022 ImageJ. All rights reserved.