Class IntensityMeanCalculator
Object
IntensityMeanCalculator
Utility class for calculating mean intensity of objects in a channel.
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublecalculateMeanIntensityObject(Channel channel, ObjectMask object) Calculates the mean intensity of an object in a channel.static doublecalculateMeanIntensityObject(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- theChannelcontaining intensity valuesobject- theObjectMaskdefining 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- theChannelcontaining intensity valuesobject- theObjectMaskdefining 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
-