docstr: Return the measurements that this module produces
  
  object_name - return measurements made on this object (or 'Image' for image measurements)
  category - return measurements made in this category
docstr_tok: ["Return","the","measurements","that","this","module","produces","object_name","-","return","measurements","made","on","this","object","(","or","'Image","'","for","image","measurements",")","category","-","return","measurements","made","in","this","category"]
code: def get_measurements(self, pipeline, object_name, category):
      """Return the measurements that this module produces
  
      object_name - return measurements made on this object (or 'Image' for image measurements)
      category - return measurements made in this category
      """
      result = []
      if self.contrast_choice == BY_SINGLE_MEASUREMENT:
          if category != M_CATEGORY:
              return []
          for group in self.single_measurements:
              if group.object_name == object_name:
                  return group.bin_feature_names()
              elif object_name == IMAGE:
                  for image_features in (F_NUM_PER_BIN, F_PCT_PER_BIN):
                      for (
                          bin_feature_names
                      ) in group.bin_feature_names():
                          result += [
                              "_".join(
                                  (bin_feature_names, image_features)
                              )
                          ]
                  return result
      elif self.contrast_choice == BY_TWO_MEASUREMENTS:
          if category != M_CATEGORY:
              return []
          if self.object_name == object_name:
              return self.get_feature_name_matrix().flatten().tolist()
          elif object_name == IMAGE:
              for image_features in (F_NUM_PER_BIN, F_PCT_PER_BIN):
                  for bin_feature_names in (
                      self.get_feature_name_matrix().flatten().tolist()
                  ):
                      result += [
                          "_".join((bin_feature_names, image_features))
                      ]
              return result
      elif self.contrast_choice == BY_MODEL:
          if object_name == IMAGE:
              if category == C_COUNT and self.create_class_sets.value:
                  result += [
                      group.class_objects_name.value
                      for group in self.desired_classes
                  ]
              elif category == M_CATEGORY:
                  result += [
                      FF_COUNT % label
                      for label in self.get_bin_labels()
                  ]
          elif object_name == self.object_name.value:
              if category == M_CATEGORY:
                  result += [f"Class"]
                  result += [
                      f"Probability_{label}"
                      for label in self.get_bin_labels()
                  ]
              elif (
                  category == C_CHILDREN
                  and self.create_class_sets.value
              ):
                  result += [
                      f"{group.class_objects_name.value}_Count"
                      for group in self.desired_classes
                  ]
          for group in self.desired_classes:
              if (
                  self.create_class_sets.value
                  and object_name == group.class_objects_name.value
              ):
                  if category == C_NUMBER:
                      result += [FTR_OBJECT_NUMBER]
                  elif category == C_LOCATION:
                      result += [
                          FTR_CENTER_X,
                          FTR_CENTER_Y,
                          FTR_CENTER_Z,
                      ]
                  elif category == C_PARENT:
                      result += [self.object_name.value]
      return result
  
imports: import functools
  import os
  import numpy
  from cellprofiler.modules import _help
  from cellprofiler.utilities.rules import Rules
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, COLTYPE_VARCHAR, C_COUNT, C_CHILDREN, C_LOCATION, C_NUMBER, C_PARENT, FTR_OBJECT_NUMBER, FTR_CENTER_X, FTR_CENTER_Y, FTR_CENTER_Z
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.constants.measurement import IMAGE
  from cellprofiler_core.image import Image
  from cellprofiler_core.module import Module
  from cellprofiler_core.object import Objects
  from cellprofiler_core.preferences import get_default_colormap, get_headless
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import Divider
  from cellprofiler_core.setting import HiddenCount
  from cellprofiler_core.setting import Measurement
  from cellprofiler_core.setting import SettingsGroup
  from cellprofiler_core.setting import ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import DoSomething
  from cellprofiler_core.setting.do_something import RemoveSettingButton
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import Alphanumeric, Directory, Filename, LabelName
  from cellprofiler_core.setting.text import Float
  from cellprofiler_core.setting.text import ImageName
  from cellprofiler_core.setting.text import Integer
  from cellprofiler_core.setting.text import Text
  from cellprofiler_core.constants.measurement import FF_CHILDREN_COUNT
  from cellprofiler_core.constants.measurement import FF_COUNT
  from cellprofiler_core.constants.measurement import FF_PARENT
  from cellprofiler_core.module.image_segmentation import ImageSegmentation
label_desc: Use image node_id 29 for calling the ClassifyObjects obj's underlying member method code with example usage: obj.get_measurements(pipeline, object_name, category) and returns: result, list, group, list, self, result, result