Visual Check

The current function provides batch operations to visually inspect artifacts and normalization quality, by calling Display from SPM. We’ve added keyboard operations to the Display figure that users can press up/down to switch fMRI volumes of one subject and press left/right to switch subjects. Before running the frame-by-frame inspection, the current function exports screenshots of selected slices overlaid by a semi-transparent brain mask for a glimpse of the overall image quality.


The function calls SPM Check Reg to visualize input volume, a keyboard callback is added to enable left/right and up/down to switch timepoint and subjects.

  • mask: could be whole brain mask or gray matter mask.
  • id index: identifier to find unique string for each subject
  • filetype: files in the filetype will be searched in input directories.
  • 4D nifti files: if the input data is 4D, check this item. Otherwise uncheck.
  • input dirs: directories can be input either using a *.txt file or spm select window.
  • display orthogonal view: check to display orthogonal view of selected slices and save screenshots. uncheck will only save screenshots to out dir.
  • mask color: color of the transparent overlaid mask.
  • slices: modified image n-th slice of x,y,z to save.
  • out dir: output directory for saving results.
  • Keyboard Operation:
    • Up/Down: last/next timepoint of the same subject.
    • Left/Right: same timepoint of last/next subject.
  • Buttons:
    • S: Save parameters of the current panel to a *.mat file. The *.mat can be further loaded for the panel or be used in a script processing.
    • L: Load parameters from *.mat for the current panel.
    • ?: Help information.