[Simnibs-discuss] Get element data in Atlas
Oula Puonti
oulap at drcmr.dk
Tue Mar 14 14:19:34 CET 2023
Hi Silvana,
It's possible yes, but you should use a volumetric atlas (or create a
volumetric atlas from the surface one).
There are a few options:
1) Interpolate the e-field values to volume space by ticking the
options: "interpolate to nifti volume" and "transform to mni space"
under simulation options in the GUI, or if you're using simulation
scripts set s.map_to_vol = True and s.map_to_MNI = True (in python).
When those options are used the e-field will be interpolated to the
volume space (the same space as the MRI input) and also transformed to
the MNI space. You can then analyze the e-field using any standard
volumetric atlas in MNI space. Note that the niftis will be 4-
dimensional (x,y,z and 3 e-field direction corresponding to the the
vectors). It's not possible to analyze the normal and tangential
components in volume space as that needs a surface.
2) Map a volumetric atlas to the subject space from MNI. You can use
this function for the transformation:
https://github.com/simnibs/simnibs/blob/master/simnibs/utils/transformations.py#L413
note that if it's a label atlas please set in order to 0. Once you've
mapped your atlas from MNI space to the subject space you can then
interpolate it onto the mesh using the nii2msh command, see here:
https://simnibs.github.io/simnibs/build/html/documentation/command_line/nii2msh.html
and then extract the e-field in those mesh elements where the data
field values in the mesh match the atlas region you're interested in.
3) For a more approximate approach you can span a spherical roi around
a center point, e.g., in the motor cortex, and then analyze the e-field
values within that roi. See example here:
https://simnibs.github.io/simnibs/build/html/tutorial/analysis.html
Approaches 1) and 3) are easiest, but 3) is of course approximate. For
option 1) you would only need to write the code for masking the
volumetric e-field data with the atlas and then analyzing the results.
It seems there is a volumetric version of the MMP atlas in MNI space:
https://neurovault.org/collections/1549/
so you can either use the e-field values mapped to MNI space in option
1) and mask with the atlas or map the atlas to subject space using the
warping code in option 2) and then mask the e-field values interpolated
to the input nifti.
Best,
Oula
On Mon, 2023-03-13 at 15:46 +0100, Silvana Huertas wrote:
> Hi,
>
> I have been asking many questions later, so thank you for always
> answering, it helps me a lot :)
>
> I have been using the ROI code in your page to use an atlas and I
> see that this only gives me the node data (surface level). Is it
> possible, by any chance, to get the element data using an atlas? I
> would like to analyze the Electric field (x,y,z) in the primary motor
> cortices (I'm currently using the HCP_MMP1 atlas).
>
> Thank you for your help,
>
> Silvana Huertas
> _______________________________________________
> Simnibs-discuss mailing list
> Simnibs-discuss at drcmr.dk
> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss
More information about the Simnibs-discuss
mailing list