from six.moves import range from .base import FileTileSource, TileSourceException, nearPowerOfTwo from ..cache_util import LruCacheMetaclass, methodcache from ..constants import SourcePriority from .tiff_reader import TiledTiffDirectory, TiffException, \ InvalidOperationTiffException, IOTiffException, ValidationTiffException try: import girder from girder import logger from .base import GirderTileSource except ImportError: girder = None import logging as logger logger.getLogger().setLevel(logger.INFO) from .base import TILE_FORMAT_PIL try: import PIL.Image except ImportError: PIL = None @six.add_metaclass(LruCacheMetaclass) class TiffFileTileSource(FileTileSource): """ Provides tile access to TIFF files. """ cacheName = 'tilesource' name = 'tifffile'
from six.moves import range import openslide import PIL from .base import FileTileSource, TileSourceException from ..cache_util import LruCacheMetaclass, methodcache try: import girder from girder import logger from .base import GirderTileSource except ImportError: girder = None import logging as logger logger.getLogger().setLevel(logger.INFO) @six.add_metaclass(LruCacheMetaclass) class SVSFileTileSource(FileTileSource): """ Provides tile access to SVS files. """ cacheName = 'tilesource' name = 'svsfile' def __init__(self, path, **kwargs): """ Initialize the tile class. :param path: the associated file path.