subcortex-visualization 0.1.12__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.
Files changed (51) hide show
  1. {subcortex_visualization-0.1.12/subcortex_visualization.egg-info → subcortex_visualization-1.0.0}/PKG-INFO +29 -8
  2. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/README.md +29 -8
  3. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/pyproject.toml +1 -1
  4. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_aseg_R.svg +9 -9
  5. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_aseg_both.svg +11 -11
  6. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0/subcortex_visualization.egg-info}/PKG-INFO +29 -8
  7. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization.egg-info/SOURCES.txt +1 -2
  8. subcortex_visualization-0.1.12/subcortex_visualization/data/subcortical_aseg_paths_lookup.csv +0 -49
  9. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/LICENSE.txt +0 -0
  10. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/MANIFEST.in +0 -0
  11. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/setup.cfg +0 -0
  12. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/setup.py +0 -0
  13. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/__init__.py +0 -0
  14. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/__init__.py +0 -0
  15. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_AICHA_L.svg +0 -0
  16. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_AICHA_L_ordering.csv +0 -0
  17. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_AICHA_R.svg +0 -0
  18. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_AICHA_R_ordering.csv +0 -0
  19. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_AICHA_both.svg +0 -0
  20. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_AICHA_both_ordering.csv +0 -0
  21. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Brainnetome_L.svg +0 -0
  22. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Brainnetome_L_ordering.csv +0 -0
  23. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Brainnetome_R.svg +0 -0
  24. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Brainnetome_R_ordering.csv +0 -0
  25. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Brainnetome_both.svg +0 -0
  26. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Brainnetome_both_ordering.csv +0 -0
  27. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S1_L.svg +0 -0
  28. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S1_L_ordering.csv +0 -0
  29. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S1_R.svg +0 -0
  30. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S1_R_ordering.csv +0 -0
  31. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S1_both.svg +0 -0
  32. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S1_both_ordering.csv +0 -0
  33. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S2_L.svg +0 -0
  34. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S2_L_ordering.csv +0 -0
  35. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S2_R.svg +0 -0
  36. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S2_R_ordering.csv +0 -0
  37. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S2_both.svg +0 -0
  38. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Melbourne_S2_both_ordering.csv +0 -0
  39. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_L.svg +0 -0
  40. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_L_ordering.csv +0 -0
  41. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_R.svg +0 -0
  42. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_R_ordering.csv +0 -0
  43. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_both.svg +0 -0
  44. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_Thalamus_Nuclei_HCP_both_ordering.csv +0 -0
  45. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_aseg_L.svg +0 -0
  46. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_aseg_L_ordering.csv +0 -0
  47. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_aseg_R_ordering.csv +0 -0
  48. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/data/subcortex_aseg_both_ordering.csv +0 -0
  49. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization/plotting.py +0 -0
  50. {subcortex_visualization-0.1.12 → subcortex_visualization-1.0.0}/subcortex_visualization.egg-info/dependency_links.txt +0 -0
  51. {subcortex_visualization-0.1.12 → 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.1.12
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,11 +25,13 @@ Dynamic: license-file
25
25
 
26
26
  # Subcortical data visualization in 2D
27
27
 
28
+ [![DOI](https://zenodo.org/badge/965897997.svg)](https://doi.org/10.5281/zenodo.15385315)
29
+
28
30
  This python package currently includes the following six subcortical atlases for data visualization in two-dimensional vector graphics:
29
31
 
30
- <img src="images/all_atlas_showcase.png" width="100%">
32
+ <img src="docs-site/docs/images/all_atlas_showcase.png" width="100%">
31
33
 
32
- 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.
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/).
33
35
 
34
36
 
35
37
  ## 🙋‍♀️ Motivation
@@ -39,7 +41,7 @@ We based our vector graphic outlines on the three-dimensional subcortical meshes
39
41
 
40
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).
41
43
 
42
- <img src="images/aseg_and_Melbourne_S1_3D_to_2D_schematic.png" width="90%">
44
+ <img src="docs-site/docs/images/aseg_and_Melbourne_S1_3D_to_2D_schematic.png" width="90%">
43
45
 
44
46
 
45
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.
@@ -76,7 +78,7 @@ plot_subcortical_data(hemisphere='L', cmap='plasma',
76
78
  fill_title = "Subcortical region index")
77
79
  ```
78
80
 
79
- <img src="images/example_aseg_subcortex_plot.png" width="80%">
81
+ <img src="docs-site/docs/images/example_aseg_subcortex_plot.png" width="80%">
80
82
 
81
83
 
82
84
  ### 📚 Tutorial
@@ -96,7 +98,7 @@ To plot real data in the subcortex, your `subcortex_data` should be a `pandas.D
96
98
 
97
99
  Briefly, all functionality is contained within the `plot_subcortical_data` function, which takes in the following arguments:
98
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
99
- * `atlas`: The name of the subcortical segmentation atlas (default is 'aseg', which is currently the only supported atlas)
101
+ * `atlas`: The name of the subcortical segmentation atlas (default is 'aseg', all options listed below)
100
102
  * `value_column`: The name of the column in your `subcortex_data` to plot, defaults to 'value'
101
103
  * `line_thickness`: How thick the lines around each subcortical region should be drawn, in mm (default is 1.5)
102
104
  * `line_color`: What color the lines around each subcortical region should be (default is 'black')
@@ -128,15 +130,28 @@ plot_subcortical_data(subcortex_data=example_continuous_data, atlas='aseg',
128
130
  cmap=white_blue_red_cmap, midpoint=0)
129
131
  ```
130
132
 
131
- <img src="images/example_aseg_subcortex_normdist.png" width="80%">
133
+ <img src="docs-site/docs/images/example_aseg_subcortex_normdist.png" width="80%">
134
+
135
+ ### Available atlases
136
+
137
+ The following six subcortical atlases are currently supported with more information at the [project website](https://anniegbryant.github.io/subcortex_visualization/atlas_info/):
138
+
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)
132
145
 
133
146
 
134
147
  ## 💡 Want to generate your own mesh and/or parcellation?
135
148
 
149
+ <img src="docs-site/docs/images/custom_vector_method.png" width="70%">
150
+
136
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 either the [`nii2mesh`](https://github.com/neurolabusc/nii2mesh) or [`surfice_atlas`](https://github.com/neurolabusc/surfice_atlas) software, both 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.
@@ -145,6 +160,12 @@ Check out the walkthrough in the [`custom_segmentation_pipeline/`](https://githu
145
160
 
146
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!
147
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
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)) 😊
@@ -1,10 +1,12 @@
1
1
  # Subcortical data visualization in 2D
2
2
 
3
+ [![DOI](https://zenodo.org/badge/965897997.svg)](https://doi.org/10.5281/zenodo.15385315)
4
+
3
5
  This python package currently includes the following six subcortical atlases for data visualization in two-dimensional vector graphics:
4
6
 
5
- <img src="images/all_atlas_showcase.png" width="100%">
7
+ <img src="docs-site/docs/images/all_atlas_showcase.png" width="100%">
6
8
 
7
- 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.
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/).
8
10
 
9
11
 
10
12
  ## 🙋‍♀️ Motivation
@@ -14,7 +16,7 @@ We based our vector graphic outlines on the three-dimensional subcortical meshes
14
16
 
15
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).
16
18
 
17
- <img src="images/aseg_and_Melbourne_S1_3D_to_2D_schematic.png" width="90%">
19
+ <img src="docs-site/docs/images/aseg_and_Melbourne_S1_3D_to_2D_schematic.png" width="90%">
18
20
 
19
21
 
20
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.
@@ -51,7 +53,7 @@ plot_subcortical_data(hemisphere='L', cmap='plasma',
51
53
  fill_title = "Subcortical region index")
52
54
  ```
53
55
 
54
- <img src="images/example_aseg_subcortex_plot.png" width="80%">
56
+ <img src="docs-site/docs/images/example_aseg_subcortex_plot.png" width="80%">
55
57
 
56
58
 
57
59
  ### 📚 Tutorial
@@ -71,7 +73,7 @@ To plot real data in the subcortex, your `subcortex_data` should be a `pandas.D
71
73
 
72
74
  Briefly, all functionality is contained within the `plot_subcortical_data` function, which takes in the following arguments:
73
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
74
- * `atlas`: The name of the subcortical segmentation atlas (default is 'aseg', which is currently the only supported atlas)
76
+ * `atlas`: The name of the subcortical segmentation atlas (default is 'aseg', all options listed below)
75
77
  * `value_column`: The name of the column in your `subcortex_data` to plot, defaults to 'value'
76
78
  * `line_thickness`: How thick the lines around each subcortical region should be drawn, in mm (default is 1.5)
77
79
  * `line_color`: What color the lines around each subcortical region should be (default is 'black')
@@ -103,15 +105,28 @@ plot_subcortical_data(subcortex_data=example_continuous_data, atlas='aseg',
103
105
  cmap=white_blue_red_cmap, midpoint=0)
104
106
  ```
105
107
 
106
- <img src="images/example_aseg_subcortex_normdist.png" width="80%">
108
+ <img src="docs-site/docs/images/example_aseg_subcortex_normdist.png" width="80%">
109
+
110
+ ### Available atlases
111
+
112
+ The following six subcortical atlases are currently supported with more information at the [project website](https://anniegbryant.github.io/subcortex_visualization/atlas_info/):
113
+
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)
107
120
 
108
121
 
109
122
  ## 💡 Want to generate your own mesh and/or parcellation?
110
123
 
124
+ <img src="docs-site/docs/images/custom_vector_method.png" width="70%">
125
+
111
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 either the [`nii2mesh`](https://github.com/neurolabusc/nii2mesh) or [`surfice_atlas`](https://github.com/neurolabusc/surfice_atlas) software, both 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.
@@ -120,9 +135,15 @@ Check out the walkthrough in the [`custom_segmentation_pipeline/`](https://githu
120
135
 
121
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!
122
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
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
148
  As an [open-source tool](https://opensource.guide/how-to-contribute/), pull requests are always welcome from the community, too.
128
- 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.
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.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "subcortex_visualization"
7
- version = "0.1.12"
7
+ version = "1.0.0"
8
8
  authors = [
9
9
  { name="Annie G. Bryant", email="anniegbryant@gmail.com" },
10
10
  ]
@@ -8,7 +8,7 @@
8
8
  version="1.1"
9
9
  id="svg63908"
10
10
  inkscape:version="1.2 (dc2aeda, 2022-05-15)"
11
- sodipodi:docname="subcortex_aseg_base_R.svg"
11
+ sodipodi:docname="subcortex_aseg_R.svg"
12
12
  xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
13
  xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14
14
  xmlns="http://www.w3.org/2000/svg"
@@ -25,13 +25,13 @@
25
25
  inkscape:document-units="mm"
26
26
  showgrid="false"
27
27
  inkscape:zoom="0.64521853"
28
- inkscape:cx="357.2433"
29
- inkscape:cy="131.73831"
30
- inkscape:window-width="1309"
31
- inkscape:window-height="456"
32
- inkscape:window-x="161"
33
- inkscape:window-y="54"
34
- inkscape:window-maximized="0"
28
+ inkscape:cx="-14.723694"
29
+ inkscape:cy="132.51324"
30
+ inkscape:window-width="1920"
31
+ inkscape:window-height="1027"
32
+ inkscape:window-x="1470"
33
+ inkscape:window-y="25"
34
+ inkscape:window-maximized="1"
35
35
  inkscape:current-layer="layer1" />
36
36
  <defs
37
37
  id="defs63905">
@@ -393,7 +393,7 @@
393
393
  inkscape:original-d="m 100.12975,25.552166 c 0.0313,-0.27876 0.0631,-0.559926 0.0954,-0.843495 -0.505322,0.125897 -1.005812,0.25039 -1.503742,0.37405 -0.33589,0.03185 -0.66428,0.06276 -0.99764,0.09389 -0.80971,0.182773 -1.61251,0.363782 -2.42053,0.545763 -1.42973,0.100189 -2.85665,0.199935 -4.28075,0.299239 -0.43764,-0.24966 -0.877,-0.500725 -1.31445,-0.751115 -0.4408,-0.748469 -0.87895,-1.499581 -1.31445,-2.253342 -0.0965,-0.779767 -0.19043,-1.562177 -0.28167,-2.347235 -0.003,-0.654579 -0.003,-1.311804 0,-1.971675 -0.4095,0.0026 -0.81636,0.0026 -1.22056,0 -0.34691,0.09654 -0.69117,0.190426 -1.03279,0.281667 -0.87895,0.816354 -1.75525,1.630061 -2.6289,2.441123 -0.4408,0.346908 -0.87895,0.691168 -1.31445,1.032782 -0.15913,0.253019 -0.31561,0.503391 -0.46945,0.751115 -0.12736,0.538667 -0.25355,1.073219 -0.37857,1.603661 0.2797,0.60307 0.5638,1.214775 0.84598,1.821527 0.8452,0.454535 1.68933,0.908091 2.53705,1.36317 0.95972,0.24378 1.91824,0.486924 2.87392,0.729017 1.10438,-0.05481 2.21936,-0.110411 3.32278,-0.165682 0.93487,-0.12442 1.88077,-0.250541 2.81668,-0.375558 0.58447,-0.06311 1.17123,-0.126712 1.76029,-0.190795 0.60685,-0.100835 1.20498,-0.200442 1.81505,-0.302254 0.47036,-0.181069 0.93146,-0.358732 1.4008,-0.539733 0.53421,-0.345576 1.07147,-0.693212 1.596112,-1.032783 0.0286,-0.185134 0.0599,-0.372911 0.0939,-0.563337 z"
394
394
  sodipodi:nodetypes="cccccccccccccccccccccccccc">
395
395
  <title
396
- id="title4486">palldium_medial_R</title>
396
+ id="title4486">pallidum_medial_R</title>
397
397
  </path>
398
398
  <path
399
399
  style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
@@ -8,7 +8,7 @@
8
8
  version="1.1"
9
9
  id="svg63908"
10
10
  inkscape:version="1.2 (dc2aeda, 2022-05-15)"
11
- sodipodi:docname="subcortex_aseg_base_both.svg"
11
+ sodipodi:docname="subcortex_aseg_both.svg"
12
12
  xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
13
  xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14
14
  xmlns="http://www.w3.org/2000/svg"
@@ -24,13 +24,13 @@
24
24
  inkscape:deskcolor="#d1d1d1"
25
25
  inkscape:document-units="mm"
26
26
  showgrid="false"
27
- inkscape:zoom="0.56135305"
28
- inkscape:cx="437.33618"
29
- inkscape:cy="228.9112"
30
- inkscape:window-width="1470"
31
- inkscape:window-height="803"
32
- inkscape:window-x="0"
33
- inkscape:window-y="37"
27
+ inkscape:zoom="1.1227061"
28
+ inkscape:cx="476.08185"
29
+ inkscape:cy="163.44438"
30
+ inkscape:window-width="1920"
31
+ inkscape:window-height="1027"
32
+ inkscape:window-x="1470"
33
+ inkscape:window-y="25"
34
34
  inkscape:window-maximized="1"
35
35
  inkscape:current-layer="layer1" />
36
36
  <defs
@@ -641,11 +641,11 @@
641
641
  style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
642
642
  d="m 225.34299,25.818019 c 0.0158,-0.139368 0.0476,-0.420534 -0.18908,-0.499477 -0.23665,-0.07894 -0.73714,0.04555 -1.15403,0.123282 -0.4169,0.07773 -0.74529,0.108636 -1.31684,0.21561 -0.57154,0.106974 -1.37434,0.287984 -2.49321,0.429044 -1.11886,0.14106 -2.54578,0.240807 -3.47655,0.165592 -0.93077,-0.07521 -1.37013,-0.326277 -1.80778,-0.826462 -0.43765,-0.500184 -0.8758,-1.251296 -1.14192,-2.017321 -0.26612,-0.766024 -0.36001,-1.548439 -0.4071,-2.268082 -0.0471,-0.719643 -0.0471,-1.376868 -0.25183,-1.706804 -0.20475,-0.329935 -0.61161,-0.329935 -0.98741,-0.282563 -0.3758,0.04737 -0.72006,0.14126 -1.33015,0.595905 -0.61008,0.454644 -1.48638,1.268352 -2.1437,1.847212 -0.65731,0.57886 -1.09546,0.92312 -1.39229,1.220834 -0.29682,0.297714 -0.4533,0.548084 -0.59416,0.94108 -0.14086,0.392995 -0.26705,0.927548 -0.18965,1.494207 0.0774,0.56666 0.36151,1.178367 0.92512,1.708926 0.56362,0.53056 1.40775,0.984115 2.31142,1.333547 0.90368,0.349431 1.8622,0.592575 2.89218,0.686244 1.02999,0.09367 2.14497,0.03807 3.1641,-0.05176 1.01914,-0.08983 1.96504,-0.215953 2.72523,-0.310022 0.76019,-0.09407 1.34695,-0.157668 1.9449,-0.240118 0.59795,-0.08245 1.19608,-0.182055 1.73629,-0.32346 0.54021,-0.141404 1.00131,-0.319068 1.50309,-0.582318 0.50178,-0.263249 1.03904,-0.610889 1.31678,-0.873024 0.27774,-0.262136 0.30904,-0.449913 0.32494,-0.545309 0.0159,-0.0954 0.0159,-0.0954 0.0316,-0.234763 z"
643
643
  id="path22609-6"
644
- inkscape:path-effect="#path-effect22611-3"
644
+ sodipodi:nodetypes="cccccccccccccccccccccccccc"
645
645
  inkscape:original-d="m 225.32723,25.957386 c 0.0313,-0.27876 0.0631,-0.559926 0.0954,-0.843495 -0.50532,0.125897 -1.00581,0.25039 -1.50374,0.37405 -0.33589,0.03185 -0.66428,0.06276 -0.99764,0.09389 -0.80971,0.182773 -1.61251,0.363782 -2.42053,0.545763 -1.42973,0.100189 -2.85665,0.199935 -4.28075,0.299239 -0.43764,-0.24966 -0.877,-0.500725 -1.31445,-0.751115 -0.4408,-0.748469 -0.87895,-1.499581 -1.31445,-2.253342 -0.0965,-0.779767 -0.19043,-1.562177 -0.28167,-2.347235 -0.003,-0.654579 -0.003,-1.311804 0,-1.971675 -0.4095,0.0026 -0.81636,0.0026 -1.22056,0 -0.34691,0.09654 -0.69117,0.190426 -1.03279,0.281667 -0.87895,0.816354 -1.75525,1.630061 -2.6289,2.441123 -0.4408,0.346908 -0.87895,0.691168 -1.31445,1.032782 -0.15913,0.253019 -0.31561,0.503391 -0.46945,0.751115 -0.12736,0.538667 -0.25355,1.073219 -0.37857,1.603661 0.2797,0.60307 0.5638,1.214775 0.84598,1.821527 0.8452,0.454535 1.68933,0.908091 2.53705,1.36317 0.95972,0.24378 1.91824,0.486924 2.87392,0.729017 1.10438,-0.05481 2.21936,-0.110411 3.32278,-0.165682 0.93487,-0.12442 1.88077,-0.250541 2.81668,-0.375558 0.58447,-0.06311 1.17123,-0.126712 1.76029,-0.190795 0.60685,-0.100835 1.20498,-0.200442 1.81505,-0.302254 0.47036,-0.181069 0.93146,-0.358732 1.4008,-0.539733 0.53421,-0.345576 1.07147,-0.693212 1.59611,-1.032783 0.0286,-0.185134 0.0599,-0.372911 0.0939,-0.563337 z"
646
- sodipodi:nodetypes="cccccccccccccccccccccccccc">
646
+ inkscape:path-effect="#path-effect22611-3">
647
647
  <title
648
- id="title4486">palldium_medial_R</title>
648
+ id="title4486">pallidum_medial_R</title>
649
649
  </path>
650
650
  <path
651
651
  style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;stop-color:#000000"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: subcortex_visualization
3
- Version: 0.1.12
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,11 +25,13 @@ Dynamic: license-file
25
25
 
26
26
  # Subcortical data visualization in 2D
27
27
 
28
+ [![DOI](https://zenodo.org/badge/965897997.svg)](https://doi.org/10.5281/zenodo.15385315)
29
+
28
30
  This python package currently includes the following six subcortical atlases for data visualization in two-dimensional vector graphics:
29
31
 
30
- <img src="images/all_atlas_showcase.png" width="100%">
32
+ <img src="docs-site/docs/images/all_atlas_showcase.png" width="100%">
31
33
 
32
- 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.
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/).
33
35
 
34
36
 
35
37
  ## 🙋‍♀️ Motivation
@@ -39,7 +41,7 @@ We based our vector graphic outlines on the three-dimensional subcortical meshes
39
41
 
40
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).
41
43
 
42
- <img src="images/aseg_and_Melbourne_S1_3D_to_2D_schematic.png" width="90%">
44
+ <img src="docs-site/docs/images/aseg_and_Melbourne_S1_3D_to_2D_schematic.png" width="90%">
43
45
 
44
46
 
45
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.
@@ -76,7 +78,7 @@ plot_subcortical_data(hemisphere='L', cmap='plasma',
76
78
  fill_title = "Subcortical region index")
77
79
  ```
78
80
 
79
- <img src="images/example_aseg_subcortex_plot.png" width="80%">
81
+ <img src="docs-site/docs/images/example_aseg_subcortex_plot.png" width="80%">
80
82
 
81
83
 
82
84
  ### 📚 Tutorial
@@ -96,7 +98,7 @@ To plot real data in the subcortex, your `subcortex_data` should be a `pandas.D
96
98
 
97
99
  Briefly, all functionality is contained within the `plot_subcortical_data` function, which takes in the following arguments:
98
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
99
- * `atlas`: The name of the subcortical segmentation atlas (default is 'aseg', which is currently the only supported atlas)
101
+ * `atlas`: The name of the subcortical segmentation atlas (default is 'aseg', all options listed below)
100
102
  * `value_column`: The name of the column in your `subcortex_data` to plot, defaults to 'value'
101
103
  * `line_thickness`: How thick the lines around each subcortical region should be drawn, in mm (default is 1.5)
102
104
  * `line_color`: What color the lines around each subcortical region should be (default is 'black')
@@ -128,15 +130,28 @@ plot_subcortical_data(subcortex_data=example_continuous_data, atlas='aseg',
128
130
  cmap=white_blue_red_cmap, midpoint=0)
129
131
  ```
130
132
 
131
- <img src="images/example_aseg_subcortex_normdist.png" width="80%">
133
+ <img src="docs-site/docs/images/example_aseg_subcortex_normdist.png" width="80%">
134
+
135
+ ### Available atlases
136
+
137
+ The following six subcortical atlases are currently supported with more information at the [project website](https://anniegbryant.github.io/subcortex_visualization/atlas_info/):
138
+
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)
132
145
 
133
146
 
134
147
  ## 💡 Want to generate your own mesh and/or parcellation?
135
148
 
149
+ <img src="docs-site/docs/images/custom_vector_method.png" width="70%">
150
+
136
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 either the [`nii2mesh`](https://github.com/neurolabusc/nii2mesh) or [`surfice_atlas`](https://github.com/neurolabusc/surfice_atlas) software, both 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.
@@ -145,6 +160,12 @@ Check out the walkthrough in the [`custom_segmentation_pipeline/`](https://githu
145
160
 
146
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!
147
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
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)) 😊
@@ -45,5 +45,4 @@ subcortex_visualization/data/subcortex_aseg_L_ordering.csv
45
45
  subcortex_visualization/data/subcortex_aseg_R.svg
46
46
  subcortex_visualization/data/subcortex_aseg_R_ordering.csv
47
47
  subcortex_visualization/data/subcortex_aseg_both.svg
48
- subcortex_visualization/data/subcortex_aseg_both_ordering.csv
49
- subcortex_visualization/data/subcortical_aseg_paths_lookup.csv
48
+ subcortex_visualization/data/subcortex_aseg_both_ordering.csv
@@ -1,49 +0,0 @@
1
- region,view,path_number,Hemisphere,Num_Hemi
2
- caudate,lateral,0,L,1
3
- putamen,lateral,1,L,1
4
- thalamus,lateral,2,L,1
5
- hippocampus,lateral,3,L,1
6
- amygdala,lateral,4,L,1
7
- putamen,medial,5,L,1
8
- caudate,medial,6,L,1
9
- accumbens,medial,7,L,1
10
- pallidum,medial,8,L,1
11
- thalamus,medial,9,L,1
12
- amygdala,medial,10,L,1
13
- hippocampus,medial,11,L,1
14
- caudate,lateral,0,R,1
15
- putamen,lateral,1,R,1
16
- thalamus,lateral,2,R,1
17
- hippocampus,lateral,3,R,1
18
- amygdala,lateral,4,R,1
19
- putamen,medial,5,R,1
20
- caudate,medial,6,R,1
21
- accumbens,medial,7,R,1
22
- pallidum,medial,8,R,1
23
- thalamus,medial,9,R,1
24
- amygdala,medial,10,R,1
25
- hippocampus,medial,11,R,1
26
- caudate,lateral,0,L,2
27
- putamen,lateral,1,L,2
28
- thalamus,lateral,2,L,2
29
- hippocampus,lateral,3,L,2
30
- amygdala,lateral,4,L,2
31
- putamen,medial,5,L,2
32
- caudate,medial,6,L,2
33
- accumbens,medial,7,L,2
34
- pallidum,medial,8,L,2
35
- thalamus,medial,9,L,2
36
- amygdala,medial,10,L,2
37
- hippocampus,medial,11,L,2
38
- caudate,lateral,12,R,2
39
- putamen,lateral,13,R,2
40
- thalamus,lateral,14,R,2
41
- hippocampus,lateral,15,R,2
42
- amygdala,lateral,16,R,2
43
- putamen,medial,17,R,2
44
- caudate,medial,18,R,2
45
- accumbens,medial,19,R,2
46
- pallidum,medial,20,R,2
47
- thalamus,medial,21,R,2
48
- amygdala,medial,22,R,2
49
- hippocampus,medial,23,R,2