Signy,
This is very easy to do, all you need to do is feed in the anatomical mask into the parameter structure that gets fed into the PPPI command. The gPPI code will extract the voxels with non-zero values in the ROI file. This can all be done in the wrapper. If you are using the same mask in all subjects, its even easier, but if you have a different mask for each subject, then you can create a variable that lists all the masks and then have the wrapper select the correct mask inside the loop over subjects.
There is no need to write a script to extract the data prior to the PPI wrapper.