test_annotation.py 665 B

123456789101112131415
  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
  10. assert annotation.colortable_path == b'/autofs/space/tanha_002/users/greve' \
  11. b'/fsdev.build/average/colortable_desikan_killiany.txt'