@@ -126,27 +126,36 @@ OpenSlide objects
126
126
The number of levels in the slide. Levels are numbered from ``0 ``
127
127
(highest resolution) to ``level_count - 1 `` (lowest resolution).
128
128
129
+ :type: int
130
+
129
131
.. attribute :: dimensions
130
132
131
133
A ``(width, height) `` tuple for level 0 of the slide.
132
134
135
+ :type: tuple[int, int]
136
+
133
137
.. attribute :: level_dimensions
134
138
135
139
A tuple of ``(width, height) `` tuples, one for each level of the slide.
136
140
``level_dimensions[k] `` are the dimensions of level ``k ``.
137
141
142
+ :type: tuple[tuple[int, int], ...]
143
+
138
144
.. attribute :: level_downsamples
139
145
140
146
A tuple of downsample factors for each level of the slide.
141
147
``level_downsamples[k] `` is the downsample factor of level ``k ``.
142
148
149
+ :type: tuple[float, ...]
150
+
143
151
.. attribute :: properties
144
152
145
153
Metadata about the slide, in the form of a
146
154
:class: `~collections.abc.Mapping ` from OpenSlide property name to
147
- property value. Property values are always strings. OpenSlide
148
- provides some :ref: `standard-properties `, plus
149
- additional properties that vary by slide format.
155
+ property value. OpenSlide provides some :ref: `standard-properties `,
156
+ plus additional properties that vary by slide format.
157
+
158
+ :type: ~collections.abc.Mapping[str, str]
150
159
151
160
.. attribute :: associated_images
152
161
@@ -156,11 +165,14 @@ OpenSlide objects
156
165
157
166
Unlike in the C interface, these images are not premultiplied.
158
167
168
+ :type: ~collections.abc.Mapping[str, ~PIL.Image.Image]
169
+
159
170
.. attribute :: color_profile
160
171
161
172
The embedded :ref: `color profile <color-management >` for this slide,
162
- as a Pillow :class: `~PIL.ImageCms.ImageCmsProfile `, or :obj: `None ` if
163
- not available.
173
+ or :obj: `None ` if not available.
174
+
175
+ :type: ~PIL.ImageCms.ImageCmsProfile | None
164
176
165
177
.. method :: read_region(location, level, size)
166
178
@@ -403,20 +415,28 @@ Deep Zoom or a similar format.
403
415
404
416
The number of Deep Zoom levels in the image.
405
417
418
+ :type: int
419
+
406
420
.. attribute :: tile_count
407
421
408
422
The total number of Deep Zoom tiles in the image.
409
423
424
+ :type: int
425
+
410
426
.. attribute :: level_tiles
411
427
412
428
A tuple of ``(tiles_x, tiles_y) `` tuples for each Deep Zoom level.
413
429
``level_tiles[k] `` are the tile counts of level ``k ``.
414
430
431
+ :type: tuple[tuple[int, int], ...]
432
+
415
433
.. attribute :: level_dimensions
416
434
417
435
A tuple of ``(pixels_x, pixels_y) `` tuples for each Deep Zoom level.
418
436
``level_dimensions[k] `` are the dimensions of level ``k ``.
419
437
438
+ :type: tuple[tuple[int, int], ...]
439
+
420
440
.. method :: get_dzi(format)
421
441
422
442
Return a string containing the XML metadata for the Deep Zoom ``.dzi ``
0 commit comments