def loadMatlabImages(self, path, name):
    """
    Loads images from a .mat file.
    :param path:      (string)   Path to .mat file
    :param name:      (string)   Object name in the .mat file, just before .mat

    Also stores image dimensions to later the original images. If there are
    multiple channels, self.numChannels will store the number of channels,
    otherwise it will be set to None.
    """
    try:
      images = sc.loadmat(path)[name]
    except KeyError:
      raise KeyError('Wrong filename for provided images.')

    self._initializeDimensions(images)

    return images