Diagnosis based on cortex analysis