//  [python]
def measure_plane(
        self, pixels, image_name, object_name, measurement_name, channel, workspace
    ):
        """Perform measurements on an array of pixels
        pixels - image pixel data, masked to objects if applicable
        image_name - name of the current input image
        object_name - name of the current object set pixels are masked to
        measurement_name - group title to be used in data tables
        workspace - has all the details for current image set
        """
        pixel_count = numpy.prod(pixels.shape)
        if pixel_count == 0:
            pixel_sum = 0
            pixel_mean = 0
            pixel_std = 0
            pixel_mad = 0
            pixel_median = 0
            pixel_min = 0
            pixel_max = 0
            pixel_pct_max = 0
            pixel_lower_qrt = 0
            pixel_upper_qrt = 0
        else:
            pixels = pixels.flatten()
            pixels = pixels[
                numpy.nonzero(numpy.isfinite(pixels))[0]
            ]  # Ignore NaNs, Infs
            pixel_count = numpy.prod(pixels.shape)

            pixel_sum = numpy.sum(pixels)
            pixel_mean = pixel_sum / float(pixel_count)
            pixel_std = numpy.std(pixels)
            pixel_median = numpy.median(pixels)
            pixel_mad = numpy.median(numpy.abs(pixels - pixel_median))
            pixel_min = numpy.min(pixels)
            pixel_max = numpy.max(pixels)
            pixel_pct_max = (
                100.0 * float(numpy.sum(pixels == pixel_max)) / float(pixel_count)
            )
            sorted_pixel_data = sorted(pixels)
            pixel_lower_qrt = sorted_pixel_data[int(len(sorted_pixel_data) * 0.25)]
            pixel_upper_qrt = sorted_pixel_data[int(len(sorted_pixel_data) * 0.75)]

        m = workspace.measurements
        m.add_image_measurement(F_TOTAL_INTENSITY % measurement_name, pixel_sum)
        m.add_image_measurement(F_MEAN_INTENSITY % measurement_name, pixel_mean)
        m.add_image_measurement(F_MEDIAN_INTENSITY % measurement_name, pixel_median)
        m.add_image_measurement(F_STD_INTENSITY % measurement_name, pixel_std)
        m.add_image_measurement(F_MAD_INTENSITY % measurement_name, pixel_mad)
        m.add_image_measurement(F_MAX_INTENSITY % measurement_name, pixel_max)
        m.add_image_measurement(F_MIN_INTENSITY % measurement_name, pixel_min)
        m.add_image_measurement(F_TOTAL_AREA % measurement_name, pixel_count)
        m.add_image_measurement(F_PERCENT_MAXIMAL % measurement_name, pixel_pct_max)
        m.add_image_measurement(F_LOWER_QUARTILE % measurement_name, pixel_lower_qrt)
        m.add_image_measurement(F_UPPER_QUARTILE % measurement_name, pixel_upper_qrt)
        return [
            [
                image_name,
                object_name if self.wants_objects.value else "",
                f"Channel {channel+1}",
                feature_name,
                numpy.round(value, 2),
            ]
            for feature_name, value in (
                ("Total intensity", pixel_sum),
                ("Mean intensity", pixel_mean),
                ("Median intensity", pixel_median),
                ("Std intensity", pixel_std),
                ("MAD intensity", pixel_mad),
                ("Min intensity", pixel_min),
                ("Max intensity", pixel_max),
                ("Pct maximal", pixel_pct_max),
                ("Lower quartile", pixel_lower_qrt),
                ("Upper quartile", pixel_upper_qrt),
                ("Total area", pixel_count),
            )
        ]