def get_space(mincfile, space): 
    header = {
        "start" : float(cmd("mincinfo -attval {}:start {}".format(space,mincfile))),
        "space_length" : float(cmd("mincinfo -dimlength {} {}".format(space,mincfile))),
        "step" : float(cmd("mincinfo -attval {}:step {}".format(space,mincfile))),
    }

    cosines = cmd("mincinfo -attval {}:direction_cosines {}".format(space,mincfile))
    cosines = cosines.strip().split()
    if len(cosines) == 1:
        header["direction_cosines"] = list(map(float, cosines))

    return header
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/isct_minc2volume-viewer.py/get_space/operator `>` -> `==`