File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ The basic API is as follows:
155
155
""" Return a SurfaceImage with data corresponding to each face """
156
156
157
157
158
- class SurfaceHeader (FileBaseeHeader ):
158
+ class SurfaceHeader (FileBasedHeader ):
159
159
...
160
160
161
161
@@ -202,6 +202,21 @@ Data images have their own metadata apart from geometry that needs handling in a
202
202
* Data dtype
203
203
204
204
205
+ Smoothing
206
+ ---------
207
+
208
+ .. code-block :: python
209
+
210
+ bold = SurfaceImage.from_filename(" /data/func/hemi-L_bold.func.gii" )
211
+ bold.load_geometry(" /data/anat/hemi-L_midthickness.surf.gii" )
212
+ # Not implementing networkx weighted graph here, so assume we have a method
213
+ graph = bold.geometry.get_graph()
214
+ distances = distance_matrix(graph) # n_coords x n_coords matrix
215
+ weights = normalize(gaussian(distances, sigma))
216
+ smoothed = bold.__class__ (bold.get_fdata() @ weights, bold.header)
217
+ smoothed.to_filename(f " /data/func/hemi-L_smooth- { sigma} _bold.func.gii " )
218
+
219
+
205
220
Plotting
206
221
--------
207
222
You can’t perform that action at this time.
0 commit comments