Class IntensityMeanCalculator

Object
IntensityMeanCalculator

public class IntensityMeanCalculator extends Object
Utility class for calculating mean intensity of objects in a channel.
  • 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 - the Channel containing intensity values
      object - the ObjectMask 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 - the Channel containing intensity values
      object - the ObjectMask defining the region of interest
      excludeZero - 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