docstr: Perform the measurements on the image sets
docstr_tok: ["Perform","the","measurements","on","the","image","sets"]
code: def run(self, workspace):
      """Perform the measurements on the image sets"""
      col_labels = ["Image", "Masking object", "Feature", "Value"]
      statistics = []
      if self.wants_percentiles:
          percentiles = self.get_percentiles(
              self.percentiles.value, stop=True
          )
      else:
          percentiles = None
      for im in self.images_list.value:
          image = workspace.image_set.get_image(
              im, must_be_grayscale=True
          )
          input_pixels = image.pixel_data
  
          measurement_name = im
          if self.wants_objects.value:
              for object_set in self.objects_list.value:
                  measurement_name += "_" + object_set
                  objects = workspace.get_objects(object_set)
                  if objects.shape != input_pixels.shape:
                      raise ValueError(
                          "This module requires that the image and object sets have matching dimensions.\n"
                          "The %s image and %s objects do not (%s vs %s).\n"
                          "If they are paired correctly you may want to use the Resize, ResizeObjects or "
                          "Crop module(s) to make them the same size."
                          % (
                              im,
                              object_set,
                              input_pixels.shape,
                              objects.shape,
                          )
                      )
                  if image.has_mask:
                      pixels = input_pixels[
                          numpy.logical_and(
                              objects.segmented != 0, image.mask
                          )
                      ]
                  else:
                      pixels = input_pixels[objects.segmented != 0]
                  statistics += self.measure(
                      pixels,
                      im,
                      object_set,
                      measurement_name,
                      workspace,
                      percentiles=percentiles,
                  )
          else:
              if image.has_mask:
                  pixels = input_pixels[image.mask]
              else:
                  pixels = input_pixels
              statistics += self.measure(
                  pixels,
                  im,
                  None,
                  measurement_name,
                  workspace,
                  percentiles=percentiles,
              )
      workspace.display_data.statistics = statistics
      workspace.display_data.col_labels = col_labels
  
imports: import logging
  import numpy
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import Binary, ValidationError, Divider
  from cellprofiler_core.setting.text import Text
  from cellprofiler_core.setting.subscriber import LabelListSubscriber, ImageListSubscriber
  from cellprofiler.modules import _help
label_desc: Use image node_id 5 for calling the MeasureImageIntensity obj's underlying member method code with example usage: obj.run(workspace) without return types