Closed vigji closed 2 years ago
Done, have a look!
You can now use this code just to get the coordinates in the 2D plane:
regions = ['TH', 'RSP', 'AI', 'SS', 'MO', 'PVZ', 'LZ', 'VIS', 'AUD', 'RHP', 'STR', 'CB', 'FRP', 'HIP', 'PA']
coordinates = bgh.get_plane_coordinates(
regions,
position=(
8000,
5000,
5000,
), # displacement along the AP axis relative to midpoint
orientation="frontal", # 'frontal' or 'sagittal', or 'top' or a tuple (x,y,z)
)
Should it return the coordinates in 3D space as well?
awesome! No, would no really see now an application for that.
If I can just suggest a naming change, bgh.get_plane_coordinates
feels like you're getting the coordinates that define the plane. Maybe Something along the lines of get_slice_coordinates
or slice_structures
or get_structures_slice_coords
?
Fair, done
I'm checking out the API of the package, and I see that at the moment a single class
heatmap
(I'd suggest renaming toHeatmap
) is taking care of both the slicing and the plotting. In this way there's no easy way for the user to just use the package to get a plottable slice, and not use the default matplotlib visualisation.I would suggest conceptually splitting the slicing from the plotting. Maybe there could be a
Slicer
class, that performs what now is inself.slice()
and can be used to just return the coordinates to be plot, and aHeatmap
class with the features of the current one?