Fix deprecated avifile/addframe API and timeseries_extract_slice returning all zeros#70
Conversation
Co-authored-by: torwager <6262700+torwager@users.noreply.github.com>
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # CanlabCore/Data_extraction/timeseries_extract_slice.m
|
Merged current Heads-up for review (not a conflict): this rewrite drops the Static analysis is clean (only pre-existing preallocation hints in the slice loop). 🤖 Generated with Claude Code |
The codespell gate (merged via #53) was red on master because newer code (merged via #53/#70/#79) contained typos the original sweep never saw. Fix real comment typos: exlude->exclude, meaninful->meaningful (canlab_pattern_similarity.m); INTIALIZE->INITIALIZE (hansen_neurotransmitter_maps.m); and saggital/immmediately/iamges/waht/ sigificant/Treshold in the vendored walkthrough snapshot scripts (Unit_tests/walkthroughs/private/canlab_help_*.m). All are in comments. Whitelist 'hask' -- an intentional "has key" anonymous-function helper in canlab_colormap.m and @fmridisplay/render_layer_surfaces.m. codespell now exits clean. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
movie_toolsandmovie_of_slice_timeseriesused the removedavifile()/addframe()API.timeseries_extract_slicereturned all zeros due to doublespm_volremapping and was missing sagittal/coronal implementations entirely.timeseries_extract_slice.mget_ax_slice→spm_vol→spm_slice_vol) with direct inline extraction using thespm_matrix+spm_slice_volpattern from the workingtimeseries4.mget_ax_slice.meye(4)+C(3,4) = slice_numwithspm_matrix([0 0 slice_num]), consistent withcluster_orthviews.mV(i).dim(1:2)per-volume instead of pre-computedV(1).dim(1:2)movie_of_slice_timeseries.mwriteVideo(mov, H)passed a raw axes handle — fixed towriteVideo(mov, getframe(H))mov.Qualitywas a bare property read (no-op) — fixed tomov.Quality = 75add_a_framehelper to matchmovie_tools.mavifile()/addframe()withVideoWriter/open/writeVideo/getframein the'avi'branchOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.