A method of managing pain using neurophysiological data acquired from the brain of a subject is disclosed. The method comprises: identifying activity-related features in the data; parceling the data according to the activity-related features to define a plurality of capsules, each representing a spatiotemporal activity region in the brain; comparing at least some of the defined capsules to at least one reference capsule; and assessing the likelihood that the subject is experiencing pain responsively to the comparison.