def get_name(fname):
    """Get the elements of the file name we need

    Params:
        fname -- String: The file name
                c9_c8_c176_IC12_s4_l_t

    Returns:
        The image's component number, scan number, and hemisphere
        12, 4, L
    """
    if fname.endswith('.nii.gz'):
        fname = fname.replace('.nii.gz', '')

    name_stuff = {}
    tmp = fname.split('_')  # tmp is just a placeholder
    elems = tmp[-4:-1]  # The elements of the file name in a list
    name_stuff['IC'] = elems[0][2:]  # 18
    name_stuff['Scan'] = elems[1][1:]  # 3
    name_stuff['Hemi'] = elems[2].upper()

    return name_stuff