FZJ-INM1-BDA / siibra-python

Software interfaces for interacting with brain atlases - Python client
Apache License 2.0
48 stars 10 forks source link

[bug] cannot get boundary_positions for hoc2 right #276

Open xgui3783 opened 1 year ago

xgui3783 commented 1 year ago

hash: b881335f36ed06c302007c5ff7963af7426c4a4a

sample code:

import siibra
region = siibra.get_region("2.9", "hoc2 right")
features = siibra.features.get(region, "CorticalProfile")
print([f.boundary_positions for f in features])

expected output list of boundary positions

actual output

  File "/home/xgui3783/dev/projects/siibra-python/siibra/features/cellular/cell_density_profile.py", line 183, in boundary_positions
    self._boundary_positions[b] = self.depth_image[
  File "/home/xgui3783/dev/projects/siibra-python/siibra/features/cellular/cell_density_profile.py", line 149, in depth_image
    D = np.zeros((np.array(self.density_image.shape) * scale).astype("int") + 1)
  File "/home/xgui3783/dev/projects/siibra-python/siibra/features/cellular/cell_density_profile.py", line 198, in density_image
    bins=(np.array(self.layer_mask.shape) / pixel_size_micron + 0.5).astype(
  File "/home/xgui3783/dev/projects/siibra-python/siibra/features/cellular/cell_density_profile.py", line 138, in layer_mask
    self._layer_mask[Y, X] = layer
IndexError: index 2603 is out of bounds for axis 0 with size 2603
AhmetNSimsek commented 1 year ago

Note:

AhmetNSimsek commented 9 months ago

CellDensityProfile (Segmented cell body density) anchored at Area hOc2 (V2, 18) with Point in BigBrain microscopic template (histology) [20.872669219970703,-58.29999923706055,-6.678797721862793] has the issue. (By the second run the previous boundary positions are cached so it does not fail twice.)