Skip to content

Commit

Permalink
Docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
AjeyPaiK committed Nov 15, 2023
1 parent bfcf08f commit 49cf2f5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion dlup/_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,17 @@ def read_region(
return region

def get_scaled_size(self, scaling: GenericNumber, use_limit_bounds: Optional[bool] = False) -> tuple[int, int]:
"""Compute slide image size at specific scaling."""
"""Compute slide image size at specific scaling.
Parameters
-----------
scaling: GenericNumber
The factor by which the image needs to be scaled.
use_limit_bounds: Optional[bool]
If True, the scaled size will be calculated using the slide bounds of the whole slide image.
This is generally the specific area within a whole slide image where we can find the tissue specimen.
"""
if use_limit_bounds:
_, bounded_size = self.slide_bounds
size = int(bounded_size[0] * scaling), int(bounded_size[1] * scaling)
Expand Down

0 comments on commit 49cf2f5

Please sign in to comment.