@NRob you could apply this script to motion across a 4D image (3D space + time). The issue is knowing if variability reflects poor spatial alignment or an temporal artifact. Therefore, you would want to incorporate some values regarding motion. My Matlab scripts illustrate this approach with relevant links. The tool you process images with should provide som quality checks, for example fmriprep and AFNI’s thresholds/feedback on censoring. So the best approach will depend on your pipeline, and QA tools already exist for most pipelines.