class_docstr: A measurement done on a class of objects (or Experiment or Image)
  
  A measurement represents a fully-qualified name of a measurement taken
  on an object. Measurements have categories and feature names and
  may or may not have a secondary image (for instance, the image used
  to measure an intensity), secondary object (for instance, the parent
  object when relating two classes of objects or the object name when
  aggregating object measurements over an image) or scale.
class_docstr_tok: ["A","measurement","done","on","a","class","of","objects","(","or","Experiment","or","Image",")","A","measurement","represents","a","fully-qualified","name","of","a","measurement","taken","on","an","object",".","Measurements","have","categories","and","feature","names","and","may","or","may","not","have","a","secondary","image","(","for","instance",",","the","image","used","to","measure","an","intensity",")",",","secondary","object","(","for","instance",",","the","parent","object","when","relating","two","classes","of","objects","or","the","object","name","when","aggregating","object","measurements","over","an","image",")","or","scale","."]
docstr: Return the measured scales for the currently chosen measurement
  
  The setting may still be valid, even though there are no scale choices.
  In this case, the UI should not offer the user a scale choice.
docstr_tok: ["Return","the","measured","scales","for","the","currently","chosen","measurement","The","setting","may","still","be","valid",",","even","though","there","are","no","scale","choices",".","In","this","case",",","the","UI","should","not","offer","the","user","a","scale","choice","."]
code: def get_scale_choices(
      self,
      pipeline,
      object_name=None,
      category=None,
      feature_name=None,
      image_name=None,
  ):
      """Return the measured scales for the currently chosen measurement
  
      The setting may still be valid, even though there are no scale choices.
      In this case, the UI should not offer the user a scale choice.
      """
      if object_name is None:
          object_name = self.__object_fn()
      if category is None:
          category = self.get_category(pipeline, object_name)
      if feature_name is None:
          feature_name = self.get_feature_name(
              pipeline, object_name, category
          )
      if image_name is None:
          image_name = self.get_image_name(
              pipeline, object_name, category, feature_name
          )
      if category is None or feature_name is None:
          return []
      scales = set()
      for module in pipeline.modules():
          if self.key() in [x.key() for x in module.settings()]:
              break
          scales.update(
              module.get_measurement_scales(
                  pipeline,
                  object_name,
                  category,
                  feature_name,
                  image_name,
              )
          )
      result = [str(scale) for scale in scales]
      result.sort()
      return result
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/setting/_measurement.py
imports: from ._setting import Setting
  from ._validation_error import ValidationError
label_desc: Use image node_id 10 for calling the Measurement obj's underlying member method code with example usage: obj.get_scale_choices(pipeline, object_name, category, feature_name, image_name) and returns: result, list