Slide
rationai.resources.slide.Slide
Bases: APIResource
Source code in rationai/resources/slide.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
heatmap(model, slide_path, tissue_mask_path, output_path, stride_fraction=0.5, output_bigtiff_tile_height=512, output_bigtiff_tile_width=512, timeout=1000)
Creates a heatmap for a given slide using the specified model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
The model identifier to use for heatmap generation. |
required |
slide_path
|
str
|
The path to the slide image. |
required |
tissue_mask_path
|
str
|
The path to the tissue mask image. |
required |
output_path
|
str
|
The path where the output heatmap will be saved. This includes the filename. |
required |
stride_fraction
|
float
|
The fraction of the tile size to use as stride. |
0.5
|
output_bigtiff_tile_height
|
int
|
The tile height of the generated big-tiff heatmap. |
512
|
output_bigtiff_tile_width
|
int
|
The tile width of the generated big-tiff heatmap. |
512
|
timeout
|
TimeoutTypes | UseClientDefault
|
Optional timeout for the request. |
1000
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the generated heatmap. Should match the output_path provided. |
Source code in rationai/resources/slide.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
rationai.resources.slide.AsyncSlide
Bases: AsyncAPIResource
Source code in rationai/resources/slide.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
heatmap(model, slide_path, tissue_mask_path, output_path, stride_fraction=0.5, output_bigtiff_tile_height=512, output_bigtiff_tile_width=512, timeout=1000)
async
Creates a heatmap for a given slide using the specified model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
The model identifier to use for heatmap generation. |
required |
slide_path
|
str
|
The path to the slide image. |
required |
tissue_mask_path
|
str
|
The path to the tissue mask image. |
required |
output_path
|
str
|
The path where the output heatmap will be saved. This includes the filename. |
required |
stride_fraction
|
float
|
The fraction of the tile size to use as stride. |
0.5
|
output_bigtiff_tile_height
|
int
|
The tile height of the generated big-tiff heatmap. |
512
|
output_bigtiff_tile_width
|
int
|
The tile width of the generated big-tiff heatmap. |
512
|
timeout
|
TimeoutTypes | UseClientDefault
|
Optional timeout for the request. |
1000
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The path to the generated heatmap. Should match the output_path provided. |
Source code in rationai/resources/slide.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |