code: def run(self, workspace):
      if self.each_or_all != EA_EACH:
          d = self.get_dictionary(workspace.image_set_list)[
              OUTPUT_IMAGE
          ]
          output_image_provider = (
              CorrectIlluminationImageProvider.deserialize(d, self)
          )
          if self.each_or_all == EA_ALL_ACROSS:
              #
              # We are accumulating a pipeline image. Add this image set's
              # image to the output image provider.
              #
              orig_image = workspace.image_set.get_image(
                  self.image_name.value
              )
              output_image_provider.add_image(orig_image)
              output_image_provider.serialize(d)
  
          # fetch images for display
          if (
              self.show_window
              or self.save_average_image
              or self.save_dilated_image
              or self.each_or_all == EA_ALL_FIRST
          ):
              avg_image = output_image_provider.provide_avg_image()
              dilated_image = (
                  output_image_provider.provide_dilated_image()
              )
              workspace.image_set.providers.append(
                  output_image_provider
              )
              output_image = output_image_provider.provide_image(
                  workspace.image_set
              )
          else:
              workspace.image_set.providers.append(
                  output_image_provider
              )
      else:
          orig_image = workspace.image_set.get_image(
              self.image_name.value
          )
          pixels = orig_image.pixel_data
          avg_image = self.preprocess_image_for_averaging(orig_image)
          dilated_image = self.apply_dilation(avg_image, orig_image)
          smoothed_image = self.apply_smoothing(
              dilated_image, orig_image
          )
          output_image = self.apply_scaling(smoothed_image, orig_image)
          # for illumination correction, we want the smoothed function to extend beyond the mask.
          output_image.mask = numpy.ones(
              output_image.pixel_data.shape[:2], bool
          )
          workspace.image_set.add(
              self.illumination_image_name.value, output_image
          )
  
      if self.save_average_image.value:
          workspace.image_set.add(
              self.average_image_name.value, avg_image
          )
      if self.save_dilated_image.value:
          workspace.image_set.add(
              self.dilated_image_name.value, dilated_image
          )
      if self.show_window:
          # store images for potential display
          workspace.display_data.avg_image = avg_image.pixel_data
          workspace.display_data.dilated_image = (
              dilated_image.pixel_data
          )
          workspace.display_data.output_image = output_image.pixel_data
  
imports: import centrosome.bg_compensate
  import centrosome.cpmorphology
  import centrosome.cpmorphology
  import centrosome.filter
  import centrosome.smooth
  import numpy
  import scipy.ndimage
  import skimage.filters
  from cellprofiler_core.image import AbstractImage
  from cellprofiler_core.image import Image
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.module import Module
  from cellprofiler_core.pipeline import Pipeline
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import ImageSubscriber
  from cellprofiler_core.setting.text import Float
  from cellprofiler_core.setting.text import ImageName
  from cellprofiler_core.setting.text import Integer
label_desc: Use image node_id 6 for calling the CorrectIlluminationCalculate obj's underlying member method code with example usage: obj.run(workspace) without return types