how to get ONLY the max voxel from 3dmaskave

I'm trying to get the location of the maximum voxel, so that I can extract the time series from that particular voxel. I used
3dmaskave -mask roi1+tlrc -max -dump -indump activationmap+tlrc >out_voxels.txt
which outputs ALL the non-zero voxels in the ROI, with the max value at the bottom, which I can use to look up the coordinate in the lines above but it will be really helpful if the output file ONLY contains the coordinate of the max voxel, in that case, I will be able to do the following to extract the time series I need:
coord=(cat out_voxels.txt)
3dmaskdump -ibox $coord func+tlrc >timeseries.txt

Being able to limit the output from 3dmaskave to have ONLY the coordinate of the max voxel will really help me process my data in batch. Is there any get around or another command I can try? Thank you!

There are a multitude of ways to find the value of the maximum voxel within a mask. Take a look at these previous posts: