def get_gifti_anatomical_struct(gifti):
    """
    Returns the primary anatomical structure for a gifti object (*.label.gii or *.func.gii)

    Args:
        gifti (gifti image):
            Nibabel Gifti image 

    Returns:
        anatStruct (string):
            AnatomicalStructurePrimary attribute from gifti object

    """
    N = len(gifti._meta.data)
    anatStruct = []
    for i in range(N):
        if 'AnatomicalStructurePrimary' in gifti._meta.data[i].name:
            anatStruct.append(gifti._meta.data[i].value)
    return anatStruct