Class ValueSelection
java.lang.Object
com.eco.bio7.spatial.ValueSelection
The values of a stack which are displayed as a volume or an iso surface: all
values (the default), a range of values (e.g., the threshold of the image in
ImageJ: only the particles) or a list of values (the labels of a
segmentation).
The iso surface of a range is the surface of the values at both limits (interpolated like the iso surface of a value), the iso surface of a list of labels is the surface of the voxels with one of the labels (the border between a selected and another voxel, half way between the centers of the voxels).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ValueSelectionAll values (no selection).static final ValueSelectionThe threshold of the image in ImageJ (the lower and the upper limit), read when the stack is loaded (see resolve). -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(double value) Returns true if the value is selected.booleaninthashCode()booleanisAll()Returns true if all values are selected (no selection).booleanReturns true for the threshold of the image (resolved when a stack is loaded).booleanisLabels()Returns true for a list of labels.booleanisRange()Returns true for a range of values.static ValueSelectionlabels(double... labels) The labels of a segmentation (each value is an object or a class).static ValueSelectionThe labels of a segmentation as a text: values and ranges separated by commas or spaces, e.g., "1, 5, 10-20" (a range includes both limits).static ValueSelectionrange(double lower, double upper) The values from lower to upper (inclusive), e.g., a threshold.resolve(ij.ImagePlus imp) Returns the selection for a stack: the threshold of the image for IMAGE_THRESHOLD (ALL if no threshold is set or for RGB images), else this selection.toString()Returns a description, e.g., "Threshold 50 - 255" or "Labels 1, 5, 10-20".
-
Field Details
-
ALL
All values (no selection). -
IMAGE_THRESHOLD
The threshold of the image in ImageJ (the lower and the upper limit), read when the stack is loaded (see resolve).
-
-
Method Details
-
range
The values from lower to upper (inclusive), e.g., a threshold. The surface is interpolated at both limits.- Parameters:
lower- the lower limit (-Infinity: no lower limit)upper- the upper limit (Infinity: no upper limit)
-
labels
The labels of a segmentation (each value is an object or a class).- Parameters:
labels- the selected values
-
labels
The labels of a segmentation as a text: values and ranges separated by commas or spaces, e.g., "1, 5, 10-20" (a range includes both limits).- Parameters:
list- the labels- Throws:
IllegalArgumentException- if the text is not a list of labels
-
resolve
Returns the selection for a stack: the threshold of the image for IMAGE_THRESHOLD (ALL if no threshold is set or for RGB images), else this selection. -
isAll
public boolean isAll()Returns true if all values are selected (no selection). -
isImageThreshold
public boolean isImageThreshold()Returns true for the threshold of the image (resolved when a stack is loaded). -
isRange
public boolean isRange()Returns true for a range of values. -
isLabels
public boolean isLabels()Returns true for a list of labels. -
contains
public boolean contains(double value) Returns true if the value is selected. -
toString
-
equals
-
hashCode
-