Package inra.ijpb.label
Class LabelValues
java.lang.Object
inra.ijpb.label.LabelValues
public class LabelValues
extends java.lang.Object
Utility methods for combining label images and intensity images.
- Author:
- David Legland
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LabelValues.Position3DValuePair
Inner class for storing a value associated to a 3D position.static class
LabelValues.PositionValuePair
Inner class for storing a value associated to a 2D position. -
Method Summary
Modifier and Type Method Description static LabelValues.Position3DValuePair[]
findMaxValues(ij.ImageStack valueImage, ij.ImageStack labelImage, int[] labels)
For each label, finds the position of the 3D point belonging to label region defined by the 3DlabelImage
and with maximal value in intensity 3D imagevalueImage
.static LabelValues.PositionValuePair[]
findMaxValues(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage, int[] labels)
For each label, finds the position of the point belonging to label region defined bylabelImage
and with maximal value in intensity imagevalueImage
.static LabelValues.Position3DValuePair[]
findMinValues(ij.ImageStack valueImage, ij.ImageStack labelImage, int[] labels)
For each label, finds the position of the 3D point belonging to 3D label region defined bylabelImage
and with minimal value in 3D intensity imagevalueImage
.static LabelValues.PositionValuePair[]
findMinValues(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage, int[] labels)
For each label, finds the position of the point belonging to label region defined bylabelImage
and with minimal value in intensity imagevalueImage
.static Cursor3D[]
findPositionOfMaxValues(ij.ImageStack valueImage, ij.ImageStack labelImage, int[] labels)
For each label, finds the position of the point belonging to label region defined bylabelImage
and with maximal value in intensity imagevalueImage
.static java.awt.Point[]
findPositionOfMaxValues(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage, int[] labels)
For each label, finds the position of the point belonging to label region defined bylabelImage
and with maximal value in intensity imagevalueImage
.static Cursor3D[]
findPositionOfMinValues(ij.ImageStack valueImage, ij.ImageStack labelImage, int[] labels)
For each label, finds the position of the point belonging to label region defined bylabelImage
and with minimal value in intensity imagevalueImage
.static java.awt.Point[]
findPositionOfMinValues(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage, int[] labels)
For each label, finds the position of the point belonging to label region defined bylabelImage
and with minimal value in intensity imagevalueImage
.static double[]
maxValues(ij.ImageStack image, ij.ImageStack labelImage, int[] labels)
Find maximum value in intensity image for each label.static double[]
maxValues(ij.process.ImageProcessor image, ij.process.ImageProcessor labelImage, int[] labels)
Find maximum value in intensity image for each label.static double
maxValueWithinLabels(ij.ImageStack valueImage, ij.ImageStack labelImage)
Computes the largest value within thevalueImage
, using the strictly positive values inlabelImage
as mask.static double
maxValueWithinLabels(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage)
Computes the largest value within thevalueImage
, using the strictly positive values inlabelImage
as mask.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
maxValueWithinLabels
public static final double maxValueWithinLabels(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage)Computes the largest value within thevalueImage
, using the strictly positive values inlabelImage
as mask. Can be used to setup min/max display value after computing a distance transform.- Parameters:
valueImage
- the image containing values (e.g. a distance map)labelImage
- the image containing strictly positive values for foreground- Returns:
- the maximum value within the value image restricted to the label image
-
maxValueWithinLabels
public static final double maxValueWithinLabels(ij.ImageStack valueImage, ij.ImageStack labelImage)Computes the largest value within thevalueImage
, using the strictly positive values inlabelImage
as mask. Can be used to setup min/max display value after computing a distance transform.- Parameters:
valueImage
- the image containing values (e.g. a distance map)labelImage
- the image containing strictly positive values for foreground- Returns:
- the maximum value within the value image restricted to the label image
-
maxValues
public static final double[] maxValues(ij.process.ImageProcessor image, ij.process.ImageProcessor labelImage, int[] labels)Find maximum value in intensity image for each label.- Parameters:
image
- the intensity imagelabelImage
- the image containing labelslabels
- the list of labels for which the values are computed- Returns:
- an array of values corresponding to the maximum value within each label
-
maxValues
public static final double[] maxValues(ij.ImageStack image, ij.ImageStack labelImage, int[] labels)Find maximum value in intensity image for each label.- Parameters:
image
- the intensity 3D imagelabelImage
- the 3D image containing labelslabels
- the list of labels for which the values are computed- Returns:
- an array of values corresponding to the maximum value within each label
-
findMaxValues
public static final LabelValues.PositionValuePair[] findMaxValues(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage, int[] labels)For each label, finds the position of the point belonging to label region defined bylabelImage
and with maximal value in intensity imagevalueImage
.- Parameters:
valueImage
- the intensity image containing values to comparelabelImage
- the intensity image containing label of each pixellabels
- the list of labels in the label image- Returns:
- the position of maximum value in intensity image for each label
-
findMaxValues
public static final LabelValues.Position3DValuePair[] findMaxValues(ij.ImageStack valueImage, ij.ImageStack labelImage, int[] labels)For each label, finds the position of the 3D point belonging to label region defined by the 3DlabelImage
and with maximal value in intensity 3D imagevalueImage
.- Parameters:
valueImage
- the intensity image containing values to comparelabelImage
- the intensity image containing label of each pixellabels
- the list of labels in the label image- Returns:
- the position of maximum value in intensity image for each label
-
findMinValues
public static final LabelValues.PositionValuePair[] findMinValues(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage, int[] labels)For each label, finds the position of the point belonging to label region defined bylabelImage
and with minimal value in intensity imagevalueImage
.- Parameters:
valueImage
- the intensity image containing values to comparelabelImage
- the intensity image containing label of each pixellabels
- the list of labels in the label image- Returns:
- the position of minimum value in intensity image for each label
-
findMinValues
public static final LabelValues.Position3DValuePair[] findMinValues(ij.ImageStack valueImage, ij.ImageStack labelImage, int[] labels)For each label, finds the position of the 3D point belonging to 3D label region defined bylabelImage
and with minimal value in 3D intensity imagevalueImage
.- Parameters:
valueImage
- the intensity image containing values to comparelabelImage
- the intensity image containing label of each pixellabels
- the list of labels in the label image- Returns:
- the position of minimum value in intensity image for each label
-
findPositionOfMaxValues
public static final java.awt.Point[] findPositionOfMaxValues(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage, int[] labels)For each label, finds the position of the point belonging to label region defined bylabelImage
and with maximal value in intensity imagevalueImage
.- Parameters:
valueImage
- the intensity image containing values to comparelabelImage
- the intensity image containing label of each pixellabels
- the list of labels in the label image- Returns:
- the position of maximum value in intensity image for each label
-
findPositionOfMaxValues
public static final Cursor3D[] findPositionOfMaxValues(ij.ImageStack valueImage, ij.ImageStack labelImage, int[] labels)For each label, finds the position of the point belonging to label region defined bylabelImage
and with maximal value in intensity imagevalueImage
.- Parameters:
valueImage
- the intensity image containing values to comparelabelImage
- the intensity image containing label of each pixellabels
- the list of labels in the label image- Returns:
- the position of maximum value in intensity image for each label
-
findPositionOfMinValues
public static final java.awt.Point[] findPositionOfMinValues(ij.process.ImageProcessor valueImage, ij.process.ImageProcessor labelImage, int[] labels)For each label, finds the position of the point belonging to label region defined bylabelImage
and with minimal value in intensity imagevalueImage
.- Parameters:
valueImage
- the intensity image containing values to comparelabelImage
- the intensity image containing label of each pixellabels
- the list of labels in the label image- Returns:
- the position of minimum value in intensity image for each label
-
findPositionOfMinValues
public static final Cursor3D[] findPositionOfMinValues(ij.ImageStack valueImage, ij.ImageStack labelImage, int[] labels)For each label, finds the position of the point belonging to label region defined bylabelImage
and with minimal value in intensity imagevalueImage
.- Parameters:
valueImage
- the intensity image containing values to comparelabelImage
- the intensity image containing label of each pixellabels
- the list of labels in the label image- Returns:
- the position of minimum value in intensity image for each label
-