class_docstr: Provide a multi-plane integer image, interpreting an image file as objects
class_docstr_tok: ["Provide","a","multi-plane","integer","image",",","interpreting","an","image","file","as","objects"]
docstr: Load an image from a pathname
          
docstr_tok: ["Load","an","image","from","a","pathname"]
code: def provide_image(self, image_set):
      """Load an image from a pathname"""
  
      if self.__image is not None:
          return self.__image
  
      if self.volume:
          return self.get_image_volume()
  
      self.cache_file()
      filename = self.get_filename()
      channel_names = []
      url = self.get_url()
      properties = {}
      if self.index is None:
          reader = self.get_reader()
          meta = reader.get_series_metadata()
          series = self.series
          if self.series is None:
              series = 0
          nplanes = (
              meta[MD_SIZE_C][series]
              * meta[MD_SIZE_Z][series]
              * meta[MD_SIZE_T][series]
          )
          indexes = list(range(nplanes))
      elif numpy.isscalar(self.index):
          indexes = [self.index]
      else:
          indexes = self.index
      planes = []
      offset = 0
      for i, index in enumerate(indexes):
          properties["index"] = index
          if self.series is not None:
              if numpy.isscalar(self.series):
                  properties["series"] = self.series
              else:
                  properties["series"] = self.series[i]
          rdr = self.get_reader()
          img = rdr.read(rescale=False, **properties).astype(int)
          img = convert_image_to_objects(img).astype(numpy.int32)
          img[img != 0] += offset
          offset += numpy.max(img)
          planes.append(img)
  
      image = Image(
          numpy.dstack(planes),
          path_name=self.get_pathname(),
          file_name=self.get_filename(),
          convert=False,
      )
      self.__image = image
      return image
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/image/abstract_image/file/url/_objects_image.py
imports: import imageio
  import numpy
  from ....None import Image
  from .....constants.image import MD_SIZE_C, MD_SIZE_Z, MD_SIZE_T
  from .....utilities.image import convert_image_to_objects
  from .....utilities.pathname import url2pathname
  from ._url_image import URLImage
label_desc: Use image node_id 2 for calling the ObjectsImage obj's underlying member method code with example usage: obj.provide_image(image_set) and returns: image, self, self