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: Find the secondary image name choices available for a feature
  
  A measurement can still be valid, even if there are no available
  image name choices. The UI should not offer image name choices
  if no choices are returned.
docstr_tok: ["Find","the","secondary","image","name","choices","available","for","a","feature","A","measurement","can","still","be","valid",",","even","if","there","are","no","available","image","name","choices",".","The","UI","should","not","offer","image","name","choices","if","no","choices","are","returned","."]
code: def get_image_name_choices(
      self, pipeline, object_name=None, category=None, feature_name=None
  ):
      """Find the secondary image name choices available for a feature
  
      A measurement can still be valid, even if there are no available
      image name choices. The UI should not offer image name choices
      if no choices are returned.
      """
      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 category is None or feature_name is None:
          return []
      image_names = set()
      for module in pipeline.modules():
          if self.key() in [x.key() for x in module.settings()]:
              break
          image_names.update(
              module.get_measurement_images(
                  pipeline, object_name, category, feature_name
              )
          )
      result = list(image_names)
      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 8 for calling the Measurement obj's underlying member method code with example usage: obj.get_image_name_choices(pipeline, object_name, category, feature_name) and returns: result, list