Identification of brain states, transitions, and communities using functional MRI