Package ome.services

Class ThumbnailBean

  • All Implemented Interfaces:
    java.io.Serializable, ome.api.ServiceInterface, ome.api.StatefulServiceInterface, ome.api.ThumbnailStore, ome.system.SelfConfigurableService, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
    Direct Known Subclasses:
    ThumbnailBeanReadOnly

    @Transactional(readOnly=true)
    public class ThumbnailBean
    extends AbstractLevel2Service
    implements org.springframework.context.ApplicationContextAware, ome.api.ThumbnailStore, java.io.Serializable
    Provides methods for directly querying object graphs. The service is entirely read/write transactionally because of the requirements of rendering engine lazy object creation where rendering settings are missing.
    Since:
    3.0
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_X_WIDTH

        public static final int DEFAULT_X_WIDTH
        The default X-width for a thumbnail.
        See Also:
        Constant Field Values
      • DEFAULT_Y_WIDTH

        public static final int DEFAULT_Y_WIDTH
        The default Y-width for a thumbnail.
        See Also:
        Constant Field Values
      • DEFAULT_COMPRESSION_QUALITY

        public static final float DEFAULT_COMPRESSION_QUALITY
        The default compression quality in fractional percent.
        See Also:
        Constant Field Values
      • DEFAULT_MIME_TYPE

        public static final java.lang.String DEFAULT_MIME_TYPE
        The default MIME type.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ThumbnailBean

        public ThumbnailBean​(boolean checking)
        overridden to allow Spring to set boolean
        Parameters:
        checking -
    • Method Detail

      • getServiceInterface

        public java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
        Specified by:
        getServiceInterface in interface ome.system.SelfConfigurableService
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
      • passivate

        @Transactional(readOnly=true)
        public void passivate()
        Specified by:
        passivate in interface ome.api.StatefulServiceInterface
      • activate

        @Transactional(readOnly=true)
        public void activate()
        Specified by:
        activate in interface ome.api.StatefulServiceInterface
      • close

        public void close()
        Specified by:
        close in interface ome.api.StatefulServiceInterface
      • getRenderingDefId

        public long getRenderingDefId()
        Specified by:
        getRenderingDefId in interface ome.api.ThumbnailStore
      • getCurrentEventContext

        public ome.system.EventContext getCurrentEventContext()
        Specified by:
        getCurrentEventContext in interface ome.api.StatefulServiceInterface
      • setPixelsId

        @Transactional(readOnly=false)
        public boolean setPixelsId​(long id)
        Specified by:
        setPixelsId in interface ome.api.ThumbnailStore
      • isInProgress

        public boolean isInProgress()
        Specified by:
        isInProgress in interface ome.api.ThumbnailStore
      • setRenderingDefId

        public void setRenderingDefId​(long id)
        Specified by:
        setRenderingDefId in interface ome.api.ThumbnailStore
      • setLutProvider

        public void setLutProvider​(omeis.providers.re.lut.LutProvider lutProvider)
        Lookup table provider Bean injector.
        Parameters:
        lutProvider - The lookup table provider we'll be providing to the renderer.
      • setInProgressImageResource

        public void setInProgressImageResource​(org.springframework.core.io.Resource inProgressImageResource)
        In-progress image resource Bean injector.
        Parameters:
        inProgressImageResource - The in-progress image resource we'll be using for in progress images.
      • setPixelDataService

        public void setPixelDataService​(ome.io.nio.PixelsService pixelDataService)
        Pixels data service Bean injector.
        Parameters:
        pixelDataService - a PixelsService.
      • setIPixels

        public void setIPixels​(ome.api.IPixels iPixels)
        Pixels service Bean injector.
        Parameters:
        iPixels - an IPixels.
      • setScaleService

        public void setScaleService​(ome.api.IScale iScale)
        Scale service Bean injector.
        Parameters:
        iScale - an IScale.
      • setIoService

        public void setIoService​(ome.io.nio.ThumbnailService ioService)
        I/O service (ThumbnailService) Bean injector.
        Parameters:
        ioService - a ThumbnailService.
      • setIRepositoryInfo

        public final void setIRepositoryInfo​(ome.api.IRepositoryInfo iRepositoryInfo)
        Disk Space Usage service Bean injector
        Parameters:
        iRepositoryInfo - an IRepositoryInfo
      • setCompressionService

        public void setCompressionService​(LocalCompress compressionService)
        Compression service Bean injector.
        Parameters:
        compressionService - an ICompress.
      • setSettingsService

        public void setSettingsService​(ome.api.IRenderingSettings settingsService)
        Rendering settings service Bean injector.
        Parameters:
        settingsService - an IRenderingSettings.
      • errorIfInvalidState

        protected void errorIfInvalidState()
      • errorIfNullPixelsAndRenderingDef

        protected void errorIfNullPixelsAndRenderingDef()
      • errorIfNullPixels

        protected void errorIfNullPixels()
      • errorIfNullRenderingDef

        protected void errorIfNullRenderingDef()
      • createThumbnail

        @Transactional(readOnly=false)
        public void createThumbnail​(java.lang.Integer sizeX,
                                    java.lang.Integer sizeY)
        Specified by:
        createThumbnail in interface ome.api.ThumbnailStore
      • createThumbnails

        @Transactional(readOnly=false)
        public void createThumbnails()
        Specified by:
        createThumbnails in interface ome.api.ThumbnailStore
      • createThumbnailsByLongestSideSet

        @Transactional(readOnly=false)
        public void createThumbnailsByLongestSideSet​(java.lang.Integer size,
                                                     java.util.Set<java.lang.Long> pixelsIds)
        Specified by:
        createThumbnailsByLongestSideSet in interface ome.api.ThumbnailStore
      • getThumbnailSet

        @Transactional(readOnly=false)
        public java.util.Map<java.lang.Long,​byte[]> getThumbnailSet​(java.lang.Integer sizeX,
                                                                          java.lang.Integer sizeY,
                                                                          java.util.Set<java.lang.Long> pixelsIds)
        Specified by:
        getThumbnailSet in interface ome.api.ThumbnailStore
      • getThumbnailByLongestSideSet

        @Transactional(readOnly=false)
        public java.util.Map<java.lang.Long,​byte[]> getThumbnailByLongestSideSet​(java.lang.Integer size,
                                                                                       java.util.Set<java.lang.Long> pixelsIds)
        Specified by:
        getThumbnailByLongestSideSet in interface ome.api.ThumbnailStore
      • getThumbnail

        @Transactional(readOnly=false)
        public byte[] getThumbnail​(java.lang.Integer sizeX,
                                   java.lang.Integer sizeY)
        Specified by:
        getThumbnail in interface ome.api.ThumbnailStore
      • getThumbnailWithoutDefault

        @Transactional(readOnly=false)
        public byte[] getThumbnailWithoutDefault​(java.lang.Integer sizeX,
                                                 java.lang.Integer sizeY)
        Specified by:
        getThumbnailWithoutDefault in interface ome.api.ThumbnailStore
      • getThumbnailByLongestSide

        @Transactional(readOnly=false)
        public byte[] getThumbnailByLongestSide​(java.lang.Integer size)
        Specified by:
        getThumbnailByLongestSide in interface ome.api.ThumbnailStore
      • getThumbnailDirect

        public byte[] getThumbnailDirect​(java.lang.Integer sizeX,
                                         java.lang.Integer sizeY)
        Specified by:
        getThumbnailDirect in interface ome.api.ThumbnailStore
      • getThumbnailForSectionDirect

        public byte[] getThumbnailForSectionDirect​(int theZ,
                                                   int theT,
                                                   java.lang.Integer sizeX,
                                                   java.lang.Integer sizeY)
        Specified by:
        getThumbnailForSectionDirect in interface ome.api.ThumbnailStore
      • getThumbnailByLongestSideDirect

        public byte[] getThumbnailByLongestSideDirect​(java.lang.Integer size)
        Specified by:
        getThumbnailByLongestSideDirect in interface ome.api.ThumbnailStore
      • getThumbnailForSectionByLongestSideDirect

        public byte[] getThumbnailForSectionByLongestSideDirect​(int theZ,
                                                                int theT,
                                                                java.lang.Integer size)
        Specified by:
        getThumbnailForSectionByLongestSideDirect in interface ome.api.ThumbnailStore
      • thumbnailExists

        public boolean thumbnailExists​(java.lang.Integer sizeX,
                                       java.lang.Integer sizeY)
        Specified by:
        thumbnailExists in interface ome.api.ThumbnailStore
      • resetDefaults

        @Transactional(readOnly=false)
        public void resetDefaults()
        Specified by:
        resetDefaults in interface ome.api.ThumbnailStore
      • isDiskSpaceChecking

        public boolean isDiskSpaceChecking()
      • setDiskSpaceChecking

        public void setDiskSpaceChecking​(boolean diskSpaceChecking)