Skip to content

Conversation

@dmitry-mli
Copy link
Owner

@dmitry-mli dmitry-mli commented Jun 2, 2025

What

  • Implemented flattening logic that uses conformal UV unwrap in cortex.blender.blendlib.py. It follows the same selection as for the volume mesh. This is accessible via write_flat_patch.
    • To avoid confusion between the new flat patch write_flat_patch and the old one, renamed save_patch into write_volume_patch.
    • Renamed _get_pts_edges into _get_geometry for clarity. Added clarifying logging and elapsed time tracking. Extended docstring.
  • Fix for Python 3.13+: allow blender access Python site directory to search for mda_xdrlib that was removed from Python 3.13.
  • Refactored cortex.blender._call_blender to support non-code calls to Blender to reduces confusion and improves code clarity. Refactored fs_cutintofs_cut_initand added a newfs_cut_open` to improve clarity. Extended docstring.
  • Rewrote cut_surface for clarity. Onboarded to recache flag to support forced generation.
  • Record a tutorial video walking users through the process of cutting. Should follow the gallantlab.org approach to cutting.
  • Add python notebook for the end-to-end rendering of fMRI.
  • Update docs with the guidance.
    • Fixed the existing docs confusing and " which may result into code examples not running properly.
  • Address the PR feedback.

Tutorial video

As different labs may approach cuts slightly differently, created and edited a tutorial video instruction that follows the style of gallantlab.org. The used anatomy was taken from Horikawa, T., Cowen, A. S., Keltner, D., & Kamitani, Y. (2020). The neural representation of visually evoked emotion is high-dimensional, categorical, and distributed across transmodal brain regions..

Docs update

Added a new section on the cuts. When rendered looks as follows:

image

Copy link

@cmcneil cmcneil left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me! Minor nits, but seems like an overall generalization with some improvements to code quality.

@dmitry-mli dmitry-mli force-pushed the blender-flattening-support branch 2 times, most recently from 8cf08a1 to ac7f097 Compare June 22, 2025 23:47
hmac213 and others added 12 commits July 21, 2025 13:07
Some of these are quite nice to have when doing retinotopy.
* working clipping

* cleaned up shaders

* added comments

---------

Co-authored-by: Alexander Huth <huth@wireless-10-154-98-148.public.utexas.edu>
Co-authored-by: Alexander Huth <huth@wireless-10-145-16-120.public.utexas.edu>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lab#577)

* deal with xdrlib import for blender interpreter

* fix import statement for blender
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@dmitry-mli dmitry-mli force-pushed the blender-flattening-support branch from adb55bd to 46ee94a Compare October 13, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants