How to show the edges of an overlay image

AFNI has two main edge-estimation programs: 3dedge3 and 3dedgedog.
You could create a dataset of edges, and load that in AFNI to view and/or save images.

I’ll also note that showing edges of an anatomical over an EPI is definitely useful for showing quality of alignment; that is what AFNI’s afni_proc.py uses for the EPI-anatomical (and anatomical-template) alignment checks for its QC HTML, as demonstrated here.

Specifically, the script/program that takes the EPI as underlay and anatomical as overlay, and calculates the edges internally and then saves a montage image for each of the major slice planes, is demonstrated here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/auto_image/auto_%40chauffeur_afni.html#ex-8-check-alignment-with-edge-view
That might be particularly useful. Having that program to do the snapshotting means you can systematically view the outputs, which is convenient.

–pt