Releases: gallantlab/pycortex
v1.3.0
v1.3.0
This release brings major improvements to pycortex's rendering and RGB visualization workflows. The new headless webviewer lets you generate 3D brain snapshots entirely from scripts, notebooks, and CI pipelines; no browser window required. The RGB color range API has been overhauled to support per-channel vmin/vmax control, giving you much finer control over how multi-channel data is displayed. Several long-standing issues with the webviewer crashing Jupyter kernels have also been resolved.
Enhancements
- Headless webviewer for automated
save_3d_views(#604, @kroq-gar78). Playwright-backed headless rendering lets you runcortex.export.save_3d_viewsandcortex.export.plot_panelswithout a browser window. It works in CI, scripts, and Jupyter notebooks. Install withpip install pycortex[headless]. - Unified
VolumeRGB/VertexRGBsignatures (#599, @mvdoc). Fixes #579. - More useful error message for missing surfaces (#593, @kroq-gar78).
- Type annotations for the frontend (#597, @kroq-gar78).
⚠️ Breaking change
VolumeRGB / VertexRGB: new color range API (#603). The arguments shared_range, shared_vmin, and shared_vmax have been replaced with autorange, vmin, and vmax.
Before (v1.2.x):
cortex.VolumeRGB(red, green, blue, shared_range=True, shared_vmin=-3, shared_vmax=3)After (v1.3.0):
cortex.VolumeRGB(red, green, blue, autorange="shared", vmin=-3, vmax=3)autorange accepts "shared" or "individual". vmin/vmax now accept either a single float (applied to all channels) or a 3-tuple for per-channel control. When vmin/vmax are provided, they override autorange. See #603 for details.
Bug fixes
- Fix
save_3d_viewscrashing IPython/Jupyter kernels (#602, @kroq-gar78). - Fix
pickerfunPython callback (#600, @kroq-gar78).
Maintenance
- Bump
actions/upload-artifactfrom 6 to 7 (#596, @dependabot). - Bump
actions/download-artifactfrom 7 to 8 (#595, @dependabot).
Full Changelog: v1.2.14...v1.3.0
v1.2.14
MNT fixing release action
Full Changelog: v1.2.13...v1.2.14
v1.2.13
What's Changed
- FIX error if unsupported kwargs in make_figure by @kroq-gar78 in #585
- FIX pass freesurfer_subject_dir to get_surf() in cut_surface() (#591) by @mvdoc in #592
- MNT Automate version management with setuptools-scm and simplify release workflow by @Copilot in #587
- Bump actions/checkout from 5 to 6 by @dependabot[bot] in #582
- Bump JamesIves/github-pages-deploy-action from 4.7.3 to 4.7.4 by @dependabot[bot] in #581
- Bump JamesIves/github-pages-deploy-action from 4.7.4 to 4.7.6 by @dependabot[bot] in #589
- Bump actions/cache from 4 to 5 by @dependabot[bot] in #588
- Bump JamesIves/github-pages-deploy-action from 4.7.6 to 4.8.0 by @dependabot[bot] in #590
Full Changelog: 1.2.12...v1.2.13
1.2.12
What's Changed
- Bump JamesIves/github-pages-deploy-action from 4.7.2 to 4.7.3 by @dependabot[bot] in #565
- FIX make parse_curve also compatible with NumPy 2.0 by @evi-hendrikx in #570
- FIX deprecated ndarray.tostring() -> tobytes() by @hmac213 in #571
- Colormap additions by @tknapen in #574
- Clipping sliceplanes by @alexhuth in #556
- Minor fix to manual align by @marklescroart in #575
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #576
- Fix xdrlib import compatibility for Python 3.12+ and Blender by @sjshim in #577
- Bump actions/setup-python from 5 to 6 by @dependabot[bot] in #578
- Blender flattening support by @dmitry-mli in #572
- Handle NumPy 2.x hash compatibility for WebGL data by @Copilot in #584
New Contributors
- @evi-hendrikx made their first contribution in #570
- @hmac213 made their first contribution in #571
- @tknapen made their first contribution in #574
- @sjshim made their first contribution in #577
- @dmitry-mli made their first contribution in #572
- @Copilot made their first contribution in #584
Full Changelog: 1.2.11...1.2.12
1.2.11
What's Changed
- NF: add config option for uniform lighting by @MShinkle in #561
- FIX: Python 3.13 compatibility, and upgrade to Cython 3 by @kroq-gar78 in #564
Dependabot
- Bump JamesIves/github-pages-deploy-action from 4.6.3 to 4.6.4 by @dependabot in #554
- Bump JamesIves/github-pages-deploy-action from 4.6.4 to 4.6.8 by @dependabot in #555
- Bump JamesIves/github-pages-deploy-action from 4.6.8 to 4.6.9 by @dependabot in #558
- Bump codecov/codecov-action from 4 to 5 by @dependabot in #559
- Bump JamesIves/github-pages-deploy-action from 4.6.9 to 4.7.2 by @dependabot in #562
Full Changelog: 1.2.10...1.2.11
1.2.10
What's Changed
- MNT Remove dependency on distutils by @kroq-gar78 in #553
Full Changelog: 1.2.9...1.2.10
1.2.9
What's Changed
- MNT,FIX test code on python 3.11, fix matplotlib register cmap by @mvdoc in #536
- Bump JamesIves/github-pages-deploy-action from 4.6.0 to 4.6.1 by @dependabot in #537
- NF Add functions to project volume data to surface while dealing with NaNs. by @mvdoc in #539
- FIX np.product is deprecated in favor of np.prod by @mvdoc in #541
- ENH better handling of temp directory for downloading subjects by @mvdoc in #540
- FIX avoid using wget and use urllib by @mvdoc in #542
- MNT use codecov action with token by @mvdoc in #543
- FIX avoid using jQuery for getting numpy arrays by @mvdoc in #544
- Bump JamesIves/github-pages-deploy-action from 4.6.1 to 4.6.3 by @dependabot in #546
- NF add functions to compute mappers from freesurfer to WebGL by @mvdoc in #547
- NF,DOC improve docstring for show and make_static by @mvdoc in #548
- NF display values at vertex in webgl viewer by @mvdoc in #549
- ENH Add option to specify which sulci to show. by @cchen23 in #550
Full Changelog: 1.2.8...1.2.9
1.2.8
What's Changed
- FIX pass overlay_file arg when creating cutout. by @cchen23 in #496
- FIX update URL of retinotopy dataset by @mvdoc in #499
- ENH allow setting curvature values when starting webgl viewer by @mvdoc in #498
- FIX ensure correct datatype for mri_surf2surf by @mvdoc in #502
- FIX check if shapes exist before setting the labels in the WebGL viewer by @mvdoc in #501
- FIX do not use a default layout selection for multiple volumes by @mvdoc in #503
- FIX Improve masks returned by
get_roi_masksand correctly split into left/right hemispheres by @mvdoc in #504 - Add codespell: workflow, config and fix typos it finds by @yarikoptic in #506
- FIX save surf2surf matrix with surface_type in filename by @mvdoc in #510
- FIX do not register colormap if already done by @Matlmr in #512
- MNT specify when to run actions by @mvdoc in #513
- ADD add multiple data at the same time if data is a list by @Matlmr in #514
- ENH,EXA add function to upsample from fsaverageX to fsaverage by @mvdoc in #519
- ENH Add more options for freesurfer's automatic alignment, move code for FSL's automatic alignment by @mvdoc in #528
- FIX,DOC make sure cmap filename ends with png by @mvdoc in #529
- ENH sort subject list and improve repr of transforms by @mvdoc in #530
- DOC Update README.md by @FrancisVila in #527
- FIX,MNT import surfaces generated from volumes with any voxel size by @mvdoc in #531
- FIX allow any character in mask name by @mvdoc in #533
New Contributors
- @Matlmr made their first contribution in #512
- @FrancisVila made their first contribution in #527
Full Changelog: 1.2.7...1.2.8
1.2.7
What's Changed
- MNT use latest ubuntu and more recent actions for publishing to pypi by @mvdoc in #481
- MNT: updated get_data to get_fdata to support latest nibabel (5.0). by @marklescroart in #482
- Removed dependency on 'six' library by @marklescroart in #483
- MNT require cython<3.0 to avoid breaking install by @mvdoc in #491
- EXA make path visible in fix_geodesic_path example by @marklescroart in #487
Full Changelog: 1.2.6...1.2.7
1.2.6
What's Changed
Fixes
- FIX update nibabel deprecated methods by @TomDLT in #457
- FIX Improve robustness of attribute query for
JSProxyby @mvdoc in #456 - FIX Correctly handle NaNs in
VertexRGBandVolumeRGBby @mvdoc in #458 - FIX add missing params to cortex.export.init by @mvdoc in #460
- FIX force vmin/vmax to 0/1 whenever an array is passed as alpha by @mvdoc in #461
- FIX when shared_range=True, use the alpha that is passed and do not create a Volume from alpha by @ctseng12 in #462
- FIX avoid registering the same colormap twice to matplotlib by @TomDLT in #464
- FIX get_roi_surfs is now py3 compatible and accepts overlay_file by @mvdoc in #467
- FIX git URL for pip install by @kroq-gar78 in #476
- FIX
cortex.export.plot_panelscorrectly shows inflated surfaces for subjects without a flatmap by @mvdoc in #477 - FIX stop using expired deprecation for numpy 1.24 by @TomDLT in #479
Enhancements
- ENH enable loading of pycortex datasets that have old subject names by @marklescroart in #463
- ENH warn non-perceptually-uniform 2D colormap by @TomDLT in #466
Maintenance
- MNT fix typos by @kroq-gar78 in #459
- MNT warn about alpha only if dtype is not uint8 by @mvdoc in #465
- MNT deal with some nibabel deprecation errors by @mvdoc in #471
- MNT bump version to 1.2.6 by @mvdoc in #480
Full Changelog: 1.2.5...1.2.6