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","."]
docstr: Accumulate the data from the given image
  
  image - an instance of cellprofiler.cpimage.Image, including
          image data and a mask
docstr_tok: ["Accumulate","the","data","from","the","given","image","image","-","an","instance","of","cellprofiler.cpimage.Image",",","including","image","data","and","a","mask"]
code: def add_image(self, image):
      """Accumulate the data from the given image
  
      image - an instance of cellprofiler.cpimage.Image, including
              image data and a mask
      """
      self.__dirty = True
      pimage = self.__module.preprocess_image_for_averaging(image)
      pixel_data = pimage.pixel_data
      if self.__image_sum is None:
          self.__image_sum = numpy.zeros(
              pixel_data.shape, pixel_data.dtype
          )
          self.__mask_count = numpy.zeros(
              pixel_data.shape[:2], numpy.int32
          )
      if image.has_mask:
          mask = image.mask
          if self.__image_sum.ndim == 2:
              self.__image_sum[mask] = (
                  self.__image_sum[mask] + pixel_data[mask]
              )
          else:
              self.__image_sum[mask, :] = (
                  self.__image_sum[mask, :] + pixel_data[mask, :]
              )
          self.__mask_count[mask] = self.__mask_count[mask] + 1
      else:
          self.__image_sum = self.__image_sum + pixel_data
          self.__mask_count = self.__mask_count + 1
  
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 4 for calling the CorrectIlluminationImageProvider obj's underlying member method code with example usage: obj.add_image(image) without return types