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

Valid behaviors for points with None space

Open dickscheid opened this issue 1 year ago • 2 comments

siibra Point objects may - though in rare cases - have been initialized with space=None.

The current siibra implementation of Point will fail at several places, since it often assumes Point.space to be a valid Space object. For example, already __repr__ will fail since it wants to output self.space.id.

The class needs too be reviewed in this respect. Requiring space to be set is not a straightforward solution since the Point class is also used to process voxels (e.g. after .transform with an inverse affine of a NIFti template).

dickscheid avatar Feb 07 '24 20:02 dickscheid

61e0623 addresses the case when a Location has space=None.

AhmetNSimsek avatar Feb 09 '24 09:02 AhmetNSimsek

How about a secondary class called Voxel under point module? We could make it so that some Point operations produce a Voxel and vice versa. We could then also enable BoundingBox or PointSet (VoxelSet?) to be able to be initialized with Voxels to represent them in voxel space. What do you think?

AhmetNSimsek avatar Feb 09 '24 09:02 AhmetNSimsek