Skip to content

Commit 151ff4d

Browse files
authored
Merge pull request #360 from bgilbert/props
Add `openslide.barcode` property
2 parents 46d3b51 + 336a200 commit 151ff4d

2 files changed

Lines changed: 38 additions & 33 deletions

File tree

‎doc/index.rst‎

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -288,26 +288,38 @@ Standard properties
288288
The :mod:`openslide` module provides attributes containing the names of
289289
some commonly-used OpenSlide properties.
290290

291-
.. data:: PROPERTY_NAME_COMMENT
291+
.. data:: PROPERTY_NAME_BACKGROUND_COLOR
292292

293-
The name of the property containing a slide's comment, if any.
293+
The name of the property containing a slide's background color, if any.
294+
It is represented as an RGB hex triplet.
294295

295-
.. data:: PROPERTY_NAME_VENDOR
296+
.. data:: PROPERTY_NAME_BARCODE
296297

297-
The name of the property containing an identification of the vendor.
298+
The name of the property containing a slide's barcode, if any.
298299

299-
.. data:: PROPERTY_NAME_QUICKHASH1
300+
.. data:: PROPERTY_NAME_BOUNDS_HEIGHT
300301

301-
The name of the property containing the "quickhash-1" sum.
302+
The name of the property containing the height of the rectangle bounding
303+
the non-empty region of the slide, if available.
302304

303-
.. data:: PROPERTY_NAME_BACKGROUND_COLOR
305+
.. data:: PROPERTY_NAME_BOUNDS_WIDTH
304306

305-
The name of the property containing a slide's background color, if any.
306-
It is represented as an RGB hex triplet.
307+
The name of the property containing the width of the rectangle bounding
308+
the non-empty region of the slide, if available.
307309

308-
.. data:: PROPERTY_NAME_OBJECTIVE_POWER
310+
.. data:: PROPERTY_NAME_BOUNDS_X
309311

310-
The name of the property containing a slide's objective power, if known.
312+
The name of the property containing the X coordinate of the rectangle
313+
bounding the non-empty region of the slide, if available.
314+
315+
.. data:: PROPERTY_NAME_BOUNDS_Y
316+
317+
The name of the property containing the Y coordinate of the rectangle
318+
bounding the non-empty region of the slide, if available.
319+
320+
.. data:: PROPERTY_NAME_COMMENT
321+
322+
The name of the property containing a slide's comment, if any.
311323

312324
.. data:: PROPERTY_NAME_MPP_X
313325

@@ -319,25 +331,17 @@ some commonly-used OpenSlide properties.
319331
The name of the property containing the number of microns per pixel in
320332
the Y dimension of level 0, if known.
321333

322-
.. data:: PROPERTY_NAME_BOUNDS_X
323-
324-
The name of the property containing the X coordinate of the rectangle
325-
bounding the non-empty region of the slide, if available.
326-
327-
.. data:: PROPERTY_NAME_BOUNDS_Y
334+
.. data:: PROPERTY_NAME_OBJECTIVE_POWER
328335

329-
The name of the property containing the Y coordinate of the rectangle
330-
bounding the non-empty region of the slide, if available.
336+
The name of the property containing a slide's objective power, if known.
331337

332-
.. data:: PROPERTY_NAME_BOUNDS_WIDTH
338+
.. data:: PROPERTY_NAME_QUICKHASH1
333339

334-
The name of the property containing the width of the rectangle bounding
335-
the non-empty region of the slide, if available.
340+
The name of the property containing the "quickhash-1" sum.
336341

337-
.. data:: PROPERTY_NAME_BOUNDS_HEIGHT
342+
.. data:: PROPERTY_NAME_VENDOR
338343

339-
The name of the property containing the height of the rectangle bounding
340-
the non-empty region of the slide, if available.
344+
The name of the property containing an identification of the vendor.
341345

342346

343347
Exceptions

‎openslide/__init__.py‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,18 @@
4444

4545
__library_version__ = lowlevel.get_version()
4646

47-
PROPERTY_NAME_COMMENT = 'openslide.comment'
48-
PROPERTY_NAME_VENDOR = 'openslide.vendor'
49-
PROPERTY_NAME_QUICKHASH1 = 'openslide.quickhash-1'
5047
PROPERTY_NAME_BACKGROUND_COLOR = 'openslide.background-color'
51-
PROPERTY_NAME_OBJECTIVE_POWER = 'openslide.objective-power'
52-
PROPERTY_NAME_MPP_X = 'openslide.mpp-x'
53-
PROPERTY_NAME_MPP_Y = 'openslide.mpp-y'
48+
PROPERTY_NAME_BARCODE = 'openslide.barcode'
49+
PROPERTY_NAME_BOUNDS_HEIGHT = 'openslide.bounds-height'
50+
PROPERTY_NAME_BOUNDS_WIDTH = 'openslide.bounds-width'
5451
PROPERTY_NAME_BOUNDS_X = 'openslide.bounds-x'
5552
PROPERTY_NAME_BOUNDS_Y = 'openslide.bounds-y'
56-
PROPERTY_NAME_BOUNDS_WIDTH = 'openslide.bounds-width'
57-
PROPERTY_NAME_BOUNDS_HEIGHT = 'openslide.bounds-height'
53+
PROPERTY_NAME_COMMENT = 'openslide.comment'
54+
PROPERTY_NAME_MPP_X = 'openslide.mpp-x'
55+
PROPERTY_NAME_MPP_Y = 'openslide.mpp-y'
56+
PROPERTY_NAME_OBJECTIVE_POWER = 'openslide.objective-power'
57+
PROPERTY_NAME_QUICKHASH1 = 'openslide.quickhash-1'
58+
PROPERTY_NAME_VENDOR = 'openslide.vendor'
5859

5960
_T = TypeVar('_T')
6061

0 commit comments

Comments
 (0)