FZJ-INM1-BDA / siibra-python

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

Valid behaviors for points with None space #558

Open dickscheid opened 5 months ago

dickscheid commented 5 months ago

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).

AhmetNSimsek commented 5 months ago

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

AhmetNSimsek commented 5 months ago

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?