diff --git a/_data/releases.yaml b/_data/releases.yaml index 681bab5..a6dfbee 100644 --- a/_data/releases.yaml +++ b/_data/releases.yaml @@ -26,6 +26,7 @@ c: - {version: 2.1.0, date: 2009-08-18, gz: 1} - {version: 2.0.0, date: 2009-07-16, gz: 1} python: + - {version: 1.4.2, date: 2025-04-28, gz: 1, xz: 1, whl: 1, src_: 1} - {version: 1.4.1, date: 2024-10-30, gz: 1, xz: 1, whl: 1, src_: 1} - {version: 1.4.0, date: 2024-10-29, gz: 1, xz: 1, whl: 1, src_: 1} - {version: 1.3.1, date: 2023-10-08, gz: 1, xz: 1, whl: 1} diff --git a/_includes/news.md b/_includes/news.md index 3aa0fc6..baf07d9 100644 --- a/_includes/news.md +++ b/_includes/news.md @@ -1,5 +1,13 @@ {% include links.md %} +## OpenSlide Python version 1.4.2, 2025-04-28 + +[OpenSlide Python 1.4.2][python-1.4.2] drops support for Python 3.8 and adds +minor improvements. + +[python-1.4.2]: https://github.com/openslide/openslide-python/releases/tag/v1.4.2 + + ## Binary build 4.0.0.8, 2025-04-27 [Binary build 4.0.0.8][bin-4.0.0.8] updates many dependencies. diff --git a/api/python/index.html b/api/python/index.html index e9c24c7..ee85662 100644 --- a/api/python/index.html +++ b/api/python/index.html @@ -5,11 +5,11 @@ - OpenSlide Python — OpenSlide Python 1.4.1 documentation - + OpenSlide Python — OpenSlide Python 1.4.2 documentation + - + @@ -18,7 +18,7 @@ @@ -74,13 +74,13 @@

Installing
# The path can also be read from a config file, etc.
 OPENSLIDE_PATH = r'c:\path\to\openslide-win64\bin'
 
-import os
+import os
 if hasattr(os, 'add_dll_directory'):
     # Windows
     with os.add_dll_directory(OPENSLIDE_PATH):
-        import openslide
+        import openslide
 else:
-    import openslide
+    import openslide
 
@@ -90,7 +90,7 @@

Basic usage

OpenSlide objects

-class openslide.OpenSlide(filename: str | bytes | PathLike[Any])
+class openslide.OpenSlide(filename: str | bytes | PathLike[Any])

An open whole-slide image.

If any operation on the object fails, OpenSlideError is raised. OpenSlide has latching error semantics: once OpenSlideError is @@ -113,7 +113,7 @@

Basic usage
-classmethod detect_format(filename: str | bytes | PathLike[Any]) str | None
+classmethod detect_format(filename: str | bytes | PathLike[Any]) str | None

Return a string describing the format vendor of the specified file. This string is also accessible via the PROPERTY_NAME_VENDOR property.

@@ -191,11 +191,11 @@

Basic usageassociated_images

Images, such as label or macro images, which are associated with this slide. This is a Mapping from image -name to RGBA Image.

+name to RGBA Image.

Unlike in the C interface, these images are not premultiplied.

Type:
-

Mapping[str, Image]

+

Mapping[str, Image]

@@ -207,15 +207,15 @@

Basic usageNone if not available.

Type:
-

ImageCmsProfile | None

+

ImageCmsProfile | None

-read_region(location: tuple[int, int], level: int, size: tuple[int, int]) Image
-

Return an RGBA Image containing the contents of +read_region(location: tuple[int, int], level: int, size: tuple[int, int]) Image +

Return an RGBA Image containing the contents of the specified region.

Unlike in the C interface, the image data is not premultiplied.

@@ -243,8 +243,8 @@

Basic usage
-get_thumbnail(size: tuple[int, int]) Image
-

Return an Image containing an RGB thumbnail of the +get_thumbnail(size: tuple[int, int]) Image +

Return an Image containing an RGB thumbnail of the slide.

Parameters:
@@ -285,18 +285,18 @@

Basic usagebytes object in -Image.info['icc_profile']. If no +Image.info['icc_profile']. If no profile is available, the icc_profile dictionary key is absent.

To include the profile in an image file when saving the image to disk:

image.save(filename, icc_profile=image.info.get('icc_profile'))
 

To perform color conversions using the profile, import it into -ImageCms. For example, to synthesize an sRGB profile +ImageCms. For example, to synthesize an sRGB profile and use it to transform an image for display, with the default rendering intent of the image’s profile:

-
from io import BytesIO
-from PIL import ImageCms
+
from io import BytesIO
+from PIL import ImageCms
 
 fromProfile = ImageCms.getOpenProfile(BytesIO(image.info['icc_profile']))
 toProfile = ImageCms.createProfile('sRGB')
@@ -310,8 +310,8 @@ 

Basic usageOpenSlide.color_profile, already parsed into an -ImageCmsProfile object. You can save processing time -by building an ImageCmsTransform for the slide and +ImageCmsProfile object. You can save processing time +by building an ImageCmsTransform for the slide and reusing it for multiple slide regions:

toProfile = ImageCms.createProfile('sRGB')
 intent = ImageCms.getDefaultIntent(slide.color_profile)
@@ -327,7 +327,7 @@ 

Basic usage

-class openslide.OpenSlideCache(capacity: int)
+class openslide.OpenSlideCache(capacity: int)

An in-memory tile cache.

Tile caches can be attached to one or more OpenSlide objects with OpenSlide.set_cache() to cache recently-decoded tiles. By @@ -425,7 +425,7 @@

Caching

Exceptions

-exception openslide.OpenSlideError
+exception openslide.OpenSlideError

An error produced by the OpenSlide library.

Once OpenSlideError has been raised by a particular OpenSlide, all future operations on that OpenSlide @@ -435,14 +435,14 @@

Exceptions
-exception openslide.OpenSlideUnsupportedFormatError
+exception openslide.OpenSlideUnsupportedFormatError

OpenSlide does not support the requested file. Subclass of OpenSlideError.

-exception openslide.OpenSlideVersionError
+exception openslide.OpenSlideVersionError

This version of OpenSlide does not support the requested functionality. Subclass of OpenSlideError.

@@ -453,18 +453,18 @@

Exceptions

Wrapping a Pillow Image

-class openslide.AbstractSlide
+class openslide.AbstractSlide

The abstract base class of OpenSlide and ImageSlide.

-class openslide.ImageSlide(file: str | bytes | PathLike[Any] | Image)
-

A wrapper around an Image object that provides an +class openslide.ImageSlide(file: str | bytes | PathLike[Any] | Image) +

A wrapper around an Image object that provides an OpenSlide-compatible API.

Parameters:
-

file – a filename or Image object

+

file – a filename or Image object

Raises:

OSError – if the file cannot be opened

@@ -500,7 +500,7 @@

Exceptions
-class openslide.deepzoom.DeepZoomGenerator(osr: AbstractSlide, tile_size: int = 254, overlap: int = 1, limit_bounds: bool = False)
+class openslide.deepzoom.DeepZoomGenerator(osr: AbstractSlide, tile_size: int = 254, overlap: int = 1, limit_bounds: bool = False)

A Deep Zoom generator that wraps an OpenSlide object, ImageSlide object, or user-provided instance of AbstractSlide.

@@ -577,8 +577,8 @@

Exceptions
-get_tile(level: int, address: tuple[int, int]) Image
-

Return an RGB Image for a tile.

+get_tile(level: int, address: tuple[int, int]) Image +

Return an RGB Image for a tile.

Parameters:
    @@ -745,13 +745,13 @@

    This Page

    \ No newline at end of file diff --git a/api/python/objects.inv b/api/python/objects.inv index c8ac153..ddafef8 100644 Binary files a/api/python/objects.inv and b/api/python/objects.inv differ diff --git a/api/python/search.html b/api/python/search.html index aa9f033..57e16e0 100644 --- a/api/python/search.html +++ b/api/python/search.html @@ -4,12 +4,12 @@ - Search — OpenSlide Python 1.4.1 documentation - + Search — OpenSlide Python 1.4.2 documentation + - + @@ -24,7 +24,7 @@ @@ -75,13 +75,13 @@

    Search

    \ No newline at end of file diff --git a/api/python/searchindex.js b/api/python/searchindex.js index e1066e6..808fc5d 100644 --- a/api/python/searchindex.js +++ b/api/python/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"Basic usage": [[0, "basic-usage"]], "Caching": [[0, "caching"]], "Color management": [[0, "color-management"]], "Deep Zoom support": [[0, "module-openslide.deepzoom"]], "Example programs": [[0, "example-programs"]], "Exceptions": [[0, "exceptions"]], "Installing": [[0, "installing"]], "OpenSlide Python": [[0, null]], "OpenSlide objects": [[0, "module-openslide"]], "Standard properties": [[0, "standard-properties"]], "Wrapping a Pillow Image": [[0, "wrapping-a-pillow-image"]]}, "docnames": ["index"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1}, "filenames": ["index.rst"], "indexentries": {"abstractslide (class in openslide)": [[0, "openslide.AbstractSlide", false]], "associated_images (openslide.openslide attribute)": [[0, "openslide.OpenSlide.associated_images", false]], "close() (openslide.openslide method)": [[0, "openslide.OpenSlide.close", false]], "color_profile (openslide.openslide attribute)": [[0, "openslide.OpenSlide.color_profile", false]], "deepzoomgenerator (class in openslide.deepzoom)": [[0, "openslide.deepzoom.DeepZoomGenerator", false]], "detect_format() (openslide.openslide class method)": [[0, "openslide.OpenSlide.detect_format", false]], "dimensions (openslide.openslide attribute)": [[0, "openslide.OpenSlide.dimensions", false]], "get_best_level_for_downsample() (openslide.openslide method)": [[0, "openslide.OpenSlide.get_best_level_for_downsample", false]], "get_dzi() (openslide.deepzoom.deepzoomgenerator method)": [[0, "openslide.deepzoom.DeepZoomGenerator.get_dzi", false]], "get_thumbnail() (openslide.openslide method)": [[0, "openslide.OpenSlide.get_thumbnail", false]], "get_tile() (openslide.deepzoom.deepzoomgenerator method)": [[0, "openslide.deepzoom.DeepZoomGenerator.get_tile", false]], "get_tile_coordinates() (openslide.deepzoom.deepzoomgenerator method)": [[0, "openslide.deepzoom.DeepZoomGenerator.get_tile_coordinates", false]], "get_tile_dimensions() (openslide.deepzoom.deepzoomgenerator method)": [[0, "openslide.deepzoom.DeepZoomGenerator.get_tile_dimensions", false]], "imageslide (class in openslide)": [[0, "openslide.ImageSlide", false]], "level_count (openslide.deepzoom.deepzoomgenerator attribute)": [[0, "openslide.deepzoom.DeepZoomGenerator.level_count", false]], "level_count (openslide.openslide attribute)": [[0, "openslide.OpenSlide.level_count", false]], "level_dimensions (openslide.deepzoom.deepzoomgenerator attribute)": [[0, "openslide.deepzoom.DeepZoomGenerator.level_dimensions", false]], "level_dimensions (openslide.openslide attribute)": [[0, "openslide.OpenSlide.level_dimensions", false]], "level_downsamples (openslide.openslide attribute)": [[0, "openslide.OpenSlide.level_downsamples", false]], "level_tiles (openslide.deepzoom.deepzoomgenerator attribute)": [[0, "openslide.deepzoom.DeepZoomGenerator.level_tiles", false]], "module": [[0, "module-openslide", false], [0, "module-openslide.deepzoom", false]], "open_slide() (in module openslide)": [[0, "openslide.open_slide", false]], "openslide": [[0, "module-openslide", false]], "openslide (class in openslide)": [[0, "openslide.OpenSlide", false]], "openslide.deepzoom": [[0, "module-openslide.deepzoom", false]], "openslidecache (class in openslide)": [[0, "openslide.OpenSlideCache", false]], "openslideerror": [[0, "openslide.OpenSlideError", false]], "openslideunsupportedformaterror": [[0, "openslide.OpenSlideUnsupportedFormatError", false]], "openslideversionerror": [[0, "openslide.OpenSlideVersionError", false]], "properties (openslide.openslide attribute)": [[0, "openslide.OpenSlide.properties", false]], "property_name_background_color (in module openslide)": [[0, "openslide.PROPERTY_NAME_BACKGROUND_COLOR", false]], "property_name_bounds_height (in module openslide)": [[0, "openslide.PROPERTY_NAME_BOUNDS_HEIGHT", false]], "property_name_bounds_width (in module openslide)": [[0, "openslide.PROPERTY_NAME_BOUNDS_WIDTH", false]], "property_name_bounds_x (in module openslide)": [[0, "openslide.PROPERTY_NAME_BOUNDS_X", false]], "property_name_bounds_y (in module openslide)": [[0, "openslide.PROPERTY_NAME_BOUNDS_Y", false]], "property_name_comment (in module openslide)": [[0, "openslide.PROPERTY_NAME_COMMENT", false]], "property_name_mpp_x (in module openslide)": [[0, "openslide.PROPERTY_NAME_MPP_X", false]], "property_name_mpp_y (in module openslide)": [[0, "openslide.PROPERTY_NAME_MPP_Y", false]], "property_name_objective_power (in module openslide)": [[0, "openslide.PROPERTY_NAME_OBJECTIVE_POWER", false]], "property_name_quickhash1 (in module openslide)": [[0, "openslide.PROPERTY_NAME_QUICKHASH1", false]], "property_name_vendor (in module openslide)": [[0, "openslide.PROPERTY_NAME_VENDOR", false]], "read_region() (openslide.openslide method)": [[0, "openslide.OpenSlide.read_region", false]], "set_cache() (openslide.openslide method)": [[0, "openslide.OpenSlide.set_cache", false]], "tile_count (openslide.deepzoom.deepzoomgenerator attribute)": [[0, "openslide.deepzoom.DeepZoomGenerator.tile_count", false]]}, "objects": {"": [[0, 0, 0, "-", "openslide"]], "openslide": [[0, 1, 1, "", "AbstractSlide"], [0, 1, 1, "", "ImageSlide"], [0, 1, 1, "", "OpenSlide"], [0, 1, 1, "", "OpenSlideCache"], [0, 4, 1, "", "OpenSlideError"], [0, 4, 1, "", "OpenSlideUnsupportedFormatError"], [0, 4, 1, "", "OpenSlideVersionError"], [0, 5, 1, "", "PROPERTY_NAME_BACKGROUND_COLOR"], [0, 5, 1, "", "PROPERTY_NAME_BOUNDS_HEIGHT"], [0, 5, 1, "", "PROPERTY_NAME_BOUNDS_WIDTH"], [0, 5, 1, "", "PROPERTY_NAME_BOUNDS_X"], [0, 5, 1, "", "PROPERTY_NAME_BOUNDS_Y"], [0, 5, 1, "", "PROPERTY_NAME_COMMENT"], [0, 5, 1, "", "PROPERTY_NAME_MPP_X"], [0, 5, 1, "", "PROPERTY_NAME_MPP_Y"], [0, 5, 1, "", "PROPERTY_NAME_OBJECTIVE_POWER"], [0, 5, 1, "", "PROPERTY_NAME_QUICKHASH1"], [0, 5, 1, "", "PROPERTY_NAME_VENDOR"], [0, 0, 0, "-", "deepzoom"], [0, 6, 1, "", "open_slide"]], "openslide.OpenSlide": [[0, 2, 1, "", "associated_images"], [0, 3, 1, "", "close"], [0, 2, 1, "", "color_profile"], [0, 3, 1, "", "detect_format"], [0, 2, 1, "", "dimensions"], [0, 3, 1, "", "get_best_level_for_downsample"], [0, 3, 1, "", "get_thumbnail"], [0, 2, 1, "", "level_count"], [0, 2, 1, "", "level_dimensions"], [0, 2, 1, "", "level_downsamples"], [0, 2, 1, "", "properties"], [0, 3, 1, "", "read_region"], [0, 3, 1, "", "set_cache"]], "openslide.deepzoom": [[0, 1, 1, "", "DeepZoomGenerator"]], "openslide.deepzoom.DeepZoomGenerator": [[0, 3, 1, "", "get_dzi"], [0, 3, 1, "", "get_tile"], [0, 3, 1, "", "get_tile_coordinates"], [0, 3, 1, "", "get_tile_dimensions"], [0, 2, 1, "", "level_count"], [0, 2, 1, "", "level_dimensions"], [0, 2, 1, "", "level_tiles"], [0, 2, 1, "", "tile_count"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "attribute", "Python attribute"], "3": ["py", "method", "Python method"], "4": ["py", "exception", "Python exception"], "5": ["py", "data", "Python data"], "6": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:attribute", "3": "py:method", "4": "py:exception", "5": "py:data", "6": "py:function"}, "terms": {"": 0, "0": 0, "1": 0, "2": 0, "254": 0, "4": 0, "A": 0, "As": 0, "By": 0, "For": 0, "If": 0, "It": 0, "On": 0, "Or": 0, "The": 0, "Then": 0, "These": 0, "To": 0, "abil": 0, "about": 0, "absent": 0, "abstract": 0, "abstractslid": 0, "access": 0, "add": 0, "add_dll_directori": 0, "addit": 0, "address": 0, "after": 0, "all": 0, "allow": 0, "alreadi": 0, "also": 0, "amount": 0, "an": 0, "anaconda": 0, "ani": 0, "aperio": 0, "api": 0, "applic": 0, "applytransform": 0, "apt": 0, "ar": 0, "argument": 0, "around": 0, "associ": 0, "associated_imag": 0, "attach": 0, "attribut": 0, "automat": 0, "avail": 0, "background": 0, "base": 0, "been": 0, "best": 0, "bif": 0, "bin": 0, "binari": 0, "bool": 0, "both": 0, "bound": 0, "browser": 0, "build": 0, "buildtransform": 0, "byte": 0, "bytesio": 0, "c": 0, "call": 0, "can": 0, "cannot": 0, "capac": 0, "case": 0, "class": 0, "classmethod": 0, "close": 0, "closest": 0, "color_profil": 0, "column": 0, "comfort": 0, "comment": 0, "commonli": 0, "compat": 0, "complet": 0, "config": 0, "conflict": 0, "consid": 0, "contain": 0, "content": 0, "context": 0, "conveni": 0, "convers": 0, "convert": 0, "coordin": 0, "correspond": 0, "count": 0, "createprofil": 0, "czi": 0, "data": 0, "dcm": 0, "decod": 0, "deepzoom": 0, "deepzoom_multiserv": 0, "deepzoom_serv": 0, "deepzoom_til": 0, "deepzoomgener": 0, "default": 0, "delet": 0, "deliveri": 0, "describ": 0, "design": 0, "desir": 0, "detect_format": 0, "dicom": 0, "dictionari": 0, "differ": 0, "digit": 0, "dimens": 0, "directori": 0, "disk": 0, "displai": 0, "dnf": 0, "do": 0, "doe": 0, "download": 0, "downsampl": 0, "dzi": 0, "each": 0, "easiest": 0, "easili": 0, "edg": 0, "els": 0, "embed": 0, "empti": 0, "entir": 0, "error": 0, "etc": 0, "everi": 0, "examin": 0, "exit": 0, "extra": 0, "extract": 0, "factor": 0, "fail": 0, "fals": 0, "file": 0, "filenam": 0, "float": 0, "form": 0, "format": 0, "former": 0, "frame": 0, "from": 0, "fromprofil": 0, "function": 0, "futur": 0, "gener": 0, "get": 0, "get_best_level_for_downsampl": 0, "get_dzi": 0, "get_thumbnail": 0, "get_til": 0, "get_tile_coordin": 0, "get_tile_dimens": 0, "getdefaultint": 0, "getopenprofil": 0, "gigabyt": 0, "give": 0, "given": 0, "gnu": 0, "ha": 0, "hamamatsu": 0, "hasattr": 0, "have": 0, "height": 0, "hex": 0, "high": 0, "highest": 0, "html": 0, "i": 0, "icc": 0, "icc_profil": 0, "identif": 0, "imagecm": 0, "imagecmsprofil": 0, "imagecmstransform": 0, "imageslid": 0, "import": 0, "includ": 0, "index": 0, "individu": 0, "info": 0, "insid": 0, "instanc": 0, "instead": 0, "int": 0, "intend": 0, "intent": 0, "interfac": 0, "interior": 0, "io": 0, "its": 0, "jpeg": 0, "k": 0, "kei": 0, "known": 0, "label": 0, "latch": 0, "left": 0, "leica": 0, "lesser": 0, "level": 0, "level_count": 0, "level_dimens": 0, "level_downsampl": 0, "level_til": 0, "librari": 0, "licens": 0, "limit_bound": 0, "link": 0, "linux": 0, "list": 0, "ll": 0, "locat": 0, "lowest": 0, "maco": 0, "macport": 0, "macro": 0, "mai": 0, "map": 0, "maximum": 0, "memori": 0, "metadata": 0, "micron": 0, "mirax": 0, "mix": 0, "modul": 0, "more": 0, "most": 0, "mrx": 0, "multi": 0, "multipl": 0, "must": 0, "name": 0, "ndpi": 0, "need": 0, "non": 0, "none": 0, "number": 0, "o": 0, "occupi": 0, "occur": 0, "older": 0, "onc": 0, "one": 0, "onli": 0, "open": 0, "open_slid": 0, "openslide_path": 0, "openslidecach": 0, "openslideerror": 0, "openslideunsupportedformaterror": 0, "openslideversionerror": 0, "oper": 0, "option": 0, "oserror": 0, "osr": 0, "other": 0, "overlap": 0, "own": 0, "packag": 0, "page": 0, "paramet": 0, "pars": 0, "particular": 0, "path": 0, "pathlik": 0, "pathologi": 0, "per": 0, "perform": 0, "philip": 0, "pil": 0, "pip": 0, "pixel": 0, "pixels_i": 0, "pixels_x": 0, "plu": 0, "png": 0, "power": 0, "premultipli": 0, "privat": 0, "process": 0, "produc": 0, "product": 0, "profil": 0, "profiletoprofil": 0, "property_name_background_color": 0, "property_name_bounds_height": 0, "property_name_bounds_i": 0, "property_name_bounds_width": 0, "property_name_bounds_x": 0, "property_name_com": 0, "property_name_mpp_i": 0, "property_name_mpp_x": 0, "property_name_objective_pow": 0, "property_name_quickhash1": 0, "property_name_vendor": 0, "provid": 0, "public": 0, "py": 0, "pyramid": 0, "quickhash": 0, "r": 0, "rais": 0, "ram": 0, "read": 0, "read_region": 0, "recent": 0, "recogn": 0, "rectangl": 0, "refer": 0, "region": 0, "releas": 0, "render": 0, "repres": 0, "request": 0, "requir": 0, "resolut": 0, "return": 0, "reus": 0, "rgb": 0, "rgba": 0, "row": 0, "sakura": 0, "same": 0, "save": 0, "scn": 0, "semant": 0, "separ": 0, "serv": 0, "server": 0, "set_cach": 0, "sever": 0, "should": 0, "similar": 0, "simpl": 0, "sinc": 0, "singl": 0, "size": 0, "slide": 0, "small": 0, "so": 0, "some": 0, "sourc": 0, "specifi": 0, "srgb": 0, "statement": 0, "store": 0, "str": 0, "string": 0, "subclass": 0, "sum": 0, "sv": 0, "svslide": 0, "synthes": 0, "system": 0, "ten": 0, "term": 0, "than": 0, "them": 0, "thi": 0, "thumbnail": 0, "tif": 0, "tiff": 0, "tile": 0, "tile_count": 0, "tile_s": 0, "tiles_i": 0, "tiles_x": 0, "time": 0, "tool": 0, "top": 0, "toprofil": 0, "total": 0, "transform": 0, "tree": 0, "trestl": 0, "triplet": 0, "true": 0, "tupl": 0, "two": 0, "type": 0, "typic": 0, "uncompress": 0, "under": 0, "underli": 0, "unlik": 0, "upon": 0, "us": 0, "user": 0, "valu": 0, "vari": 0, "vendor": 0, "ventana": 0, "version": 0, "via": 0, "view": 0, "viewer": 0, "vip": 0, "virtual": 0, "vm": 0, "vmu": 0, "wai": 0, "web": 0, "when": 0, "whenev": 0, "which": 0, "whole": 0, "width": 0, "win64": 0, "window": 0, "within": 0, "without": 0, "wrapper": 0, "x": 0, "xml": 0, "y": 0, "you": 0, "zeiss": 0, "zoomabl": 0}, "titles": ["OpenSlide Python"], "titleterms": {"basic": 0, "cach": 0, "color": 0, "deep": 0, "exampl": 0, "except": 0, "imag": 0, "instal": 0, "manag": 0, "object": 0, "openslid": 0, "pillow": 0, "program": 0, "properti": 0, "python": 0, "standard": 0, "support": 0, "usag": 0, "wrap": 0, "zoom": 0}}) \ No newline at end of file +Search.setIndex({"alltitles":{"Basic usage":[[0,"basic-usage"]],"Caching":[[0,"caching"]],"Color management":[[0,"color-management"]],"Deep Zoom support":[[0,"module-openslide.deepzoom"]],"Example programs":[[0,"example-programs"]],"Exceptions":[[0,"exceptions"]],"Installing":[[0,"installing"]],"OpenSlide Python":[[0,null]],"OpenSlide objects":[[0,"module-openslide"]],"Standard properties":[[0,"standard-properties"]],"Wrapping a Pillow Image":[[0,"wrapping-a-pillow-image"]]},"docnames":["index"],"envversion":{"sphinx":65,"sphinx.domains.c":3,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":9,"sphinx.domains.index":1,"sphinx.domains.javascript":3,"sphinx.domains.math":2,"sphinx.domains.python":4,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1},"filenames":["index.rst"],"indexentries":{"abstractslide (class in openslide)":[[0,"openslide.AbstractSlide",false]],"associated_images (openslide.openslide attribute)":[[0,"openslide.OpenSlide.associated_images",false]],"close() (openslide.openslide method)":[[0,"openslide.OpenSlide.close",false]],"color_profile (openslide.openslide attribute)":[[0,"openslide.OpenSlide.color_profile",false]],"deepzoomgenerator (class in openslide.deepzoom)":[[0,"openslide.deepzoom.DeepZoomGenerator",false]],"detect_format() (openslide.openslide class method)":[[0,"openslide.OpenSlide.detect_format",false]],"dimensions (openslide.openslide attribute)":[[0,"openslide.OpenSlide.dimensions",false]],"get_best_level_for_downsample() (openslide.openslide method)":[[0,"openslide.OpenSlide.get_best_level_for_downsample",false]],"get_dzi() (openslide.deepzoom.deepzoomgenerator method)":[[0,"openslide.deepzoom.DeepZoomGenerator.get_dzi",false]],"get_thumbnail() (openslide.openslide method)":[[0,"openslide.OpenSlide.get_thumbnail",false]],"get_tile() (openslide.deepzoom.deepzoomgenerator method)":[[0,"openslide.deepzoom.DeepZoomGenerator.get_tile",false]],"get_tile_coordinates() (openslide.deepzoom.deepzoomgenerator method)":[[0,"openslide.deepzoom.DeepZoomGenerator.get_tile_coordinates",false]],"get_tile_dimensions() (openslide.deepzoom.deepzoomgenerator method)":[[0,"openslide.deepzoom.DeepZoomGenerator.get_tile_dimensions",false]],"imageslide (class in openslide)":[[0,"openslide.ImageSlide",false]],"level_count (openslide.deepzoom.deepzoomgenerator attribute)":[[0,"openslide.deepzoom.DeepZoomGenerator.level_count",false]],"level_count (openslide.openslide attribute)":[[0,"openslide.OpenSlide.level_count",false]],"level_dimensions (openslide.deepzoom.deepzoomgenerator attribute)":[[0,"openslide.deepzoom.DeepZoomGenerator.level_dimensions",false]],"level_dimensions (openslide.openslide attribute)":[[0,"openslide.OpenSlide.level_dimensions",false]],"level_downsamples (openslide.openslide attribute)":[[0,"openslide.OpenSlide.level_downsamples",false]],"level_tiles (openslide.deepzoom.deepzoomgenerator attribute)":[[0,"openslide.deepzoom.DeepZoomGenerator.level_tiles",false]],"module":[[0,"module-openslide",false],[0,"module-openslide.deepzoom",false]],"open_slide() (in module openslide)":[[0,"openslide.open_slide",false]],"openslide":[[0,"module-openslide",false]],"openslide (class in openslide)":[[0,"openslide.OpenSlide",false]],"openslide.deepzoom":[[0,"module-openslide.deepzoom",false]],"openslidecache (class in openslide)":[[0,"openslide.OpenSlideCache",false]],"openslideerror":[[0,"openslide.OpenSlideError",false]],"openslideunsupportedformaterror":[[0,"openslide.OpenSlideUnsupportedFormatError",false]],"openslideversionerror":[[0,"openslide.OpenSlideVersionError",false]],"properties (openslide.openslide attribute)":[[0,"openslide.OpenSlide.properties",false]],"property_name_background_color (in module openslide)":[[0,"openslide.PROPERTY_NAME_BACKGROUND_COLOR",false]],"property_name_bounds_height (in module openslide)":[[0,"openslide.PROPERTY_NAME_BOUNDS_HEIGHT",false]],"property_name_bounds_width (in module openslide)":[[0,"openslide.PROPERTY_NAME_BOUNDS_WIDTH",false]],"property_name_bounds_x (in module openslide)":[[0,"openslide.PROPERTY_NAME_BOUNDS_X",false]],"property_name_bounds_y (in module openslide)":[[0,"openslide.PROPERTY_NAME_BOUNDS_Y",false]],"property_name_comment (in module openslide)":[[0,"openslide.PROPERTY_NAME_COMMENT",false]],"property_name_mpp_x (in module openslide)":[[0,"openslide.PROPERTY_NAME_MPP_X",false]],"property_name_mpp_y (in module openslide)":[[0,"openslide.PROPERTY_NAME_MPP_Y",false]],"property_name_objective_power (in module openslide)":[[0,"openslide.PROPERTY_NAME_OBJECTIVE_POWER",false]],"property_name_quickhash1 (in module openslide)":[[0,"openslide.PROPERTY_NAME_QUICKHASH1",false]],"property_name_vendor (in module openslide)":[[0,"openslide.PROPERTY_NAME_VENDOR",false]],"read_region() (openslide.openslide method)":[[0,"openslide.OpenSlide.read_region",false]],"set_cache() (openslide.openslide method)":[[0,"openslide.OpenSlide.set_cache",false]],"tile_count (openslide.deepzoom.deepzoomgenerator attribute)":[[0,"openslide.deepzoom.DeepZoomGenerator.tile_count",false]]},"objects":{"":[[0,0,0,"-","openslide"]],"openslide":[[0,1,1,"","AbstractSlide"],[0,1,1,"","ImageSlide"],[0,1,1,"","OpenSlide"],[0,1,1,"","OpenSlideCache"],[0,4,1,"","OpenSlideError"],[0,4,1,"","OpenSlideUnsupportedFormatError"],[0,4,1,"","OpenSlideVersionError"],[0,5,1,"","PROPERTY_NAME_BACKGROUND_COLOR"],[0,5,1,"","PROPERTY_NAME_BOUNDS_HEIGHT"],[0,5,1,"","PROPERTY_NAME_BOUNDS_WIDTH"],[0,5,1,"","PROPERTY_NAME_BOUNDS_X"],[0,5,1,"","PROPERTY_NAME_BOUNDS_Y"],[0,5,1,"","PROPERTY_NAME_COMMENT"],[0,5,1,"","PROPERTY_NAME_MPP_X"],[0,5,1,"","PROPERTY_NAME_MPP_Y"],[0,5,1,"","PROPERTY_NAME_OBJECTIVE_POWER"],[0,5,1,"","PROPERTY_NAME_QUICKHASH1"],[0,5,1,"","PROPERTY_NAME_VENDOR"],[0,0,0,"-","deepzoom"],[0,6,1,"","open_slide"]],"openslide.OpenSlide":[[0,2,1,"","associated_images"],[0,3,1,"","close"],[0,2,1,"","color_profile"],[0,3,1,"","detect_format"],[0,2,1,"","dimensions"],[0,3,1,"","get_best_level_for_downsample"],[0,3,1,"","get_thumbnail"],[0,2,1,"","level_count"],[0,2,1,"","level_dimensions"],[0,2,1,"","level_downsamples"],[0,2,1,"","properties"],[0,3,1,"","read_region"],[0,3,1,"","set_cache"]],"openslide.deepzoom":[[0,1,1,"","DeepZoomGenerator"]],"openslide.deepzoom.DeepZoomGenerator":[[0,3,1,"","get_dzi"],[0,3,1,"","get_tile"],[0,3,1,"","get_tile_coordinates"],[0,3,1,"","get_tile_dimensions"],[0,2,1,"","level_count"],[0,2,1,"","level_dimensions"],[0,2,1,"","level_tiles"],[0,2,1,"","tile_count"]]},"objnames":{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"],"4":["py","exception","Python exception"],"5":["py","data","Python data"],"6":["py","function","Python function"]},"objtypes":{"0":"py:module","1":"py:class","2":"py:attribute","3":"py:method","4":"py:exception","5":"py:data","6":"py:function"},"terms":{"":0,"0":0,"1":0,"2":0,"254":0,"4":0,"A":0,"As":0,"By":0,"For":0,"If":0,"It":0,"On":0,"Or":0,"The":0,"Then":0,"These":0,"To":0,"abil":0,"about":0,"absent":0,"abstract":0,"abstractslid":0,"access":0,"add":0,"add_dll_directori":0,"addit":0,"address":0,"after":0,"all":0,"allow":0,"alreadi":0,"also":0,"amount":0,"an":0,"anaconda":0,"ani":0,"aperio":0,"api":0,"applic":0,"applytransform":0,"apt":0,"ar":0,"argument":0,"around":0,"associ":0,"associated_imag":0,"attach":0,"attribut":0,"automat":0,"avail":0,"background":0,"base":0,"been":0,"best":0,"bif":0,"bin":0,"binari":0,"bool":0,"both":0,"bound":0,"browser":0,"build":0,"buildtransform":0,"byte":0,"bytesio":0,"c":0,"call":0,"can":0,"cannot":0,"capac":0,"case":0,"class":0,"classmethod":0,"close":0,"closest":0,"color_profil":0,"column":0,"comfort":0,"comment":0,"commonli":0,"compat":0,"complet":0,"config":0,"conflict":0,"consid":0,"contain":0,"content":0,"context":0,"conveni":0,"convers":0,"convert":0,"coordin":0,"correspond":0,"count":0,"createprofil":0,"czi":0,"data":0,"dcm":0,"decod":0,"deepzoom":0,"deepzoom_multiserv":0,"deepzoom_serv":0,"deepzoom_til":0,"deepzoomgener":0,"default":0,"delet":0,"deliveri":0,"describ":0,"design":0,"desir":0,"detect_format":0,"dicom":0,"dictionari":0,"differ":0,"digit":0,"dimens":0,"directori":0,"disk":0,"displai":0,"dnf":0,"do":0,"doe":0,"download":0,"downsampl":0,"dzi":0,"each":0,"easiest":0,"easili":0,"edg":0,"els":0,"embed":0,"empti":0,"entir":0,"error":0,"etc":0,"everi":0,"examin":0,"exit":0,"extra":0,"extract":0,"factor":0,"fail":0,"fals":0,"file":0,"filenam":0,"float":0,"form":0,"format":0,"former":0,"frame":0,"from":0,"fromprofil":0,"function":0,"futur":0,"gener":0,"get":0,"get_best_level_for_downsampl":0,"get_dzi":0,"get_thumbnail":0,"get_til":0,"get_tile_coordin":0,"get_tile_dimens":0,"getdefaultint":0,"getopenprofil":0,"gigabyt":0,"give":0,"given":0,"gnu":0,"ha":0,"hamamatsu":0,"hasattr":0,"have":0,"height":0,"hex":0,"high":0,"highest":0,"html":0,"i":0,"icc":0,"icc_profil":0,"identif":0,"imagecm":0,"imagecmsprofil":0,"imagecmstransform":0,"imageslid":0,"import":0,"includ":0,"index":0,"individu":0,"info":0,"insid":0,"instanc":0,"instead":0,"int":0,"intend":0,"intent":0,"interfac":0,"interior":0,"io":0,"its":0,"jpeg":0,"k":0,"kei":0,"known":0,"label":0,"latch":0,"left":0,"leica":0,"lesser":0,"level":0,"level_count":0,"level_dimens":0,"level_downsampl":0,"level_til":0,"librari":0,"licens":0,"limit_bound":0,"link":0,"linux":0,"list":0,"ll":0,"locat":0,"lowest":0,"maco":0,"macport":0,"macro":0,"mai":0,"map":0,"maximum":0,"memori":0,"metadata":0,"micron":0,"mirax":0,"mix":0,"modul":0,"more":0,"most":0,"mrx":0,"multi":0,"multipl":0,"must":0,"name":0,"ndpi":0,"need":0,"non":0,"none":0,"number":0,"o":0,"occupi":0,"occur":0,"older":0,"onc":0,"one":0,"onli":0,"open":0,"open_slid":0,"openslide_path":0,"openslidecach":0,"openslideerror":0,"openslideunsupportedformaterror":0,"openslideversionerror":0,"oper":0,"option":0,"oserror":0,"osr":0,"other":0,"overlap":0,"own":0,"packag":0,"page":0,"paramet":0,"pars":0,"particular":0,"path":0,"pathlik":0,"pathologi":0,"per":0,"perform":0,"philip":0,"pil":0,"pip":0,"pixel":0,"pixels_i":0,"pixels_x":0,"plu":0,"png":0,"power":0,"premultipli":0,"privat":0,"process":0,"produc":0,"product":0,"profil":0,"profiletoprofil":0,"property_name_background_color":0,"property_name_bounds_height":0,"property_name_bounds_i":0,"property_name_bounds_width":0,"property_name_bounds_x":0,"property_name_com":0,"property_name_mpp_i":0,"property_name_mpp_x":0,"property_name_objective_pow":0,"property_name_quickhash1":0,"property_name_vendor":0,"provid":0,"public":0,"py":0,"pyramid":0,"quickhash":0,"r":0,"rais":0,"ram":0,"read":0,"read_region":0,"recent":0,"recogn":0,"rectangl":0,"refer":0,"region":0,"releas":0,"render":0,"repres":0,"request":0,"requir":0,"resolut":0,"return":0,"reus":0,"rgb":0,"rgba":0,"row":0,"sakura":0,"same":0,"save":0,"scn":0,"semant":0,"separ":0,"serv":0,"server":0,"set_cach":0,"sever":0,"should":0,"similar":0,"simpl":0,"sinc":0,"singl":0,"size":0,"slide":0,"small":0,"so":0,"some":0,"sourc":0,"specifi":0,"srgb":0,"statement":0,"store":0,"str":0,"string":0,"subclass":0,"sum":0,"sv":0,"svslide":0,"synthes":0,"system":0,"ten":0,"term":0,"than":0,"them":0,"thi":0,"thumbnail":0,"tif":0,"tiff":0,"tile":0,"tile_count":0,"tile_s":0,"tiles_i":0,"tiles_x":0,"time":0,"tool":0,"top":0,"toprofil":0,"total":0,"transform":0,"tree":0,"trestl":0,"triplet":0,"true":0,"tupl":0,"two":0,"type":0,"typic":0,"uncompress":0,"under":0,"underli":0,"unlik":0,"upon":0,"us":0,"user":0,"valu":0,"vari":0,"vendor":0,"ventana":0,"version":0,"via":0,"view":0,"viewer":0,"vip":0,"virtual":0,"vm":0,"vmu":0,"wai":0,"web":0,"when":0,"whenev":0,"which":0,"whole":0,"width":0,"win64":0,"window":0,"within":0,"without":0,"wrapper":0,"x":0,"xml":0,"y":0,"you":0,"zeiss":0,"zoomabl":0},"titles":["OpenSlide Python"],"titleterms":{"basic":0,"cach":0,"color":0,"deep":0,"exampl":0,"except":0,"imag":0,"instal":0,"manag":0,"object":0,"openslid":0,"pillow":0,"program":0,"properti":0,"python":0,"standard":0,"support":0,"usag":0,"wrap":0,"zoom":0}}) \ No newline at end of file diff --git a/api/python/static/basic.css b/api/python/static/basic.css index 7ebbd6d..4738b2e 100644 --- a/api/python/static/basic.css +++ b/api/python/static/basic.css @@ -741,14 +741,6 @@ abbr, acronym { cursor: help; } -.translated { - background-color: rgba(207, 255, 207, 0.2) -} - -.untranslated { - background-color: rgba(255, 207, 207, 0.2) -} - /* -- code displays --------------------------------------------------------- */ pre { diff --git a/api/python/static/documentation_options.js b/api/python/static/documentation_options.js index dfba10e..6d656b6 100644 --- a/api/python/static/documentation_options.js +++ b/api/python/static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '1.4.1', + VERSION: '1.4.2', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/api/python/static/pygments.css b/api/python/static/pygments.css index 0d49244..5f2b0a2 100644 --- a/api/python/static/pygments.css +++ b/api/python/static/pygments.css @@ -6,26 +6,26 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .hll { background-color: #ffffcc } .highlight { background: #eeffcc; } .highlight .c { color: #408090; font-style: italic } /* Comment */ -.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .err { border: 1px solid #F00 } /* Error */ .highlight .k { color: #007020; font-weight: bold } /* Keyword */ -.highlight .o { color: #666666 } /* Operator */ +.highlight .o { color: #666 } /* Operator */ .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ .highlight .cp { color: #007020 } /* Comment.Preproc */ .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.highlight .cs { color: #408090; background-color: #FFF0F0 } /* Comment.Special */ .highlight .gd { color: #A00000 } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gr { color: #F00 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #333333 } /* Generic.Output */ -.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .go { color: #333 } /* Generic.Output */ +.highlight .gp { color: #C65D09; font-weight: bold } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .gt { color: #04D } /* Generic.Traceback */ .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ @@ -33,43 +33,43 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #902000 } /* Keyword.Type */ .highlight .m { color: #208050 } /* Literal.Number */ -.highlight .s { color: #4070a0 } /* Literal.String */ -.highlight .na { color: #4070a0 } /* Name.Attribute */ +.highlight .s { color: #4070A0 } /* Literal.String */ +.highlight .na { color: #4070A0 } /* Name.Attribute */ .highlight .nb { color: #007020 } /* Name.Builtin */ -.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ -.highlight .no { color: #60add5 } /* Name.Constant */ -.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ -.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.highlight .nc { color: #0E84B5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60ADD5 } /* Name.Constant */ +.highlight .nd { color: #555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #D55537; font-weight: bold } /* Name.Entity */ .highlight .ne { color: #007020 } /* Name.Exception */ -.highlight .nf { color: #06287e } /* Name.Function */ +.highlight .nf { color: #06287E } /* Name.Function */ .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ -.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nn { color: #0E84B5; font-weight: bold } /* Name.Namespace */ .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ -.highlight .nv { color: #bb60d5 } /* Name.Variable */ +.highlight .nv { color: #BB60D5 } /* Name.Variable */ .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .w { color: #BBB } /* Text.Whitespace */ .highlight .mb { color: #208050 } /* Literal.Number.Bin */ .highlight .mf { color: #208050 } /* Literal.Number.Float */ .highlight .mh { color: #208050 } /* Literal.Number.Hex */ .highlight .mi { color: #208050 } /* Literal.Number.Integer */ .highlight .mo { color: #208050 } /* Literal.Number.Oct */ -.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ -.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ -.highlight .sc { color: #4070a0 } /* Literal.String.Char */ -.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ -.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ -.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ -.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ -.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ -.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ -.highlight .sx { color: #c65d09 } /* Literal.String.Other */ +.highlight .sa { color: #4070A0 } /* Literal.String.Affix */ +.highlight .sb { color: #4070A0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070A0 } /* Literal.String.Char */ +.highlight .dl { color: #4070A0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #4070A0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070A0 } /* Literal.String.Double */ +.highlight .se { color: #4070A0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070A0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70A0D0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #C65D09 } /* Literal.String.Other */ .highlight .sr { color: #235388 } /* Literal.String.Regex */ -.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ +.highlight .s1 { color: #4070A0 } /* Literal.String.Single */ .highlight .ss { color: #517918 } /* Literal.String.Symbol */ .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #06287e } /* Name.Function.Magic */ -.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ -.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ -.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ -.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ +.highlight .fm { color: #06287E } /* Name.Function.Magic */ +.highlight .vc { color: #BB60D5 } /* Name.Variable.Class */ +.highlight .vg { color: #BB60D5 } /* Name.Variable.Global */ +.highlight .vi { color: #BB60D5 } /* Name.Variable.Instance */ +.highlight .vm { color: #BB60D5 } /* Name.Variable.Magic */ .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/api/python/static/searchtools.js b/api/python/static/searchtools.js index 2c774d1..91f4be5 100644 --- a/api/python/static/searchtools.js +++ b/api/python/static/searchtools.js @@ -513,9 +513,11 @@ const Search = { // perform the search on the required terms searchTerms.forEach((word) => { const files = []; + // find documents, if any, containing the query word in their text/title term indices + // use Object.hasOwnProperty to avoid mismatching against prototype properties const arr = [ - { files: terms[word], score: Scorer.term }, - { files: titleTerms[word], score: Scorer.title }, + { files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term }, + { files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title }, ]; // add support for partial matches if (word.length > 2) { @@ -547,8 +549,9 @@ const Search = { // set score for the word in each file recordFiles.forEach((file) => { - if (!scoreMap.has(file)) scoreMap.set(file, {}); - scoreMap.get(file)[word] = record.score; + if (!scoreMap.has(file)) scoreMap.set(file, new Map()); + const fileScores = scoreMap.get(file); + fileScores.set(word, record.score); }); }); @@ -587,7 +590,7 @@ const Search = { break; // select one (max) score for the file. - const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w))); // add result to the result list results.push([ docNames[file],