@@ -100,9 +100,9 @@ OpenSlide objects
100
100
If any operation on the object fails, :exc: `OpenSlideError ` is raised.
101
101
OpenSlide has latching error semantics: once :exc: `OpenSlideError ` is
102
102
raised, all future operations on the :class: `OpenSlide `, other than
103
- :meth: `close() `, will also raise :exc: `OpenSlideError `.
103
+ :meth: `close `, will also raise :exc: `OpenSlideError `.
104
104
105
- :meth: `close() ` is called automatically when the object is deleted.
105
+ :meth: `close ` is called automatically when the object is deleted.
106
106
The object may be used as a context manager, in which case it will be
107
107
closed upon exiting the context.
108
108
@@ -161,7 +161,7 @@ OpenSlide objects
161
161
162
162
Images, such as label or macro images, which are associated with this
163
163
slide. This is a :class: `~collections.abc.Mapping ` from image
164
- name to RGBA :class: `Image < PIL.Image.Image> `.
164
+ name to RGBA :class: `~ PIL.Image.Image `.
165
165
166
166
Unlike in the C interface, these images are not premultiplied.
167
167
@@ -176,8 +176,8 @@ OpenSlide objects
176
176
177
177
.. method :: read_region(location: tuple[int, int], level: int, size: tuple[int, int]) -> ~PIL.Image.Image
178
178
179
- Return an RGBA :class: `Image < PIL.Image.Image> ` containing the
180
- contents of the specified region.
179
+ Return an RGBA :class: `~ PIL.Image.Image ` containing the contents of
180
+ the specified region.
181
181
182
182
Unlike in the C interface, the image data is not premultiplied.
183
183
@@ -194,8 +194,8 @@ OpenSlide objects
194
194
195
195
.. method :: get_thumbnail(size: tuple[int, int]) -> ~PIL.Image.Image
196
196
197
- Return an :class: `Image < PIL.Image.Image> ` containing an RGB thumbnail
198
- of the slide.
197
+ Return an :class: `~ PIL.Image.Image ` containing an RGB thumbnail of the
198
+ slide.
199
199
200
200
:param size: the maximum size of the thumbnail as a ``(width, height) ``
201
201
tuple
@@ -347,7 +347,7 @@ Exceptions
347
347
348
348
Once :exc: `OpenSlideError ` has been raised by a particular
349
349
:class: `OpenSlide `, all future operations on that :class: `OpenSlide `
350
- (other than :meth: `close() < OpenSlide.close> `) will also raise
350
+ (other than :meth: `~ OpenSlide.close `) will also raise
351
351
:exc: `OpenSlideError `.
352
352
353
353
.. exception :: OpenSlideUnsupportedFormatError
@@ -372,10 +372,10 @@ Wrapping a Pillow Image
372
372
373
373
.. class :: ImageSlide(file: str | bytes | ~os.PathLike[typing.Any] | ~PIL.Image.Image)
374
374
375
- A wrapper around an :class: `Image < PIL.Image.Image> ` object that
376
- provides an :class: `OpenSlide `-compatible API.
375
+ A wrapper around an :class: `~ PIL.Image.Image ` object that provides an
376
+ :class: `OpenSlide `-compatible API.
377
377
378
- :param file: a filename or :class: `Image < PIL.Image.Image> ` object
378
+ :param file: a filename or :class: `~ PIL.Image.Image ` object
379
379
:raises OSError: if the file cannot be opened
380
380
381
381
.. function :: open_slide(filename: str | bytes | ~os.PathLike[typing.Any]) -> OpenSlide | ImageSlide
@@ -403,17 +403,16 @@ Deep Zoom or a similar format.
403
403
404
404
.. class :: DeepZoomGenerator(osr: AbstractSlide, tile_size: int = 254, overlap: int = 1, limit_bounds: bool = False)
405
405
406
- A Deep Zoom generator that wraps an
407
- :class: `OpenSlide <openslide.OpenSlide> ` object,
408
- :class: `ImageSlide <openslide.ImageSlide> ` object, or user-provided
409
- instance of :class: `~openslide.AbstractSlide `.
406
+ A Deep Zoom generator that wraps an :class: `~openslide.OpenSlide ` object,
407
+ :class: `~openslide.ImageSlide ` object, or user-provided instance of
408
+ :class: `~openslide.AbstractSlide `.
410
409
411
410
:param osr: the slide object
412
411
:param tile_size: the width and height of a single tile. For best viewer
413
412
performance, ``tile_size + 2 * overlap `` should be a power of two.
414
413
:param overlap: the number of extra pixels to add to each interior edge of a
415
414
tile
416
- :param limit_bounds: `` True ` ` to render only the non-empty slide region
415
+ :param limit_bounds: :obj: ` True ` to render only the non-empty slide region
417
416
418
417
.. attribute :: level_count
419
418
@@ -451,7 +450,7 @@ Deep Zoom or a similar format.
451
450
452
451
.. method :: get_tile(level: int, address: tuple[int, int]) -> ~PIL.Image.Image
453
452
454
- Return an RGB :class: `Image < PIL.Image.Image> ` for a tile.
453
+ Return an RGB :class: `~ PIL.Image.Image ` for a tile.
455
454
456
455
:param level: the Deep Zoom level
457
456
:param address: the address of the tile within the level as a
@@ -463,7 +462,7 @@ Deep Zoom or a similar format.
463
462
<openslide.OpenSlide.read_region> ` arguments corresponding to the
464
463
specified tile.
465
464
466
- Most applications should use :meth: `get_tile() ` instead.
465
+ Most applications should use :meth: `get_tile ` instead.
467
466
468
467
:param level: the Deep Zoom level
469
468
:param address: the address of the tile within the level as a
0 commit comments