Getting voxel coordinates of 2d vector fmri data from either nilearn/nltools


I am wondering how to get the voxel coordinates of 2d fmri data after it has been masked/transformed in either nilearn or nltools (or really anything in Python 3. i’m just trying to enter the future from pymvpa/python 2).

I see in nilearn there is the inverse_transform() for the NiftiMasker object, but this only works if you are trying to inverse transform with the exact same number of voxels - which does not help my case.

I am trying to take my 2d fmri data, do feature selection with sklearn which will alter the number of voxels, and then know the voxel coordinates of those selected features. There’s more to it than that, but simply I just need to know the voxel coordinates of the 2d fmri data. I cannot seem to find this information in any of the data objects I have investigated or anywhere obvious in the docs.

Thanks for any help!