Skip to content

Commit fcc09ad

Browse files
committed
remove boundingbox dependcy from point module
1 parent 35ab2bc commit fcc09ad

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

siibra/locations/point.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
"""Singular coordinate defined on a space, possibly with an uncertainty."""
1616

17-
from . import location, boundingbox, pointcloud
17+
from . import location, pointcloud
1818

1919
from ..commons import logger
2020
from ..retrieval.requests import HttpRequest
@@ -115,8 +115,6 @@ def homogeneous(self):
115115
def intersection(self, other: location.Location) -> "Point":
116116
if isinstance(other, Point):
117117
return self if self == other else None
118-
elif isinstance(other, pointcloud.PointCloud):
119-
return self if self in other else None
120118
else:
121119
return self if other.intersection(self) else None
122120

@@ -305,13 +303,6 @@ def __getitem__(self, index):
305303
assert 0 <= index < 3
306304
return self.coordinate[index]
307305

308-
@property
309-
def boundingbox(self):
310-
w = max(self.sigma or 0, 1e-6) # at least a micrometer
311-
return boundingbox.BoundingBox(
312-
self - w, self + w, self.space, self.sigma
313-
)
314-
315306
def bigbrain_section(self):
316307
"""
317308
Estimate the histological section number of BigBrain

siibra/locations/pointcloud.py

+2
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ def intersection(self, other: location.Location):
122122

123123
if isinstance(other, PointCloud):
124124
intersecting_points = [p for p in self if p.coordinate in other.coordinates]
125+
elif isinstance(other, point.Point):
126+
return other if other in self else None
125127
else:
126128
intersecting_points = [p for p in self if p.intersects(other)]
127129
if len(intersecting_points) == 0:

0 commit comments

Comments
 (0)