anndict.utils.get_steps_and_coords#
- anndict.utils.get_steps_and_coords(df, box_size, step_size)[source]#
Computes the number of steps and the top-left coordinates of each box.
- Parameters:
- df
DataFrame The data containing ‘global_x’ and ‘global_y’ columns.
- box_size
int The size of the box.
- step_size
int The step size.
- df
- Return type:
tuple[int,int,list[list[int]]]- Returns:
A tuple containing the number of steps in x and y directions, and the list of top-left coordinates of each box.
- Raises:
ValueError – If the box size is larger than the image dimensions.