docstr: Determine desired measurements and pass in object arrays for analysis
docstr_tok: ["Determine","desired","measurements","and","pass","in","object","arrays","for","analysis"]
code: def run_on_objects(self, object_name, workspace):
      """Determine desired measurements and pass in object arrays for analysis"""
      objects = workspace.get_objects(object_name)
  
      # Don't analyze if there are no objects at all.
  
      if len(objects.indices) == 0:
          # No objects to process
          self.measurements_without_objects(workspace, object_name)
          return
  
      # Determine which properties we're measuring.
      if len(objects.shape) == 2:
          desired_properties = [
              "label",
              "image",
              "area",
              "perimeter",
              "bbox",
              "bbox_area",
              "major_axis_length",
              "minor_axis_length",
              "orientation",
              "centroid",
              "equivalent_diameter",
              "extent",
              "eccentricity",
              "convex_area",
              "solidity",
              "euler_number",
          ]
          if self.calculate_advanced.value:
              desired_properties += [
                  "inertia_tensor",
                  "inertia_tensor_eigvals",
                  "moments",
                  "moments_central",
                  "moments_hu",
                  "moments_normalized",
              ]
      else:
          desired_properties = [
              "label",
              "image",
              "area",
              "centroid",
              "bbox",
              "bbox_area",
              "major_axis_length",
              "minor_axis_length",
              "extent",
              "equivalent_diameter",
              "euler_number",
          ]
          if self.calculate_advanced.value:
              desired_properties += [
                  "solidity",
              ]
  
      # Check for overlapping object sets
      if not objects.overlapping():
          features_to_record = self.analyze_objects(
              objects, desired_properties
          )
      else:
          # Objects are overlapping, process as single arrays
          coords_array = objects.ijv
          features_to_record = {}
          for label in objects.indices:
              omap = numpy.zeros(objects.shape)
              ocoords = coords_array[coords_array[:, 2] == label, 0:2]
              numpy.put(
                  omap,
                  numpy.ravel_multi_index(ocoords.T, omap.shape),
                  1,
              )
              tempobject = Objects()
              tempobject.segmented = omap
              buffer = self.analyze_objects(
                  tempobject, desired_properties
              )
              for f, m in buffer.items():
                  if f in features_to_record:
                      features_to_record[f] = numpy.concatenate(
                          (features_to_record[f], m)
                      )
                  else:
                      features_to_record[f] = m
      for f, m in features_to_record.items():
          self.record_measurement(workspace, object_name, f, m)
  
imports: import centrosome.cpmorphology
  import centrosome.zernike
  import numpy
  import scipy.ndimage
  import skimage.measure
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  from cellprofiler_core.module import Module
  from cellprofiler_core.object import Objects
  from cellprofiler_core.setting import Divider, Binary, ValidationError
  from cellprofiler_core.setting.subscriber import LabelListSubscriber
  import cellprofiler.gui.help.content
  import cellprofiler.icons
label_desc: Use image node_id 11 for calling the MeasureObjectSizeShape obj's underlying member method code with example usage: obj.run_on_objects(object_name, workspace) without return types