Class IntensityMeanCalculator
Object
IntensityMeanCalculator
Utility class for calculating mean intensity of objects in a channel.
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
calculateMeanIntensityObject
(Channel channel, ObjectMask object) Calculates the mean intensity of an object in a channel.static double
calculateMeanIntensityObject
(Channel channel, ObjectMask object, boolean excludeZero) Calculates the mean intensity of an object in a channel, with an option to exclude zero values.
-
Method Details
-
calculateMeanIntensityObject
public static double calculateMeanIntensityObject(Channel channel, ObjectMask object) throws FeatureCalculationException Calculates the mean intensity of an object in a channel.- Parameters:
channel
- theChannel
containing intensity valuesobject
- theObjectMask
defining the region of interest- Returns:
- the mean intensity of the object
- Throws:
FeatureCalculationException
- if the calculation fails
-
calculateMeanIntensityObject
public static double calculateMeanIntensityObject(Channel channel, ObjectMask object, boolean excludeZero) throws FeatureCalculationException Calculates the mean intensity of an object in a channel, with an option to exclude zero values.- Parameters:
channel
- theChannel
containing intensity valuesobject
- theObjectMask
defining the region of interestexcludeZero
- if true, zero intensity values are excluded from the calculation- Returns:
- the mean intensity of the object
- Throws:
FeatureCalculationException
- if the calculation fails or if there are no non-zero pixels
-