If you have a question or issue with MNE-Python, please include the following info:
- MNE-Python version: 0.21.1
- operating system: Windows 10
Good afternoon I am trying to visualize with nifti our roc estimates on brains. Not so important to go into details. In the end now I have a source estimate object where i can visualize using the plot method.
This is however a surface source estimate and I need to convert it into nifti to visualize it. I know that the VolSourceEstimate object has a save as nifti format but not the surface source estimate. How can I proceed? Any advice or opinions?
I took the approach of trying to get a morph object with the mne.compute_source_morph() and then modifying somehow the function _interpolate_data(stc, morph, mri_resolution, mri_space, output) to work on surface source estimates. I however am stuck because I end up getting a morph object with a list of 2 arrays under morphed_data_object[‘from vertices’] and not the mentioned arrays in the interpolate_data function:
affine = morph.src_data[‘src_affine_vox’]
affine = morph.src_data[‘src_affine_src’]
if mri_space: affine = np.dot(morph.src_data['src_affine_ras'], affine)
I am however a student and relatively new to mne so it may be far fetched my approach to solving the situation.
I know I cant simply just feed the raw stc to the nibabels Nifti1.image function because there should be a transformation prior which I had thought to be the source morph.
Any opinions or advice?