SPM spm_mip_ui extracting value from the nearest supra threshold voxel

Hello everyone,

I’m extracting some data for specific contrasts for multiple subjects, in order to plot this and compare the activation for a given condition in multiple peaks coordinates.

My issue is that the peak is from group-level analyses, and sometimes it is very off-center, thus outside of the mask analysis for some subjects. What I would like to do then is, for these subjects, go to the nearest supra-threshold voxel to these coordinates. I know how to do it through the SPM GUI, but I’m trying to do it through script, do you have any idea? Tried with spam_mip_ui, but I haven’t find how to specify the arguments so far…
Do you have any alternative?

Thanks everyone,