@Transactional(readOnly=true) public class RenderingBean extends Object implements RenderingEngine, Serializable
RenderingEngine service. This class is an Adapter to
 wrap the Renderer so to make it thread-safe.
 
 The multi-threaded design of this component is based on dynamic locking and
 confinement techniques. All access to the component's internal parts happens
 through a RenderingEngineImpl object, which is fully
 synchronized. Internal parts are either never leaked out or given away only
 if read-only objects. (The only exception are the CodomainMapContext
 objects which are not read-only but are copied upon every method invocation
 so to maintain safety.)
 
 Finally the RenderingEngine component doesn't make use of constructs
 that could compromise liveness.
 
RenderingEngine, 
Serialized Form| Modifier and Type | Field and Description | 
|---|---|
| protected static String | NULL_RENDERERMessage if the rendering engine is not ready. | 
| Constructor and Description | 
|---|
| RenderingBean(PixelsService dataService,
             LocalCompress compress,
             Executor ex,
             SecuritySystem secSys)Compression service Bean injector. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | activate()Completely restore this service for active use from whatever
 passivation it has implemented. | 
| void | addCodomainMap(CodomainMapContext mapCtx)Implemented as specified by the  RenderingEngineinterface. | 
| void | close()signals the end of the service lifecycle. | 
| protected void | errorIfInvalidState() | 
| protected void | errorIfNullPixels()Throws an  ApiUsageExceptionif the pixels are not set. | 
| protected void | errorIfNullRenderer()Reloads the rendering engine if  nulland has been 
 made passive or throws anApiUsageExceptionif the rendering
 engine is not set. | 
| protected void | errorIfNullRenderingDef()Throws an  ApiUsageExceptionif the rendering settings are not 
 set. | 
| List | getAvailableFamilies()Implemented as specified by the  RenderingEngineinterface. | 
| List | getAvailableModels()Implemented as specified by the  RenderingEngineinterface. | 
| double | getChannelCurveCoefficient(int w)Implemented as specified by the  RenderingEngineinterface. | 
| Family | getChannelFamily(int w)Implemented as specified by the  RenderingEngineinterface. | 
| String | getChannelLookupTable(int w) | 
| boolean | getChannelNoiseReduction(int w)Implemented as specified by the  RenderingEngineinterface. | 
| double[] | getChannelStats(int w)Implemented as specified by the  RenderingEngineinterface. | 
| double | getChannelWindowEnd(int w)Implemented as specified by the  RenderingEngineinterface. | 
| double | getChannelWindowStart(int w)Implemented as specified by the  RenderingEngineinterface. | 
| float | getCompressionLevel()Implemented as specified by the  RenderingEngineinterface. | 
| EventContext | getCurrentEventContext()Implemented as specified by the  RenderingEngineinterface. | 
| int | getDefaultT()Implemented as specified by the  RenderingEngineinterface. | 
| int | getDefaultZ()Implemented as specified by the  RenderingEngineinterface. | 
| RenderingModel | getModel()Implemented as specified by the  RenderingEngineinterface. | 
| Pixels | getPixels()Implemented as specified by the  RenderingEngineinterface. | 
| double | getPixelsTypeLowerBound(int w)Implemented as specified by the  RenderingEngineinterface. | 
| double | getPixelsTypeUpperBound(int w)Implemented as specified by the  RenderingEngineinterface. | 
| QuantumDef | getQuantumDef()Implemented as specified by the  RenderingEngineinterface. | 
| long | getRenderingDefId()Returns the id of the  RenderingDefloaded by
 eitherRenderingEngine.lookupRenderingDef(long)orRenderingEngine.loadRenderingDef(long). | 
| List<List<Integer>> | getResolutionDescriptions() | 
| int | getResolutionLevel() | 
| int | getResolutionLevels() | 
| int[] | getRGBA(int w)Implemented as specified by the  RenderingEngineinterface. | 
| Class<? extends ServiceInterface> | getServiceInterface()Returns the service corresponding to this class. | 
| int[] | getTileSize() | 
| boolean | isActive(int w)Implemented as specified by the  RenderingEngineinterface. | 
| boolean | isPixelsTypeSigned()Implemented as specified by the  RenderingEngineinterface. | 
| void | load()Implemented as specified by the  RenderingEngineinterface. | 
| void | loadRenderingDef(long renderingDefId)Implemented as specified by the  RenderingEngineinterface. | 
| void | lookupPixels(long pixelsId)Implemented as specified by the  RenderingEngineinterface. | 
| boolean | lookupRenderingDef(long pixelsId)Implemented as specified by the  RenderingEngineinterface. | 
| void | passivate()Perform whatever passivation is possible or throw an exception. | 
| void | removeCodomainMap(CodomainMapContext mapCtx)Implemented as specified by the  RenderingEngineinterface. | 
| RGBBuffer | render(PlaneDef pd)Implemented as specified by the  RenderingEngineinterface. | 
| int[] | renderAsPackedInt(PlaneDef pd)Implemented as specified by the  RenderingEngineinterface. | 
| byte[] | renderCompressed(PlaneDef pd)Implemented as specified by the  RenderingEngineinterface. | 
| int[] | renderProjectedAsPackedInt(int algorithm,
                          int timepoint,
                          int stepping,
                          int start,
                          int end)Implemented as specified by the  RenderingEngineinterface. | 
| byte[] | renderProjectedCompressed(int algorithm,
                         int timepoint,
                         int stepping,
                         int start,
                         int end)Implemented as specified by the  RenderingEngineinterface. | 
| boolean | requiresPixelsPyramid() | 
| long | resetDefaultSettings(boolean save)Implemented as specified by the  RenderingEngineinterface. | 
| long | saveAsNewSettings()Implemented as specified by the  RenderingEngineinterface. | 
| void | saveCurrentSettings()Implemented as specified by the  RenderingEngineinterface. | 
| void | setActive(int w,
         boolean active)Implemented as specified by the  RenderingEngineinterface. | 
| void | setChannelLookupTable(int w,
                     String lookup) | 
| void | setChannelWindow(int w,
                double start,
                double end)Implemented as specified by the  RenderingEngineinterface. | 
| void | setCodomainInterval(int start,
                   int end)Implemented as specified by the  RenderingEngineinterface. | 
| void | setCompressionLevel(float percentage)Implemented as specified by the  RenderingEngineinterface. | 
| void | setDefaultT(int t)Implemented as specified by the  RenderingEngineinterface. | 
| void | setDefaultZ(int z)Implemented as specified by the  RenderingEngineinterface. | 
| void | setModel(RenderingModel model)Implemented as specified by the  RenderingEngineinterface. | 
| void | setOverlays(Map<byte[],Integer> overlays)Deprecated. 
 As of release 5.1.0, replaced by
  PlaneDef.setShapeIds(List). | 
| void | setQuantizationMap(int w,
                  Family family,
                  double coefficient,
                  boolean noiseReduction)Implemented as specified by the  RenderingEngineinterface. | 
| void | setQuantumStrategy(int bitResolution)Implemented as specified by the  RenderingEngineinterface. | 
| void | setResolutionLevel(int resolutionLevel) | 
| void | setRGBA(int w,
       int red,
       int green,
       int blue,
       int alpha)Implemented as specified by the  RenderingEngineinterface. | 
| void | updateCodomainMap(CodomainMapContext mapCtx)Implemented as specified by the  RenderingEngineinterface. | 
protected static final String NULL_RENDERER
public RenderingBean(PixelsService dataService, LocalCompress compress, Executor ex, SecuritySystem secSys)
dataService - The pixels servicecompress - an ICompress.ex - Reference to the executor.secSys - Reference to the security system.public Class<? extends ServiceInterface> getServiceInterface()
public long getRenderingDefId()
RenderingEngineRenderingDef loaded by
 either RenderingEngine.lookupRenderingDef(long) or
 RenderingEngine.loadRenderingDef(long).getRenderingDefId in interface RenderingEngine@Transactional(readOnly=true) public void passivate()
StatefulServiceInterfacepassivate in interface StatefulServiceInterface@Transactional(readOnly=true) public void activate()
StatefulServiceInterfaceactivate in interface StatefulServiceInterfacepublic void close()
StatefulServiceInterfaceclose in interface StatefulServiceInterfacepublic void lookupPixels(long pixelsId)
RenderingEngine interface.lookupPixels in interface RenderingEnginepixelsId - The pixels set ID.RenderingEngine.lookupPixels(long)public boolean lookupRenderingDef(long pixelsId)
RenderingEngine interface.lookupRenderingDef in interface RenderingEnginepixelsId - The pixels set ID.true if a RenderingDef exists for the
 Pixels set, otherwise false.RenderingEngine.lookupRenderingDef(long)public void loadRenderingDef(long renderingDefId)
RenderingEngine interface.loadRenderingDef in interface RenderingEnginerenderingDefId - The rendering definition ID.RenderingEngine.loadRenderingDef(long)public void load()
RenderingEngine interface.load in interface RenderingEngineRenderingEngine.load()public void setOverlays(Map<byte[],Integer> overlays)
PlaneDef.setShapeIds(List).RenderingEngine interface.setOverlays in interface RenderingEngineoverlays - Binary mask to color map.RenderingEngine.setOverlays(Map)public EventContext getCurrentEventContext()
RenderingEngine interface.getCurrentEventContext in interface StatefulServiceInterfaceStatefulServiceInterface.getCurrentEventContext()public RGBBuffer render(PlaneDef pd)
RenderingEngine interface.render in interface RenderingEnginepd - Selects a plane orthogonal to one of the X, Y,
            or Z axes.RenderingEngine.render(PlaneDef)public int[] renderAsPackedInt(PlaneDef pd)
RenderingEngine interface.renderAsPackedInt in interface RenderingEnginepd - Selects a plane orthogonal to one of the X, Y,
            or Z axes.RenderingEngine.render(PlaneDef)public byte[] renderCompressed(PlaneDef pd)
RenderingEngine interface.renderCompressed in interface RenderingEnginepd - Selects a plane orthogonal to one of the X, Y,
            or Z axes.LocalCompress.compressToStream(BufferedImage, java.io.OutputStream)public int[] renderProjectedAsPackedInt(int algorithm,
                                        int timepoint,
                                        int stepping,
                                        int start,
                                        int end)
RenderingEngine interface.renderProjectedAsPackedInt in interface RenderingEnginealgorithm - IProjection.MAXIMUM_INTENSITY,
 IProjection.MEAN_INTENSITY or
 IProjection.SUM_INTENSITY.stepping - Stepping value to use while calculating the projection.
 For example, stepping=1 will use every optical section from
 start to end where stepping=2 will
 use every other section from start to end to
 perform the projection.start - Optical section to start projecting from.end - Optical section to finish projecting.RenderingEngine.renderAsPackedInt(PlaneDef)public byte[] renderProjectedCompressed(int algorithm,
                                        int timepoint,
                                        int stepping,
                                        int start,
                                        int end)
RenderingEngine interface.renderProjectedCompressed in interface RenderingEnginealgorithm - IProjection.MAXIMUM_INTENSITY,
 IProjection.MEAN_INTENSITY or
 IProjection.SUM_INTENSITY.stepping - Stepping value to use while calculating the projection.
 For example, stepping=1 will use every optical section from
 start to end where stepping=2 will
 use every other section from start to end to
 perform the projection.start - Optical section to start projecting from.end - Optical section to finish projecting.LocalCompress.compressToStream(BufferedImage, java.io.OutputStream)public long resetDefaultSettings(boolean save)
RenderingEngine interface.resetDefaultSettings in interface RenderingEnginesave - Pass true to save the settings,
             false otherwise.RenderingEngine.resetDefaultSettings(boolean)public void setCompressionLevel(float percentage)
RenderingEngine interface.setCompressionLevel in interface RenderingEnginepercentage - A percentage compression level from 1.00 (100%) to 
 0.01 (1%).LocalCompress.setCompressionLevel(float)public float getCompressionLevel()
RenderingEngine interface.getCompressionLevel in interface RenderingEngineRenderingEngine.getCompressionLevel()@Transactional(readOnly=false) public long saveAsNewSettings()
RenderingEngine interface.saveAsNewSettings in interface RenderingEngineRenderingEngine.saveAsNewSettings()@Transactional(readOnly=false) public void saveCurrentSettings()
RenderingEngine interface.saveCurrentSettings in interface RenderingEngineRenderingEngine.saveCurrentSettings()public double getChannelCurveCoefficient(int w)
RenderingEngine interface.getChannelCurveCoefficient in interface RenderingEnginew - The channel index.RenderingEngine.getChannelCurveCoefficient(int)public Family getChannelFamily(int w)
RenderingEngine interface.getChannelFamily in interface RenderingEnginew - The channel index.RenderingEngine.getChannelFamily(int)public boolean getChannelNoiseReduction(int w)
RenderingEngine interface.getChannelNoiseReduction in interface RenderingEnginew - The channel index.RenderingEngine.getChannelNoiseReduction(int)public double[] getChannelStats(int w)
RenderingEngine interface.getChannelStats in interface RenderingEnginepublic double getChannelWindowEnd(int w)
RenderingEngine interface.getChannelWindowEnd in interface RenderingEnginew - The channel index.RenderingEngine.getChannelWindowEnd(int)public double getChannelWindowStart(int w)
RenderingEngine interface.getChannelWindowStart in interface RenderingEnginew - The channel index.RenderingEngine.getChannelWindowStart(int)public int[] getRGBA(int w)
RenderingEngine interface.getRGBA in interface RenderingEnginew - The channel index.RenderingEngine.getRGBA(int)public boolean isActive(int w)
RenderingEngine interface.isActive in interface RenderingEnginew - The channel index.RenderingEngine.isActive(int)public String getChannelLookupTable(int w)
getChannelLookupTable in interface RenderingEnginepublic void setChannelLookupTable(int w,
                                  String lookup)
setChannelLookupTable in interface RenderingEnginepublic int getDefaultT()
RenderingEngine interface.getDefaultT in interface RenderingEngineRenderingEngine.getDefaultT()public int getDefaultZ()
RenderingEngine interface.getDefaultZ in interface RenderingEngineRenderingEngine.getDefaultZ()public RenderingModel getModel()
RenderingEngine interface.getModel in interface RenderingEngineRenderingEngine.getModel()public QuantumDef getQuantumDef()
RenderingEngine interface.getQuantumDef in interface RenderingEngineRenderingEngine.getQuantumDef()public Pixels getPixels()
RenderingEngine interface.getPixels in interface RenderingEngineRenderingEngine.getPixels()public List getAvailableModels()
RenderingEngine interface.getAvailableModels in interface RenderingEngineRenderingEngine.getAvailableModels()public List getAvailableFamilies()
RenderingEngine interface.getAvailableFamilies in interface RenderingEngineRenderingEngine.getAvailableFamilies()public void addCodomainMap(CodomainMapContext mapCtx)
RenderingEngine interface.addCodomainMap in interface RenderingEnginemapCtx - The context to add.RenderingEngine.updateCodomainMap(CodomainMapContext), 
RenderingEngine.removeCodomainMap(CodomainMapContext)public void removeCodomainMap(CodomainMapContext mapCtx)
RenderingEngine interface.removeCodomainMap in interface RenderingEnginemapCtx - The context to remove.RenderingEngine.addCodomainMap(CodomainMapContext), 
RenderingEngine.updateCodomainMap(CodomainMapContext)public void updateCodomainMap(CodomainMapContext mapCtx)
RenderingEngine interface.updateCodomainMap in interface RenderingEnginemapCtx - The context to update.RenderingEngine.addCodomainMap(CodomainMapContext), 
RenderingEngine.removeCodomainMap(CodomainMapContext)public void setActive(int w,
                      boolean active)
RenderingEngine interface.setActive in interface RenderingEnginew - The channel index.active - Pass true to map the channel,
            false otherwise.RenderingEngine.setActive(int, boolean)public void setChannelWindow(int w,
                             double start,
                             double end)
RenderingEngine interface.setChannelWindow in interface RenderingEnginew - The channel index.start - The lower bound of the interval.end - The upper bound of the interval.RenderingEngine.setChannelWindow(int, double, double)public void setCodomainInterval(int start,
                                int end)
RenderingEngine interface.setCodomainInterval in interface RenderingEnginestart - The lower bound of the interval.end - The upper bound of the interval.RenderingEngine.setCodomainInterval(int, int)public void setDefaultT(int t)
RenderingEngine interface.setDefaultT in interface RenderingEnginet - The value to set.RenderingEngine.setDefaultT(int)public void setDefaultZ(int z)
RenderingEngine interface.setDefaultZ in interface RenderingEnginez - The value to set.RenderingEngine.setDefaultZ(int)public void setModel(RenderingModel model)
RenderingEngine interface.setModel in interface RenderingEnginemodel - Identifies the color space model.RenderingEngine.setModel(RenderingModel)public void setQuantizationMap(int w,
                               Family family,
                               double coefficient,
                               boolean noiseReduction)
RenderingEngine interface.setQuantizationMap in interface RenderingEnginew - The channel index.family - The mapping family.coefficient - The coefficient identifying a curve in the family.noiseReduction - Pass true to turn the noise reduction algorithm
            on, false otherwise.RenderingEngine.setQuantizationMap(int, Family, double, boolean)public void setQuantumStrategy(int bitResolution)
RenderingEngine interface.setQuantumStrategy in interface RenderingEnginebitResolution - The bit resolution defining associated to the strategy.RenderingEngine.setQuantumStrategy(int)public void setRGBA(int w,
                    int red,
                    int green,
                    int blue,
                    int alpha)
RenderingEngine interface.setRGBA in interface RenderingEnginew - The channel index.red - The red component. A value between 0 and 255.green - The green component. A value between 0 and 255.blue - The blue component. A value between 0 and 255.alpha - The alpha component. A value between 0 and 255.RenderingEngine.setRGBA(int, int, int, int, int)public boolean isPixelsTypeSigned()
RenderingEngine interface.isPixelsTypeSigned in interface RenderingEngineRenderingEngine.isPixelsTypeSigned()public double getPixelsTypeLowerBound(int w)
RenderingEngine interface.getPixelsTypeLowerBound in interface RenderingEnginew - The channel index.RenderingEngine.getPixelsTypeLowerBound(int)public int getResolutionLevel()
getResolutionLevel in interface RenderingEnginepublic int getResolutionLevels()
getResolutionLevels in interface RenderingEnginepublic List<List<Integer>> getResolutionDescriptions()
getResolutionDescriptions in interface RenderingEnginepublic int[] getTileSize()
getTileSize in interface RenderingEnginepublic boolean requiresPixelsPyramid()
requiresPixelsPyramid in interface RenderingEnginepublic void setResolutionLevel(int resolutionLevel)
setResolutionLevel in interface RenderingEnginepublic double getPixelsTypeUpperBound(int w)
RenderingEngine interface.getPixelsTypeUpperBound in interface RenderingEnginew - The channel index.RenderingEngine.getPixelsTypeUpperBound(int)protected void errorIfInvalidState()
protected void errorIfNullPixels()
ApiUsageException if the pixels are not set.protected void errorIfNullRenderingDef()
ApiUsageException if the rendering settings are not 
 set.protected void errorIfNullRenderer()
null and has been 
 made passive or throws an ApiUsageException if the rendering
 engine is not set.
                
                
Version: 5.2.6-ice35-b35
Copyright © 2016 The University of Dundee & Open Microscopy Environment. All Rights Reserved.