siibra-python icon indicating copy to clipboard operation
siibra-python copied to clipboard

Fix boundingbox transformation

Open dickscheid opened this issue 1 year ago • 1 comments

siibra had a serious bug when transforming bounding boxes: Both .warp and .transform would create the new bounding box by just transforming the min- and max point. But since the bounding box is axis aligned, this is not correct - other corner points could form the new min- or maxpoint in the new coordinate system after warping. Therefore, all corner points (8 in general) need to be transformed, and a new min- and maxpoint have to be determined in the target space to create the transformed bounding box.

dickscheid avatar Apr 20 '24 08:04 dickscheid

The image feature e2e tests are failing because some warped corners of a bounding box can return None which causes the warping to create a bbox with (nan, nan, nan) points and such a bbox has no intersection with any well-defined bbox. I'll see how I can circumvent the issue.

AhmetNSimsek avatar May 14 '24 15:05 AhmetNSimsek