Skip to content

Conversation

@jduemose
Copy link

Previously, only freesurfer surface files with coordinates in unknown or surface ras/tkregister space could be read. Following #1419, this PR adds the ability to read surface files whose coordinates are stored in scanner ras as well.

Let me know if calling a freesurfer function via subprocess as part of the test is a problem - but I wasn't sure how to test this feature otherwise.

@effigies
Copy link
Member

Sorry, you caught me just as I was heading off on vacation, and following up with nibabel has been low on my queue since getting back. Merging master and running tests.

@codecov
Copy link

codecov bot commented Sep 22, 2025

Codecov Report

❌ Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.37%. Comparing base (70f278e) to head (560a5be).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
nibabel/freesurfer/tests/test_io.py 50.00% 3 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@ ## master #1420 +/- ## ========================================== - Coverage 95.44% 95.37% -0.07%  ========================================== Files 209 209 Lines 29782 29788 +6 Branches 4472 4472 ========================================== - Hits 28424 28410 -14  - Misses 925 943 +18  - Partials 433 435 +2 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
assert any('extension code' in str(ww.message) for ww in w)

# Test reading/writing a surface file in scanner RAS
cmd = f"mris_convert --to-scanner {pjoin(data_path, 'surf', 'lh.inflated')} {surf_path}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't install FreeSurfer to run tests. Could you contribute the converted file to https://codeberg.org/nipy-data/nitest-freesurfer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants