Draw ROI in afni using atlases

Hi Afni experts,
Because my fMRI data were normalized to the TT_N27 template before, I have some questions when drawing anatomical ROI:
1)Can I use these MNI atlases (CA_…_MNIA) to generate ROI?
I don‘t think these MNI atlases should be used because my fMRI data is in Talairach space.
http://imgsrc.baidu.com/forum/w%3D580/sign=090d763905f79052ef1f47363cf2d738/8176269759ee3d6d7c5282e14f166d224e4adecb.jpg
2)Which atlas can I use?
TT_Deamon or CA_N27_LR? Are they in Talairach space?
3)How to transform the atlas in MNI space to TT_N27 space if I want to use them?
I have downloaded many atlases with more details in MNI space.

Thank you in advance!
Yu

You should be able to use “whereami -show_atlases” to see all the available atlases and their corresponding template spaces. If you want all these to show up in the Draw Dataset plugin, set AFNI_ATLAS_LIST to ALL in your .afnirc file. The CA_N27_ML or CA_N27_MPM atlas may be what you want. The atlases with names ending in MNIA are not in MNI space, but in a variant of MNI called MNI_ANAT space with the (0,0,0) at the Anterior Commissure. You can also use a copy of an atlas, or extract a particular region with 3dcalc. If you have atlases available elsewhere, these can be merged into standard AFNI use by using the script @Atlasize. Let me know if you run into any problems.

Thank you, Daniel!
I am interested in the activities of different insular subregions recently. I find the available atlases of insular subregions on the Internet are all in MNI space. For example, The atlases which include 5 subregions provided in this site ([size=x-small]Faillenot, I., Heckemann, R. A., Frot, M., & Hammers, A. (2017). Macroanatomy and 3D probabilistic atlas of the human insula. NeuroImage, 150, 88-98.[/size]) are produced in MNI152 space. But all my previous processings were done in Talairach space and TT_N27 was used as the template in AFNI. So I need to transform these atlases to Talairach space firstly if necessary.
But I have some questions before that:

  1. I know it is not accurate at all no matter what kind of transformation between MNI and Talairach is performed. So do you know any atlas in TT_N27 space which includes several subregions of insular?

  2. If the insular atlas in Talairach space does not exist, the transformation is ineluctability.

And I have tried to do this:
One subregion in the atlases mentioned above was transformed into Talairach space:


3dWarp -mni2tta -NN -prefix Transformed_dset probmap-gm-r20-insula_posterior_long_gyrus_L.nii
[size=small]++ 3dWarp: AFNI version=AFNI_17.0.09 (Aug  7 2009) [64-bit]
++ Authored by: RW Cox[/size]

And a dateset was generated:


 ls Transformed_dset*
[size=small]Transformed_dset+orig.BRIK  Transformed_dset+orig.HEAD[/size]

But the generated daset is still with the suffix of ‘+orig’. And it is in the space of TLRC:


3dinfo Transformed_dset*
[size=small]++ 3dinfo: AFNI version=AFNI_17.0.09 (Aug  7 2009) [64-bit]
Dataset File:    Transformed_dset+orig
Identifier Code: XYZ_YmftSLU67NPk50y5huwi5w  Creation Date: Fri Mar  2 04:07:20 2018
Template Space:  TLRC
Dataset Type:    Anat Bucket (-abuc)
Byte Order:      LSB_FIRST [this CPU native = LSB_FIRST]
Storage Mode:    BRIK
Storage Space:   18,515,952 (19 million [mega]) bytes
Geometry String: "MATRIX(1,0,0,-78,0,-1,0,112,0,0,1,-70):157,189,156"
Data Axes Tilt:  Plumb
Data Axes Orientation:
  first  (x) = Right-to-Left
  second (y) = Posterior-to-Anterior
  third  (z) = Inferior-to-Superior   [-orient RPI]
R-to-L extent:   -78.000 [R] -to-    78.000 [L] -step-     1.000 mm [157 voxels]
A-to-P extent:   -76.000 [A] -to-   112.000 [P] -step-     1.000 mm [189 voxels]
I-to-S extent:   -70.000 [I] -to-    85.000 [S] -step-     1.000 mm [156 voxels]
Number of values stored at each pixel = 1
  -- At sub-brick #0 '#0' datum type is float:            0 to            30
----- HISTORY -----
[emily@zhangxue-Precision-T7610: Fri Mar  2 04:07:20 2018] 3dWarp -mni2tta -NN -prefix Transformed_dset probmap-gm-r20-insula_posterior_long_gyrus_L.nii[/size]

It can’t match the TT_N27 dateset:


3dinfo TT_N27
[size=small]++ 3dinfo: AFNI version=AFNI_17.0.09 (Aug  7 2009) [64-bit]
Dataset File:    TT_N27+tlrc
Identifier Code: XYZ_8RjUZA_-GBen3pQPl0DbbA  Creation Date: Wed Aug  1 13:46:03 2007
Template Space:  TT_N27
Dataset Type:    MRI Anatomy (-anat)
Byte Order:      MSB_FIRST [this CPU native = LSB_FIRST]
Storage Mode:    BRIK
Storage Space:   4,643,401 (4.6 million [mega]) bytes
Geometry String: "MATRIX(1,0,0,-80,0,1,0,-80,0,0,1,-65):161,191,151"
Data Axes Tilt:  Plumb
Data Axes Orientation:
  first  (x) = Right-to-Left
  second (y) = Anterior-to-Posterior
  third  (z) = Inferior-to-Superior   [-orient RAI]
R-to-L extent:   -80.000 [R] -to-    80.000 [L] -step-     1.000 mm [161 voxels]
A-to-P extent:   -80.000 [A] -to-   110.000 [P] -step-     1.000 mm [191 voxels]
I-to-S extent:   -65.000 [I] -to-    85.000 [S] -step-     1.000 mm [151 voxels]
Number of values stored at each pixel = 1
  -- At sub-brick #0 'colin27T1_seg' datum type is byte:            0 to           222[/size]

And it can’t be used as the mask directly to 3dmaskave. What should I do next?
Yu

The Eickhoff-Zilles 1.8 MPM atlas distributed with AFNI only has a few parts of the insula labeled (Ig1,Ig2, Id1), but surprisingly none covering the majority of the insula, while in their ML atlas for the N27 dataset, there is only the insula as a whole. The TT_desai_dd_mpm atlas and TT_desai_ddpmaps probabilstic atlas from Rutvik Desai and distributed with AFNI do have sub-divisions of the insula you might want to consider. Jurgen Mai’s brain atlas has a large number of subdivisions for the insula that are well worth viewing, but that atlas is not yet available in a digital form. The Allen brain site includes three sub-divisions of the insula. You may be able to transform the atlas and corresponding single subject to Talairach space. The Brainnetome atlas provide six sub-divisions of the insula, and that atlas is downloadable and potentially useable in AFNI without too much effort, I think.

If you have an atlas in MNI space and a dataset aligned to the TT_N27 dataset, I would use the “adwarp” command, as mentioned in this previous thread.

https://afni.nimh.nih.gov/afni/community/board/read.php?1,155239,155244#msg-155244

The TT_N27 dataset itself was transformed manually from MNI space, and this would apply the same 12-piece transformation to the MNI space atlas.

One simple way to subdivide the insula is for you to do it yourself using a method like this one from another recent thread:

https://afni.nimh.nih.gov/afni/community/board/read.php?1,157456,157474#msg-157474

Also thanks for the new word for me - “ineluctability”! I have somehow avoided that word!

Hi Daniel,
I think your suggestions are very helpful. But I also have two kinds of questions:

  1. I have tried to use the TT_desai_ddpmaps atlas.

1.1 Many regions are included in this atlas:


whereami -show_atlas_code -atlas DD_Desai_PM 
[size=x-small]++ Input coordinates orientation set by default rules to RAI
Atlas DD_Desai_PM, 150 regions
----------- Begin regions for DD_Desai_PM atlas-----------
u:ctx_lh_G_and_S_frontomargin:0
...
u:ctx_lh_S_central:45
u:ctx_lh_S_cingul-Marginalis:46
u:ctx_lh_S_circular_insula_ant:47
u:ctx_lh_S_circular_insula_inf:48
u:ctx_lh_S_circular_insula_sup:49
...[/size]

What’s the coding rules of these region codes? I think “ctx” stands for “cortex” and “lh” stands for left hemisphere. But what dose "u:’ and ‘G’ or ‘S’ stand for in the region names?

1.2 And my ROI was generated using:


whereami -mask_atlas_region DD_Desai_PM:left:ctx_lh_G_insular_short -prefix test

Display of the generated ROI:
http://imgsrc.baidu.com/forum/w%3D580/sign=2f4675c09082d158bb8259b9b00a19d5/3c4462d0f703918f5ea3cee45d3d269759eec416.jpgIt is weird that many different values (range from 0 to 255) are included in the generated mask “test+tlrc”, which is very different from the mask generated using the other atlas. I think the different values represent different probability. But how to use the probabilistic mask? Should I use all the voxels with positive values in this mask (That is, all the voxels with the probability bigger than 0 will be included )? Or should I choose a threshold (e.g. 200) and only the voxels with the values bigger than this threshold can be identified as the target ROI (insular_short in my case)?
2. The Brainnetome atlas seems to be very good. But this atlas was still normalized to MNI152 brain template, not the mni version of the N27 dataset, just like the atlas I mentioned. So the adwarp method which moves the N27 dataset from MNI space to Talairach space becomes inappropriate for an MNI152 template? Are there more appropriate ways to transform if I really want to use the Brainnetome atlas?

Sorry for so many questions!
Thank you again!
Yu

The “u” in the whereami output is meant to show that the region is not identified as left or right. The ctx is Freesurfer’s notation for cortex. “lh” is left-hemisphere. Likewise, the G and S stand for gyral and sulcal regions, respectively.

The probabilistic maps are a bit more difficult to work with, but they do allow for a specific region to include a larger number of voxels. You may use a threshold you believe to be appropriate, so if you think a 30% probability threshold is good choice, you can threshold that using a 3dcalc command, for instance, to 0.3. The MPM atlas uses a 5% minimum threshold and assigns the region with the maximum probability above that. That is a different way to use an atlas region that does not permit overlapping regions.

For atlases that are in MNI space, you may want to transform the atlas, rather than your group results, to the space of the template. You can do that with the adwarp command (follow the link in my previous response). Be sure to use nearest neighbor interpolation for atlas regions. Probabilistic region could be transformed with linear or cubic interpolation and thresholded in the TT_N27 space.

The values in the mask generated using TT_desai_ddpmaps atlas are not fractions or percentages. These values range from 0 to 255. I don’t know how to change probability threshold with specific percentage or fraction into the threshold values corresponding to the values stored in this mask. Because I don’t know what the unit of the values stored in the mask is. I guess value ‘0’ is 0% and value ‘255’ is 100% in the generated mask. If 30% probability is used as the threshold, is it right that my ROI mask is generated like this:


whereami -mask_atlas_region DD_Desai_PM:left:ctx_lh_G_insular_short -prefix insular_short
3dcalc -a insular_short+tlrc -expr 'ispostive(a/255*100-30)' -prefix myroi

Thank you very much!
I am very appreciated for your answers!

It’s a little more complicated than that. The dataset is stored with a scale factor as bytes, and each ROI sub-brick has a different scale factor. Use this method instead to extract the region.

3dcalc -a $HOME/abin//TT_desai_ddpmaps+tlrc’[ctx_lh_G_insular_short]’ -prefix insular_short -float -overwrite -expr ‘step(a-0.3)’

3drefit -denote insular_short+tlrc.

That particular atlas has a very long history in the header, so I just trimmed it away with the 3drefit command.

The Brainnetome atlas looked interesting, so I made it AFNI compatible. You can download it here:

https://afni.nimh.nih.gov/pub/dist/atlases/brainnetome/brainnetome_dist.tgz

After downloading, set AFNI to use as any other atlas by adding the directory of the downloaded atlas to your .afnirc with

@AfniEnv -set AFNI_SUPP_ATLAS_DIR …/brainnetome_dist

brainnetome_surfaces.png

Dear Daniel, I appreciate what you did! The compatible version of Brainnetome atlas is pretty good. But the transformed Brainnetome atlas for TT_N27 template seems not to be so good because some regions are not a whole. That is, some tiny parts of a specific brain region are away from the main region cluster. Finally, I would use TT_desai_ddpmaps you mentioned.
Thank you!