Hi Uday,
If you can read the shared directory in real-time (without
too much lag), then you can run afni in realtime mode to
construct datasets, do motion correction, and compute ROI
averages per TR.
Also, realtime_receiver.py can open a TCP connection to
afni (or show you how to do it) to receive the motion
parameters and ROI averages each TR. That program is
meant to be a template for you to play around with.
Start by getting used to AFNI's realtime system without
using the scanner, i.e. using existing data. See the
AFNI_data6 sample data under realtime.demos. And focus
on demo.2, which includes feedback:
http://afni.nimh.nih.gov/pub/dist/edu/data/CD.expanded/AFNI_data6/realtime.demos/demo.2.fback.0.README
Please let me know how it goes.
- rick