subcortex-visualization 0.1.11__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {subcortex_visualization-0.1.11/subcortex_visualization.egg-info → subcortex_visualization-1.0.0}/PKG-INFO +39 -17
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/README.md +39 -17
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/pyproject.toml +1 -1
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/setup.py +1 -1
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_AICHA_L.svg +883 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_AICHA_L_ordering.csv +36 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_AICHA_R.svg +883 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_AICHA_R_ordering.csv +36 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_AICHA_both.svg +1920 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_AICHA_both_ordering.csv +71 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Brainnetome_L.svg +788 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Brainnetome_L_ordering.csv +33 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Brainnetome_R.svg +953 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Brainnetome_R_ordering.csv +33 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Brainnetome_both.svg +1687 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Brainnetome_both_ordering.csv +65 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_L.svg +316 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_L_ordering.csv +14 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_R.svg +316 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_R_ordering.csv +14 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_both.svg +588 -0
- subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_both_ordering.csv +27 -0
- subcortex_visualization-0.1.11/subcortex_visualization/data/subcortex_aseg_base_R.svg → subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_aseg_R.svg +9 -9
- subcortex_visualization-0.1.11/subcortex_visualization/data/subcortex_aseg_base_both.svg → subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_aseg_both.svg +11 -11
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/subcortex_visualization/plotting.py +7 -5
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0/subcortex_visualization.egg-info}/PKG-INFO +39 -17
- subcortex_visualization-1.0.0/subcortex_visualization.egg-info/SOURCES.txt +48 -0
- subcortex_visualization-0.1.11/subcortex_visualization/data/subcortical_aseg_paths_lookup.csv +0 -49
- subcortex_visualization-0.1.11/subcortex_visualization.egg-info/SOURCES.txt +0 -31
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/LICENSE.txt +0 -0
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/MANIFEST.in +0 -0
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/setup.cfg +0 -0
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/subcortex_visualization/__init__.py +0 -0
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/subcortex_visualization/data/__init__.py +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/subcortex_Tian_S1_base_L.svg → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S1_L.svg +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/Tian_S1_L_ordering.csv → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S1_L_ordering.csv +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/subcortex_Tian_S1_base_R.svg → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S1_R.svg +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/Tian_S1_R_ordering.csv → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S1_R_ordering.csv +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/subcortex_Tian_S1_base_both.svg → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S1_both.svg +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/Tian_S1_both_ordering.csv → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S1_both_ordering.csv +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/subcortex_Tian_S2_base_L.svg → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S2_L.svg +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/Tian_S2_L_ordering.csv → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S2_L_ordering.csv +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/subcortex_Tian_S2_base_R.svg → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S2_R.svg +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/Tian_S2_R_ordering.csv → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S2_R_ordering.csv +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/subcortex_Tian_S2_base_both.svg → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S2_both.svg +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/Tian_S2_both_ordering.csv → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_Melbourne_S2_both_ordering.csv +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/subcortex_aseg_base_L.svg → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_aseg_L.svg +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/aseg_L_ordering.csv → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_aseg_L_ordering.csv +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/aseg_R_ordering.csv → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_aseg_R_ordering.csv +0 -0
- /subcortex_visualization-0.1.11/subcortex_visualization/data/aseg_both_ordering.csv → /subcortex_visualization-1.0.0/subcortex_visualization/data/subcortex_aseg_both_ordering.csv +0 -0
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/subcortex_visualization.egg-info/dependency_links.txt +0 -0
- {subcortex_visualization-0.1.11 → subcortex_visualization-1.0.0}/subcortex_visualization.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: subcortex_visualization
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: A package to visualize subcortical brain data in two dimensions.
|
|
5
5
|
Author: Annie G. Bryant
|
|
6
6
|
Author-email: "Annie G. Bryant" <anniegbryant@gmail.com>
|
|
@@ -25,27 +25,36 @@ Dynamic: license-file
|
|
|
25
25
|
|
|
26
26
|
# Subcortical data visualization in 2D
|
|
27
27
|
|
|
28
|
+
[](https://doi.org/10.5281/zenodo.15385315)
|
|
29
|
+
|
|
30
|
+
This python package currently includes the following six subcortical atlases for data visualization in two-dimensional vector graphics:
|
|
31
|
+
|
|
32
|
+
<img src="docs-site/docs/images/all_atlas_showcase.png" width="100%">
|
|
33
|
+
|
|
34
|
+
More information about these atlases, including the process of rendering the surfaces and tracing the outlines for each, can be found in the [`atlas_info/`](https://github.com/anniegbryant/subcortex_visualization/tree/main/atlas_info) directory and at the [project website](https://anniegbryant.github.io/subcortex_visualization/).
|
|
35
|
+
|
|
36
|
+
|
|
28
37
|
## 🙋♀️ Motivation
|
|
29
38
|
|
|
30
39
|
This Python package was created to generate two-dimensional subcortex images in the style of the popular [`ggseg` package](https://github.com/ggseg/ggseg) in R.
|
|
31
|
-
We based our vector graphic outlines on the three-dimensional subcortical meshes provided as part of the [ENIGMA toolbox](https://github.com/MICA-MNI/ENIGMA)
|
|
40
|
+
We based our vector graphic outlines on the three-dimensional subcortical meshes either (1) provided as part of the [ENIGMA toolbox](https://github.com/MICA-MNI/ENIGMA) for the aseg atlas or (2) meshes generated in-house using rendering software from [Chris Rorden's lab](https://github.com/neurolabusc) (either [nii2mesh](https://github.com/neurolabusc/nii2mesh) or [Surf Ice](https://github.com/neurolabusc/surf-ice); check out [`custom_segmentation_pipeline/`](https://github.com/anniegbryant/subcortex_visualization/tree/main/custom_segmentation_pipeline) for more information).
|
|
32
41
|
|
|
33
|
-
The below graphic summarizes the transformation from 3D volumetric meshes to 2D surfaces, starting from the ENIGMA toolbox ('aseg' atlas, left) or a custom-rendered mesh from the [Melbourne Subcortex Atlas](https://github.com/yetianmed/subcortex/tree/master)
|
|
42
|
+
The below graphic summarizes the transformation from 3D volumetric meshes to 2D surfaces, starting from the ENIGMA toolbox ('aseg' atlas, left) or a custom-rendered mesh from the [Melbourne Subcortex Atlas](https://github.com/yetianmed/subcortex/tree/master) as published in [Tian et al. (2020)]()https://www.nature.com/articles/s41593-020-00711-6 -- ('S1' granularity level, right).
|
|
34
43
|
|
|
35
|
-
<img src="images/
|
|
44
|
+
<img src="docs-site/docs/images/aseg_and_Melbourne_S1_3D_to_2D_schematic.png" width="90%">
|
|
36
45
|
|
|
37
46
|
|
|
38
47
|
While `ggseg` offers subcortical plotting with the `aseg` atlas, it is [not currently possible](https://github.com/ggseg/ggseg/issues/104) to show data from all seven subcortical regions (accumbens, amygdala, caudate, hippocampus, pallidum, putamen, thalamus) in the same figure.
|
|
39
|
-
|
|
48
|
+
Moreover, there is currently no other software available to visualize any of the other above subcortical/thalamic atlases in 2D with real data, hence development here.
|
|
40
49
|
|
|
41
50
|
|
|
42
51
|
## 🖥️ Installation
|
|
43
52
|
|
|
44
53
|
The package can be installed from GitHub in two ways.
|
|
45
|
-
First, you can install directly with pip:
|
|
54
|
+
First, you can install directly with pip from the [PyPI repository](https://pypi.org/project/subcortex-visualization/):
|
|
46
55
|
|
|
47
56
|
```bash
|
|
48
|
-
pip install
|
|
57
|
+
pip install subcortex-visualization
|
|
49
58
|
```
|
|
50
59
|
|
|
51
60
|
If you would like to make your own modifications before installing, you can also clone this repository first and then install from your local version:
|
|
@@ -69,7 +78,7 @@ plot_subcortical_data(hemisphere='L', cmap='plasma',
|
|
|
69
78
|
fill_title = "Subcortical region index")
|
|
70
79
|
```
|
|
71
80
|
|
|
72
|
-
<img src="images/example_aseg_subcortex_plot.png" width="80%">
|
|
81
|
+
<img src="docs-site/docs/images/example_aseg_subcortex_plot.png" width="80%">
|
|
73
82
|
|
|
74
83
|
|
|
75
84
|
### 📚 Tutorial
|
|
@@ -89,7 +98,7 @@ To plot real data in the subcortex, your `subcortex_data` should be a `pandas.D
|
|
|
89
98
|
|
|
90
99
|
Briefly, all functionality is contained within the `plot_subcortical_data` function, which takes in the following arguments:
|
|
91
100
|
* `subcortex_data`: The three-column dataframe in a format as shown above; this is optional, if left out the plot will just color each region by its index
|
|
92
|
-
* `atlas`: The name of the subcortical segmentation atlas (default is 'aseg',
|
|
101
|
+
* `atlas`: The name of the subcortical segmentation atlas (default is 'aseg', all options listed below)
|
|
93
102
|
* `value_column`: The name of the column in your `subcortex_data` to plot, defaults to 'value'
|
|
94
103
|
* `line_thickness`: How thick the lines around each subcortical region should be drawn, in mm (default is 1.5)
|
|
95
104
|
* `line_color`: What color the lines around each subcortical region should be (default is 'black')
|
|
@@ -121,32 +130,45 @@ plot_subcortical_data(subcortex_data=example_continuous_data, atlas='aseg',
|
|
|
121
130
|
cmap=white_blue_red_cmap, midpoint=0)
|
|
122
131
|
```
|
|
123
132
|
|
|
124
|
-
<img src="images/example_aseg_subcortex_normdist.png" width="80%">
|
|
133
|
+
<img src="docs-site/docs/images/example_aseg_subcortex_normdist.png" width="80%">
|
|
125
134
|
|
|
135
|
+
### Available atlases
|
|
126
136
|
|
|
127
|
-
|
|
137
|
+
The following six subcortical atlases are currently supported with more information at the [project website](https://anniegbryant.github.io/subcortex_visualization/atlas_info/):
|
|
128
138
|
|
|
129
|
-
|
|
130
|
-
|
|
139
|
+
* `aseg`: The `aseg` parcellation atlas from FreeSurfer
|
|
140
|
+
* `Melbourne_S1`: The Melbourne Subcortex Atlas at granularity level S1, from [Tian et al. *Nature Neuroscience* (2020)](https://www.nature.com/articles/s41593-020-00711-6)
|
|
141
|
+
* `Melbourne_S2`: The Melbourne Subcortex Atlas at granularity level S2, from [Tian et al. *Nature Neuroscience* (2020)](https://www.nature.com/articles/s41593-020-00711-6)
|
|
142
|
+
* `AICHA`: The AICHA subcortex atlas, from [Joliot et al. *J Neurosci Methods* (2015)](https://pubmed.ncbi.nlm.nih.gov/26213217/).
|
|
143
|
+
* `Brainnetome`: The Brainnetome subcortex atlas, from [Fan et al. *Cerebral Cortex* (2016)](https://pmc.ncbi.nlm.nih.gov/articles/PMC4961028/)
|
|
144
|
+
* `Thalamus_Nuclei_HCP`: The thalamic nuclei atlas derived from HCP data, from [Najdenovska et al. *Scientific Data* (2018)](https://www.nature.com/articles/sdata2018270)
|
|
131
145
|
|
|
132
|
-
<img src="images/Tian_S1_and_S2_3D_to_2D_schematic.png" width="90%">
|
|
133
146
|
|
|
134
147
|
## 💡 Want to generate your own mesh and/or parcellation?
|
|
135
148
|
|
|
136
|
-
|
|
149
|
+
<img src="docs-site/docs/images/custom_vector_method.png" width="70%">
|
|
150
|
+
|
|
151
|
+
This package provides six subcortical atlases as a starting point.
|
|
137
152
|
The workflow can readily be extended to your favorite segmentation atlas, though!
|
|
138
153
|
We have a dedicated folder for a custom segmentation pipeline that will walk you through the two key steps:
|
|
139
|
-
1. Rendering a series of triangulated surface meshes from your parcellation atlas (starting from a .nii.gz volume), using the [`nii2mesh`](https://github.com/neurolabusc/nii2mesh) software developed by Chris Rorden; and
|
|
154
|
+
1. Rendering a series of triangulated surface meshes from your parcellation atlas (starting from a .nii.gz volume), using either the [`nii2mesh`](https://github.com/neurolabusc/nii2mesh) or [`surfice_atlas`](https://github.com/neurolabusc/surfice_atlas) software, both developed by [Chris Rorden's lab](https://github.com/rordenlab); and
|
|
140
155
|
2. Tracing the outline of each region in the rendered mesh in vector graphic editing software (we use Inkscape in the tutorial as a powerful and free option), to yield a two-dimensional image of your atlas in scalable vector graphic (.svg) format.
|
|
141
156
|
|
|
142
157
|
Check out the walkthrough in the [`custom_segmentation_pipeline/`](https://github.com/anniegbryant/subcortex_visualization/tree/main/custom_segmentation_pipeline) folder for more information on how to render your own volumetric segmentation with an interactive mesh and convert to a two-dimensional vector graphic that can be integrated with this package.
|
|
143
158
|
|
|
144
159
|
## 🙏 Acknowledgments
|
|
145
160
|
|
|
146
|
-
Thank you very much to [
|
|
161
|
+
Thank you very much to [Chris Rorden](https://github.com/rordenlab), [Ye Tian](https://github.com/yetianmed), and [Sid Chopra](https://github.com/sidchop) for their suggestions and continued development of open tools for neuroimaging visualization that enabled development of this project!
|
|
162
|
+
|
|
163
|
+
## 🔗 Citing this package
|
|
164
|
+
|
|
165
|
+
If you use this package in a scientific publication, blog post, etc., please cite the corresponding Zenodo release as follows:
|
|
166
|
+
|
|
167
|
+
Annie G. Bryant. (2025). anniegbryant/subcortex_visualization: Initial Zenodo release (initial_release). Zenodo. https://doi.org/10.5281/zenodo.15385316
|
|
147
168
|
|
|
148
169
|
## ❓📧 Questions, comments, or suggestions always welcome!
|
|
149
170
|
|
|
150
171
|
Please feel free to ask questions, report bugs, or share suggestions by creating an issue or by emailing me (Annie) at ([anniegbryant@gmail.com](mailto:anniegbryant@gmail.com)) 😊
|
|
151
172
|
|
|
152
173
|
As an [open-source tool](https://opensource.guide/how-to-contribute/), pull requests are always welcome from the community, too.
|
|
174
|
+
If you create your own custom vector graphic for your segmentation atlas of choice, feel free to create a pull request to incorporate and be acknowledged.
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
# Subcortical data visualization in 2D
|
|
2
2
|
|
|
3
|
+
[](https://doi.org/10.5281/zenodo.15385315)
|
|
4
|
+
|
|
5
|
+
This python package currently includes the following six subcortical atlases for data visualization in two-dimensional vector graphics:
|
|
6
|
+
|
|
7
|
+
<img src="docs-site/docs/images/all_atlas_showcase.png" width="100%">
|
|
8
|
+
|
|
9
|
+
More information about these atlases, including the process of rendering the surfaces and tracing the outlines for each, can be found in the [`atlas_info/`](https://github.com/anniegbryant/subcortex_visualization/tree/main/atlas_info) directory and at the [project website](https://anniegbryant.github.io/subcortex_visualization/).
|
|
10
|
+
|
|
11
|
+
|
|
3
12
|
## 🙋♀️ Motivation
|
|
4
13
|
|
|
5
14
|
This Python package was created to generate two-dimensional subcortex images in the style of the popular [`ggseg` package](https://github.com/ggseg/ggseg) in R.
|
|
6
|
-
We based our vector graphic outlines on the three-dimensional subcortical meshes provided as part of the [ENIGMA toolbox](https://github.com/MICA-MNI/ENIGMA)
|
|
15
|
+
We based our vector graphic outlines on the three-dimensional subcortical meshes either (1) provided as part of the [ENIGMA toolbox](https://github.com/MICA-MNI/ENIGMA) for the aseg atlas or (2) meshes generated in-house using rendering software from [Chris Rorden's lab](https://github.com/neurolabusc) (either [nii2mesh](https://github.com/neurolabusc/nii2mesh) or [Surf Ice](https://github.com/neurolabusc/surf-ice); check out [`custom_segmentation_pipeline/`](https://github.com/anniegbryant/subcortex_visualization/tree/main/custom_segmentation_pipeline) for more information).
|
|
7
16
|
|
|
8
|
-
The below graphic summarizes the transformation from 3D volumetric meshes to 2D surfaces, starting from the ENIGMA toolbox ('aseg' atlas, left) or a custom-rendered mesh from the [Melbourne Subcortex Atlas](https://github.com/yetianmed/subcortex/tree/master)
|
|
17
|
+
The below graphic summarizes the transformation from 3D volumetric meshes to 2D surfaces, starting from the ENIGMA toolbox ('aseg' atlas, left) or a custom-rendered mesh from the [Melbourne Subcortex Atlas](https://github.com/yetianmed/subcortex/tree/master) as published in [Tian et al. (2020)]()https://www.nature.com/articles/s41593-020-00711-6 -- ('S1' granularity level, right).
|
|
9
18
|
|
|
10
|
-
<img src="images/
|
|
19
|
+
<img src="docs-site/docs/images/aseg_and_Melbourne_S1_3D_to_2D_schematic.png" width="90%">
|
|
11
20
|
|
|
12
21
|
|
|
13
22
|
While `ggseg` offers subcortical plotting with the `aseg` atlas, it is [not currently possible](https://github.com/ggseg/ggseg/issues/104) to show data from all seven subcortical regions (accumbens, amygdala, caudate, hippocampus, pallidum, putamen, thalamus) in the same figure.
|
|
14
|
-
|
|
23
|
+
Moreover, there is currently no other software available to visualize any of the other above subcortical/thalamic atlases in 2D with real data, hence development here.
|
|
15
24
|
|
|
16
25
|
|
|
17
26
|
## 🖥️ Installation
|
|
18
27
|
|
|
19
28
|
The package can be installed from GitHub in two ways.
|
|
20
|
-
First, you can install directly with pip:
|
|
29
|
+
First, you can install directly with pip from the [PyPI repository](https://pypi.org/project/subcortex-visualization/):
|
|
21
30
|
|
|
22
31
|
```bash
|
|
23
|
-
pip install
|
|
32
|
+
pip install subcortex-visualization
|
|
24
33
|
```
|
|
25
34
|
|
|
26
35
|
If you would like to make your own modifications before installing, you can also clone this repository first and then install from your local version:
|
|
@@ -44,7 +53,7 @@ plot_subcortical_data(hemisphere='L', cmap='plasma',
|
|
|
44
53
|
fill_title = "Subcortical region index")
|
|
45
54
|
```
|
|
46
55
|
|
|
47
|
-
<img src="images/example_aseg_subcortex_plot.png" width="80%">
|
|
56
|
+
<img src="docs-site/docs/images/example_aseg_subcortex_plot.png" width="80%">
|
|
48
57
|
|
|
49
58
|
|
|
50
59
|
### 📚 Tutorial
|
|
@@ -64,7 +73,7 @@ To plot real data in the subcortex, your `subcortex_data` should be a `pandas.D
|
|
|
64
73
|
|
|
65
74
|
Briefly, all functionality is contained within the `plot_subcortical_data` function, which takes in the following arguments:
|
|
66
75
|
* `subcortex_data`: The three-column dataframe in a format as shown above; this is optional, if left out the plot will just color each region by its index
|
|
67
|
-
* `atlas`: The name of the subcortical segmentation atlas (default is 'aseg',
|
|
76
|
+
* `atlas`: The name of the subcortical segmentation atlas (default is 'aseg', all options listed below)
|
|
68
77
|
* `value_column`: The name of the column in your `subcortex_data` to plot, defaults to 'value'
|
|
69
78
|
* `line_thickness`: How thick the lines around each subcortical region should be drawn, in mm (default is 1.5)
|
|
70
79
|
* `line_color`: What color the lines around each subcortical region should be (default is 'black')
|
|
@@ -96,32 +105,45 @@ plot_subcortical_data(subcortex_data=example_continuous_data, atlas='aseg',
|
|
|
96
105
|
cmap=white_blue_red_cmap, midpoint=0)
|
|
97
106
|
```
|
|
98
107
|
|
|
99
|
-
<img src="images/example_aseg_subcortex_normdist.png" width="80%">
|
|
108
|
+
<img src="docs-site/docs/images/example_aseg_subcortex_normdist.png" width="80%">
|
|
100
109
|
|
|
110
|
+
### Available atlases
|
|
101
111
|
|
|
102
|
-
|
|
112
|
+
The following six subcortical atlases are currently supported with more information at the [project website](https://anniegbryant.github.io/subcortex_visualization/atlas_info/):
|
|
103
113
|
|
|
104
|
-
|
|
105
|
-
|
|
114
|
+
* `aseg`: The `aseg` parcellation atlas from FreeSurfer
|
|
115
|
+
* `Melbourne_S1`: The Melbourne Subcortex Atlas at granularity level S1, from [Tian et al. *Nature Neuroscience* (2020)](https://www.nature.com/articles/s41593-020-00711-6)
|
|
116
|
+
* `Melbourne_S2`: The Melbourne Subcortex Atlas at granularity level S2, from [Tian et al. *Nature Neuroscience* (2020)](https://www.nature.com/articles/s41593-020-00711-6)
|
|
117
|
+
* `AICHA`: The AICHA subcortex atlas, from [Joliot et al. *J Neurosci Methods* (2015)](https://pubmed.ncbi.nlm.nih.gov/26213217/).
|
|
118
|
+
* `Brainnetome`: The Brainnetome subcortex atlas, from [Fan et al. *Cerebral Cortex* (2016)](https://pmc.ncbi.nlm.nih.gov/articles/PMC4961028/)
|
|
119
|
+
* `Thalamus_Nuclei_HCP`: The thalamic nuclei atlas derived from HCP data, from [Najdenovska et al. *Scientific Data* (2018)](https://www.nature.com/articles/sdata2018270)
|
|
106
120
|
|
|
107
|
-
<img src="images/Tian_S1_and_S2_3D_to_2D_schematic.png" width="90%">
|
|
108
121
|
|
|
109
122
|
## 💡 Want to generate your own mesh and/or parcellation?
|
|
110
123
|
|
|
111
|
-
|
|
124
|
+
<img src="docs-site/docs/images/custom_vector_method.png" width="70%">
|
|
125
|
+
|
|
126
|
+
This package provides six subcortical atlases as a starting point.
|
|
112
127
|
The workflow can readily be extended to your favorite segmentation atlas, though!
|
|
113
128
|
We have a dedicated folder for a custom segmentation pipeline that will walk you through the two key steps:
|
|
114
|
-
1. Rendering a series of triangulated surface meshes from your parcellation atlas (starting from a .nii.gz volume), using the [`nii2mesh`](https://github.com/neurolabusc/nii2mesh) software developed by Chris Rorden; and
|
|
129
|
+
1. Rendering a series of triangulated surface meshes from your parcellation atlas (starting from a .nii.gz volume), using either the [`nii2mesh`](https://github.com/neurolabusc/nii2mesh) or [`surfice_atlas`](https://github.com/neurolabusc/surfice_atlas) software, both developed by [Chris Rorden's lab](https://github.com/rordenlab); and
|
|
115
130
|
2. Tracing the outline of each region in the rendered mesh in vector graphic editing software (we use Inkscape in the tutorial as a powerful and free option), to yield a two-dimensional image of your atlas in scalable vector graphic (.svg) format.
|
|
116
131
|
|
|
117
132
|
Check out the walkthrough in the [`custom_segmentation_pipeline/`](https://github.com/anniegbryant/subcortex_visualization/tree/main/custom_segmentation_pipeline) folder for more information on how to render your own volumetric segmentation with an interactive mesh and convert to a two-dimensional vector graphic that can be integrated with this package.
|
|
118
133
|
|
|
119
134
|
## 🙏 Acknowledgments
|
|
120
135
|
|
|
121
|
-
Thank you very much to [
|
|
136
|
+
Thank you very much to [Chris Rorden](https://github.com/rordenlab), [Ye Tian](https://github.com/yetianmed), and [Sid Chopra](https://github.com/sidchop) for their suggestions and continued development of open tools for neuroimaging visualization that enabled development of this project!
|
|
137
|
+
|
|
138
|
+
## 🔗 Citing this package
|
|
139
|
+
|
|
140
|
+
If you use this package in a scientific publication, blog post, etc., please cite the corresponding Zenodo release as follows:
|
|
141
|
+
|
|
142
|
+
Annie G. Bryant. (2025). anniegbryant/subcortex_visualization: Initial Zenodo release (initial_release). Zenodo. https://doi.org/10.5281/zenodo.15385316
|
|
122
143
|
|
|
123
144
|
## ❓📧 Questions, comments, or suggestions always welcome!
|
|
124
145
|
|
|
125
146
|
Please feel free to ask questions, report bugs, or share suggestions by creating an issue or by emailing me (Annie) at ([anniegbryant@gmail.com](mailto:anniegbryant@gmail.com)) 😊
|
|
126
147
|
|
|
127
|
-
As an [open-source tool](https://opensource.guide/how-to-contribute/), pull requests are always welcome from the community, too.
|
|
148
|
+
As an [open-source tool](https://opensource.guide/how-to-contribute/), pull requests are always welcome from the community, too.
|
|
149
|
+
If you create your own custom vector graphic for your segmentation atlas of choice, feel free to create a pull request to incorporate and be acknowledged.
|