def split_filename(filename: str):
    """
    Extract file root name and extension form known extension list
    :param filename:    filename to extract extension from
    :return:    tuple containing filename root and extension
    """
    known_extensions = ['.png', '.nii', '.nii.gz', '.npy', '.vtk', '.stl']

    for extension in known_extensions:
        if filename.endswith(extension):
            return filename[:-len(extension)], extension

    raise RuntimeError('Unknown extension for file %s' % (filename,))