Fix deprecated avifile/addframe API and timeseries_extract_slice returning all zeros#70
Draft
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
AI
changed the title
[WIP] Fix movie_tools and movie_of_slice_timeseries for avifile deprecation
Fix deprecated avifile/addframe API and timeseries_extract_slice returning all zeros
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.