
import cherrypy

from girder_large_image.girder_tilesource import GirderTileSource
from . import BioformatsFileTileSource, _stopJavabridge


cherrypy.engine.subscribe('stop', _stopJavabridge)


class BioformatsGirderTileSource(BioformatsFileTileSource, GirderTileSource):
    """
    Provides tile access to Girder items that can be read with bioformats.
    """

    cacheName = 'tilesource'
    name = 'bioformats'


import cherrypy

from girder_large_image.girder_tilesource import GirderTileSource
from . import BioformatsFileTileSource, _stopJavabridge


cherrypy.engine.subscribe('stop', _stopJavabridge)


class BioformatsGirderTileSource(BioformatsFileTileSource, GirderTileSource):
    """
    Provides tile access to Girder items that can be read with bioformats.
    """

    cacheName = 'tilesource'
    name = 'bioformats'

    def mayHaveAdjacentFiles(self, largeImageFile):
        # bioformats uses extensions to determine how to open a file, so this
        # needs to be set for all file formats.
        return True

Fix reading from hashed file names.
Fix reading from hashed file names.

Bioformats expects file extensions to exist, so flag that we should
always appear as actual, fully-pathed files.

  
  import cherrypy
  
  from girder_large_image.girder_tilesource import GirderTileSource
  from . import BioformatsFileTileSource, _stopJavabridge
  
  
  cherrypy.engine.subscribe('stop', _stopJavabridge)
  
  
  class BioformatsGirderTileSource(BioformatsFileTileSource, GirderTileSource):
      """
      Provides tile access to Girder items that can be read with bioformats.
      """
  
      cacheName = 'tilesource'
      name = 'bioformats'
  
+     def mayHaveAdjacentFiles(self, largeImageFile):
+         # bioformats uses extensions to determine how to open a file, so this
+         # needs to be set for all file formats.
+         return True
+ 
Fix reading from hashed file names.
## Code Before:

import cherrypy

from girder_large_image.girder_tilesource import GirderTileSource
from . import BioformatsFileTileSource, _stopJavabridge


cherrypy.engine.subscribe('stop', _stopJavabridge)


class BioformatsGirderTileSource(BioformatsFileTileSource, GirderTileSource):
    """
    Provides tile access to Girder items that can be read with bioformats.
    """

    cacheName = 'tilesource'
    name = 'bioformats'

## Instruction:
Fix reading from hashed file names.
## Code After:

import cherrypy

from girder_large_image.girder_tilesource import GirderTileSource
from . import BioformatsFileTileSource, _stopJavabridge


cherrypy.engine.subscribe('stop', _stopJavabridge)


class BioformatsGirderTileSource(BioformatsFileTileSource, GirderTileSource):
    """
    Provides tile access to Girder items that can be read with bioformats.
    """

    cacheName = 'tilesource'
    name = 'bioformats'

    def mayHaveAdjacentFiles(self, largeImageFile):
        # bioformats uses extensions to determine how to open a file, so this
        # needs to be set for all file formats.
        return True
