Any program can monitor a file system or similar, and send data to afni. Dimon is such a program. It scans a directory, sorts images (, looks for errors), finds volumes, and then sends them to afni's real-time plugin. The plugin will do motion correction and averaging and such, and can then send motion parameters and ROI averages to an external program, such as realtime_receiver.py.
Note that Dimon does not use a watchdog signal, though that has been on the todo list for a long time.
At any rate, the receiving/feedback program can get new ROI averages, regress motion, and decide on the feedback to the user. But working with ROI averages this way means you do not need to do any 4-D regression.
- rick