Orientations.get_extraction_slices#
- Orientations.get_extraction_slices(target_shape, extraction_shape, drop_out_of_box=False, return_orientations=False)[source]#
Calculate slices for extracting regions of interest within a larger array.
- Parameters:
- target_shapeTuple[int]
The shape of the target array within which regions are to be extracted.
- extraction_shapeTuple[int]
The shape of the regions to be extracted.
- drop_out_of_boxbool, optional
If True, drop regions that extend beyond the target array boundary, by default False.
- return_orientationsbool, optional
If True, return orientations along with slices, by default False.
- Returns:
- Union[Tuple[List[slice]], Tuple[“Orientations”, List[slice], List[slice]]]
If return_orientations is False, returns a tuple containing slices for candidate regions and observation regions. If return_orientations is True, returns a tuple containing orientations along with slices for candidate regions and observation regions.
- Raises:
- SystemExit
If no peak remains after filtering, indicating an error.