code: def run(self, workspace):
      image_set = workspace.image_set
  
      ground_truth_image = image_set.get_image(
          self.ground_truth.value, must_be_binary=True
      )
  
      test_image = image_set.get_image(
          self.test_img.value, must_be_binary=True
      )
  
      ground_truth_pixels = ground_truth_image.pixel_data
  
      ground_truth_pixels = test_image.crop_image_similarly(
          ground_truth_pixels
      )
  
      mask = ground_truth_image.mask
  
      mask = test_image.crop_image_similarly(mask)
  
      if test_image.has_mask:
          mask = mask & test_image.mask
  
      test_pixels = test_image.pixel_data
  
      data = measureimageoverlap(
          ground_truth_pixels,
          test_pixels,
          mask=mask,
          calculate_emd=self.wants_emd,
          decimation_method=self.decimation_method.enum_member,
          max_distance=self.max_distance.value,
          max_points=self.max_points.value,
          penalize_missing=self.penalize_missing,
      )
  
      m = workspace.measurements
  
      m.add_image_measurement(
          self.measurement_name(FTR_F_FACTOR), data[FTR_F_FACTOR]
      )
  
      m.add_image_measurement(
          self.measurement_name(FTR_PRECISION), data[FTR_PRECISION]
      )
  
      m.add_image_measurement(
          self.measurement_name(FTR_RECALL), data[FTR_RECALL]
      )
  
      m.add_image_measurement(
          self.measurement_name(FTR_TRUE_POS_RATE),
          data[FTR_TRUE_POS_RATE],
      )
  
      m.add_image_measurement(
          self.measurement_name(FTR_FALSE_POS_RATE),
          data[FTR_FALSE_POS_RATE],
      )
  
      m.add_image_measurement(
          self.measurement_name(FTR_TRUE_NEG_RATE),
          data[FTR_TRUE_NEG_RATE],
      )
  
      m.add_image_measurement(
          self.measurement_name(FTR_FALSE_NEG_RATE),
          data[FTR_FALSE_NEG_RATE],
      )
  
      m.add_image_measurement(
          self.measurement_name(FTR_RAND_INDEX), data[FTR_RAND_INDEX]
      )
  
      m.add_image_measurement(
          self.measurement_name(FTR_ADJUSTED_RAND_INDEX),
          data[FTR_ADJUSTED_RAND_INDEX],
      )
  
      if self.wants_emd:
          m.add_image_measurement(
              self.measurement_name(FTR_EARTH_MOVERS_DISTANCE),
              data[FTR_EARTH_MOVERS_DISTANCE],
          )
  
      if self.show_window:
          workspace.display_data.true_positives = data["true_positives"]
  
          workspace.display_data.true_negatives = data["true_negatives"]
  
          workspace.display_data.false_positives = data[
              "false_positives"
          ]
  
          workspace.display_data.false_negatives = data[
              "false_negatives"
          ]
  
          workspace.display_data.rand_index = data[FTR_RAND_INDEX]
  
          workspace.display_data.adjusted_rand_index = data[
              FTR_ADJUSTED_RAND_INDEX
          ]
  
          workspace.display_data.statistics = [
              (FTR_F_FACTOR, data[FTR_F_FACTOR]),
              (FTR_PRECISION, data[FTR_PRECISION]),
              (FTR_RECALL, data[FTR_RECALL]),
              (FTR_FALSE_POS_RATE, data[FTR_FALSE_POS_RATE]),
              (FTR_FALSE_NEG_RATE, data[FTR_FALSE_NEG_RATE]),
              (FTR_RAND_INDEX, data[FTR_RAND_INDEX]),
              (FTR_ADJUSTED_RAND_INDEX, data[FTR_ADJUSTED_RAND_INDEX]),
          ]
  
          if self.wants_emd:
              workspace.display_data.statistics.append(
                  (
                      FTR_EARTH_MOVERS_DISTANCE,
                      data[FTR_EARTH_MOVERS_DISTANCE],
                  )
              )
  
imports: from cellprofiler.modules import _help
  from cellprofiler_library.modules import measureimageoverlap
  from cellprofiler_library.opts.measureimageoverlap import DM
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import ImageSubscriber
  from cellprofiler_core.setting.text import Integer
label_desc: Use image node_id 4 for calling the MeasureImageOverlap obj's underlying member method code with example usage: obj.run(workspace) without return types