Skip to content

Commit 3fb5de9

Browse files
committed
Deploying to gh-pages from @ 73e637a 🚀
1 parent f6dc663 commit 3fb5de9

File tree

119 files changed

+2197
-436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+2197
-436
lines changed

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: e9bc9ff6c1eaad865c8b68e5313d0c5d
3+
config: dbd5131509cb776dd31f2553c9b414ea
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_downloads/01eacccaa3110e4f8317ee6d3f576cce/example_kdtree.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"name": "python",
7272
"nbconvert_exporter": "python",
7373
"pygments_lexer": "ipython3",
74-
"version": "3.12.9"
74+
"version": "3.12.10"
7575
}
7676
},
7777
"nbformat": 4,

_downloads/05fae4bb5ea585ab61e284fb627d1f1c/example_hinge_gyri.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"name": "python",
8686
"nbconvert_exporter": "python",
8787
"pygments_lexer": "ipython3",
88-
"version": "3.12.9"
88+
"version": "3.12.10"
8989
}
9090
},
9191
"nbformat": 4,
Binary file not shown.
1 Byte
Binary file not shown.
1 Byte
Binary file not shown.
Binary file not shown.

_downloads/2ae5a38ce465a74ea10a3d6153edfa78/example_dpf_Boucher.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"name": "python",
122122
"nbconvert_exporter": "python",
123123
"pygments_lexer": "ipython3",
124-
"version": "3.12.9"
124+
"version": "3.12.10"
125125
}
126126
},
127127
"nbformat": 4,
Binary file not shown.
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"\n\n# Example of watershed in slam\n"
8+
]
9+
},
10+
{
11+
"cell_type": "code",
12+
"execution_count": null,
13+
"metadata": {
14+
"collapsed": false
15+
},
16+
"outputs": [],
17+
"source": [
18+
"# Authors:\n# Lucile Hashimoto lucile-hashimoto\n# Guillaume Auzias <[email protected]>\n\n# License: MIT\n# sphinx_gallery_thumbnail_number = 2"
19+
]
20+
},
21+
{
22+
"cell_type": "markdown",
23+
"metadata": {},
24+
"source": [
25+
"NOTE: there is no visualization tool in slam, but we provide at the\n end of this script exemplare code to do the visualization with\n an external solution\n##############################################################################\n\n"
26+
]
27+
},
28+
{
29+
"cell_type": "markdown",
30+
"metadata": {},
31+
"source": [
32+
"importation of slam modules\n\n"
33+
]
34+
},
35+
{
36+
"cell_type": "code",
37+
"execution_count": null,
38+
"metadata": {
39+
"collapsed": false
40+
},
41+
"outputs": [],
42+
"source": [
43+
"import slam.io as sio\nimport slam.watershed as swat\nimport slam.sulcal_graph as ssg"
44+
]
45+
},
46+
{
47+
"cell_type": "markdown",
48+
"metadata": {},
49+
"source": [
50+
"loading an examplar mesh and corresponding texture\n\n"
51+
]
52+
},
53+
{
54+
"cell_type": "code",
55+
"execution_count": null,
56+
"metadata": {
57+
"collapsed": false
58+
},
59+
"outputs": [],
60+
"source": [
61+
"path_to_mesh = \"../examples/data/example_mesh.gii\"\npath_to_mask = \"\"\npath_to_output = \"\"\n\nmesh = sio.load_mesh(path_to_mesh)\nside = \"left\""
62+
]
63+
},
64+
{
65+
"cell_type": "markdown",
66+
"metadata": {},
67+
"source": [
68+
"compute curvature, dpf and voronoi\n\n"
69+
]
70+
},
71+
{
72+
"cell_type": "code",
73+
"execution_count": null,
74+
"metadata": {
75+
"collapsed": false
76+
},
77+
"outputs": [],
78+
"source": [
79+
"_, dpf, voronoi = swat.compute_mesh_features(mesh, save=False, outdir=path_to_output, check_if_exist=True)"
80+
]
81+
},
82+
{
83+
"cell_type": "markdown",
84+
"metadata": {},
85+
"source": [
86+
"normalize watershed thresholds\n\n"
87+
]
88+
},
89+
{
90+
"cell_type": "code",
91+
"execution_count": null,
92+
"metadata": {
93+
"collapsed": false
94+
},
95+
"outputs": [],
96+
"source": [
97+
"thresh_dist, thresh_ridge, thresh_area = swat.normalize_thresholds(mesh, voronoi,\n thresh_dist=20.0,\n thresh_ridge=1.5,\n thresh_area=50.0,\n side=side)"
98+
]
99+
},
100+
{
101+
"cell_type": "markdown",
102+
"metadata": {},
103+
"source": [
104+
"define the exclusion mask (cingular pole)\n\n"
105+
]
106+
},
107+
{
108+
"cell_type": "code",
109+
"execution_count": null,
110+
"metadata": {
111+
"collapsed": false
112+
},
113+
"outputs": [],
114+
"source": [
115+
"if path_to_mask:\n mask = sio.load_texture(path_to_mask).darray[0]\nelse:\n mask = None"
116+
]
117+
},
118+
{
119+
"cell_type": "markdown",
120+
"metadata": {},
121+
"source": [
122+
"extract sulcal pits and associated basins\n\n"
123+
]
124+
},
125+
{
126+
"cell_type": "code",
127+
"execution_count": null,
128+
"metadata": {
129+
"collapsed": false
130+
},
131+
"outputs": [],
132+
"source": [
133+
"basins, ridges, adjacency = swat.watershed(mesh, voronoi, dpf, thresh_dist, thresh_ridge, thresh_area, mask)"
134+
]
135+
},
136+
{
137+
"cell_type": "markdown",
138+
"metadata": {},
139+
"source": [
140+
"generate the textures from watershed outputs\n\n"
141+
]
142+
},
143+
{
144+
"cell_type": "code",
145+
"execution_count": null,
146+
"metadata": {
147+
"collapsed": false
148+
},
149+
"outputs": [],
150+
"source": [
151+
"tex_labels, tex_pits, tex_ridges = swat.get_textures_from_dict(mesh, basins, ridges, save=True, outdir=path_to_output)"
152+
]
153+
},
154+
{
155+
"cell_type": "markdown",
156+
"metadata": {},
157+
"source": [
158+
"generate the sulcal graph\n\n"
159+
]
160+
},
161+
{
162+
"cell_type": "code",
163+
"execution_count": null,
164+
"metadata": {
165+
"collapsed": false
166+
},
167+
"outputs": [],
168+
"source": [
169+
"g = ssg.get_sulcal_graph(adjacency, basins, ridges, save=True, outdir=path_to_output)"
170+
]
171+
},
172+
{
173+
"cell_type": "markdown",
174+
"metadata": {},
175+
"source": [
176+
"generate the textures from graph\n\n"
177+
]
178+
},
179+
{
180+
"cell_type": "code",
181+
"execution_count": null,
182+
"metadata": {
183+
"collapsed": false
184+
},
185+
"outputs": [],
186+
"source": [
187+
"tex_labels, tex_pits, tex_ridges = ssg.get_textures_from_graph(g, mesh, save=True, outdir=path_to_output)"
188+
]
189+
}
190+
],
191+
"metadata": {
192+
"kernelspec": {
193+
"display_name": "Python 3",
194+
"language": "python",
195+
"name": "python3"
196+
},
197+
"language_info": {
198+
"codemirror_mode": {
199+
"name": "ipython",
200+
"version": 3
201+
},
202+
"file_extension": ".py",
203+
"mimetype": "text/x-python",
204+
"name": "python",
205+
"nbconvert_exporter": "python",
206+
"pygments_lexer": "ipython3",
207+
"version": "3.12.10"
208+
}
209+
},
210+
"nbformat": 4,
211+
"nbformat_minor": 0
212+
}

0 commit comments

Comments
 (0)