class_docstr: CorrectIlluminationImageProvider provides the illumination correction image
  
  This class accumulates the image data from successive images and
  calculates the illumination correction image when asked.
class_docstr_tok: ["CorrectIlluminationImageProvider","provides","the","illumination","correction","image","This","class","accumulates","the","image","data","from","successive","images","and","calculates","the","illumination","correction","image","when","asked","."]
code: def calculate_image(self):
      pixel_data = numpy.zeros(
          self.__image_sum.shape, self.__image_sum.dtype
      )
      mask = self.__mask_count > 0
      if pixel_data.ndim == 2:
          pixel_data[mask] = (
              self.__image_sum[mask] / self.__mask_count[mask]
          )
      else:
          for i in range(pixel_data.shape[2]):
              pixel_data[mask, i] = (
                  self.__image_sum[mask, i] / self.__mask_count[mask]
              )
      self.__cached_avg_image = Image(pixel_data, mask)
      self.__cached_dilated_image = self.__module.apply_dilation(
          self.__cached_avg_image
      )
      smoothed_image = self.__module.apply_smoothing(
          self.__cached_dilated_image
      )
      self.__cached_image = self.__module.apply_scaling(smoothed_image)
      self.__dirty = False
  
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 10 for calling the CorrectIlluminationImageProvider obj's underlying member method code with example usage: obj.calculate_image() without return types