test_annotation.py 486 B

12345678910111213
  1. import os
  2. from freesurfer_surface import Annotation
  3. from conftest import SUBJECTS_DIR
  4. def test_load_annotation():
  5. annotation = Annotation.read(os.path.join(SUBJECTS_DIR, 'fabian', 'label', 'lh.aparc.annot'))
  6. assert len(annotation.vertex_values) == 155622
  7. assert annotation.vertex_values[0] == (((100 << 8) + 20) << 8) + 220
  8. assert annotation.vertex_values[1] == (((100 << 8) + 20) << 8) + 220
  9. assert annotation.vertex_values[42] == (((140 << 8) + 30) << 8) + 20