Skip to content

Commit 379bda2

Browse files
committed
maint fig5 notebook
1 parent 003063c commit 379bda2

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

examples/tutorials/2025-paper-fig5.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646
# First we retrieve the probability map of a motor area
4747
# from the Julich-Brain cytoarchitectonic atlas.
4848
region = siibra.get_region("julich 3.0.3", "4p right")
49-
probmaps = region.parcellation.get_map("mni152", "statistical")
50-
region_map = probmaps.get_volume(region)
49+
region_map = region.get_regional_map("mni152", "statistical")
5150

5251
# %%
5352
# We can use the probability map as a query to extract 1 micron resolution
@@ -84,10 +83,7 @@
8483
# Next we plot the section itself and identify the larger region of
8584
# interest around the patch, using the bounding box
8685
# of the centers of most relevant patches with a bit of padding.
87-
patch_locations = siibra.PointCloud(
88-
[tuple(p.get_boundingbox().center) for p in patches],
89-
space='bigbrain'
90-
)
86+
patch_locations = siibra.PointCloud.union(*[p.get_boundingbox().center for p in patches])
9187
roi = patch_locations.boundingbox.zoom(1.5)
9288

9389
# fetch the section at reduced resolution for plotting.
@@ -139,7 +135,7 @@
139135
# %%
140136
# Plot the region of interest again, this time with the cortical profile that
141137
# defined the patch, as well as other candidate patch's locations
142-
# with their relevance scores, ie. probabilities.
138+
# with their relevance scores, ie. probabilities.
143139
display = plotting.plot_img(roi_img, display_mode="y", cmap='gray', annotate=False)
144140
ax = list(display.axes.values())[0].ax
145141

@@ -156,5 +152,3 @@
156152
ax.plot(X, Z, "r-", lw=2)
157153

158154
# sphinx_gallery_thumbnail_number = -2
159-
160-
# %%

siibra/features/image/sections.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def __repr__(self):
8383
def section(self) -> CellbodyStainedSection:
8484
return self._section
8585

86-
def get_boundingbox(self):
87-
""" Enforce that the bounding box spans the full section thickness."""
88-
bbox_section = self._section.get_boundingbox()
86+
def get_boundingbox(self, **fetch_kwargs):
87+
"""Enforce that the bounding box spans the full section thickness."""
88+
bbox_section = self._section.get_boundingbox(**fetch_kwargs)
8989
bbox = self._patch.boundingbox
9090
bbox.minpoint[1] = bbox_section.minpoint[1]
9191
bbox.maxpoint[1] = bbox_section.maxpoint[1]

0 commit comments

Comments
 (0)