def loadFromPath(self, path, verbose):
        from nibabel import load, spatialimages
        from sct_utils import check_file_exist, printv, extract_fname, run
        from sct_image import get_orientation

        # check_file_exist(path, verbose=verbose)
        im_file = None
        try:
            im_file = load(path)
        except spatialimages.ImageFileError:
            printv('Error: make sure ' + path + ' is an image.', 1, 'error')
        self.data = im_file.get_data()
        self.hdr = im_file.get_header()
        self.orientation = get_orientation(self)
        self.absolutepath = path
        self.path, self.file_name, self.ext = extract_fname(path)
        self.dim = get_dimension(im_file)
        # nx, ny, nz, nt, px, py, pz, pt = get_dimension(path)
        # self.dim = [nx, ny, nz]
This function load an image from an absolute path using nibabel library
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/msct_image.py/Image.loadFromPath