@Transactional(readOnly=true)
public class RenderingBean
extends java.lang.Object
implements omeis.providers.re.RenderingEngine, java.io.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 FormModifier and Type | Field and Description |
---|---|
protected static java.lang.String |
NULL_RENDERER
Message if the rendering engine is not ready.
|
Constructor and Description |
---|
RenderingBean(ome.io.nio.PixelsService dataService,
LocalCompress compress,
Executor ex,
SecuritySystem secSys,
omeis.providers.re.lut.LutProvider lutProvider)
Compression service Bean injector.
|
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
addCodomainMap(omeis.providers.re.codomain.CodomainMapContext mapCtx)
Deprecated.
|
void |
addCodomainMapToChannel(omeis.providers.re.codomain.CodomainMapContext mapCtx,
int w)
Implemented as specified by the
RenderingEngine interface. |
void |
close() |
protected void |
errorIfInvalidState() |
protected void |
errorIfNullPixels()
Throws an
ApiUsageException if the pixels are not set. |
protected void |
errorIfNullRenderer()
Reloads the rendering engine if
null and has been
made passive or throws an ApiUsageException if the rendering
engine is not set. |
protected void |
errorIfNullRenderingDef()
Throws an
ApiUsageException if the rendering settings are not
set. |
java.util.List |
getAvailableFamilies()
Implemented as specified by the
RenderingEngine interface. |
java.util.List |
getAvailableModels()
Implemented as specified by the
RenderingEngine interface. |
double |
getChannelCurveCoefficient(int w)
Implemented as specified by the
RenderingEngine interface. |
ome.model.enums.Family |
getChannelFamily(int w)
Implemented as specified by the
RenderingEngine interface. |
java.lang.String |
getChannelLookupTable(int w) |
boolean |
getChannelNoiseReduction(int w)
Implemented as specified by the
RenderingEngine interface. |
double[] |
getChannelStats(int w)
Implemented as specified by the
RenderingEngine interface. |
double |
getChannelWindowEnd(int w)
Implemented as specified by the
RenderingEngine interface. |
double |
getChannelWindowStart(int w)
Implemented as specified by the
RenderingEngine interface. |
java.util.List<omeis.providers.re.codomain.CodomainMapContext> |
getCodomainMapContext(int w)
Implemented as specified by the
RenderingEngine interface. |
float |
getCompressionLevel()
Implemented as specified by the
RenderingEngine interface. |
ome.system.EventContext |
getCurrentEventContext()
Implemented as specified by the
RenderingEngine interface. |
int |
getDefaultT()
Implemented as specified by the
RenderingEngine interface. |
int |
getDefaultZ()
Implemented as specified by the
RenderingEngine interface. |
ome.model.enums.RenderingModel |
getModel()
Implemented as specified by the
RenderingEngine interface. |
ome.model.core.Pixels |
getPixels()
Implemented as specified by the
RenderingEngine interface. |
double |
getPixelsTypeLowerBound(int w)
Implemented as specified by the
RenderingEngine interface. |
double |
getPixelsTypeUpperBound(int w)
Implemented as specified by the
RenderingEngine interface. |
ome.model.display.QuantumDef |
getQuantumDef()
Implemented as specified by the
RenderingEngine interface. |
long |
getRenderingDefId() |
java.util.List<java.util.List<java.lang.Integer>> |
getResolutionDescriptions() |
int |
getResolutionLevel() |
int |
getResolutionLevels() |
int[] |
getRGBA(int w)
Implemented as specified by the
RenderingEngine interface. |
java.lang.Class<? extends ome.api.ServiceInterface> |
getServiceInterface()
Returns the service corresponding to this class.
|
int[] |
getTileSize() |
boolean |
isActive(int w)
Implemented as specified by the
RenderingEngine interface. |
boolean |
isPixelsTypeSigned()
Implemented as specified by the
RenderingEngine interface. |
void |
load()
Implemented as specified by the
RenderingEngine interface. |
void |
loadRenderingDef(long renderingDefId)
Implemented as specified by the
RenderingEngine interface. |
void |
lookupPixels(long pixelsId)
Implemented as specified by the
RenderingEngine interface. |
boolean |
lookupRenderingDef(long pixelsId)
Implemented as specified by the
RenderingEngine interface. |
void |
passivate() |
void |
removeCodomainMap(omeis.providers.re.codomain.CodomainMapContext mapCtx)
Deprecated.
|
void |
removeCodomainMapFromChannel(omeis.providers.re.codomain.CodomainMapContext mapCtx,
int w)
Implemented as specified by the
RenderingEngine interface. |
omeis.providers.re.RGBBuffer |
render(omeis.providers.re.data.PlaneDef pd)
Implemented as specified by the
RenderingEngine interface. |
int[] |
renderAsPackedInt(omeis.providers.re.data.PlaneDef pd)
Implemented as specified by the
RenderingEngine interface. |
byte[] |
renderCompressed(omeis.providers.re.data.PlaneDef pd)
Implemented as specified by the
RenderingEngine interface. |
int[] |
renderProjectedAsPackedInt(int algorithm,
int timepoint,
int stepping,
int start,
int end)
Implemented as specified by the
RenderingEngine interface. |
byte[] |
renderProjectedCompressed(int algorithm,
int timepoint,
int stepping,
int start,
int end)
Implemented as specified by the
RenderingEngine interface. |
boolean |
requiresPixelsPyramid() |
long |
resetDefaultSettings(boolean save)
Implemented as specified by the
RenderingEngine interface. |
long |
saveAsNewSettings()
Implemented as specified by the
RenderingEngine interface. |
void |
saveCurrentSettings()
Implemented as specified by the
RenderingEngine interface. |
void |
setActive(int w,
boolean active)
Implemented as specified by the
RenderingEngine interface. |
void |
setChannelLookupTable(int w,
java.lang.String lookup) |
void |
setChannelWindow(int w,
double start,
double end)
Implemented as specified by the
RenderingEngine interface. |
void |
setCodomainInterval(int start,
int end)
Implemented as specified by the
RenderingEngine interface. |
void |
setCompressionLevel(float percentage)
Implemented as specified by the
RenderingEngine interface. |
void |
setDefaultT(int t)
Implemented as specified by the
RenderingEngine interface. |
void |
setDefaultZ(int z)
Implemented as specified by the
RenderingEngine interface. |
void |
setModel(ome.model.enums.RenderingModel model)
Implemented as specified by the
RenderingEngine interface. |
void |
setOverlays(java.util.Map<byte[],java.lang.Integer> overlays)
Deprecated.
As of release 5.1.0, replaced by
PlaneDef.setShapeIds(List) . |
void |
setQuantizationMap(int w,
ome.model.enums.Family family,
double coefficient,
boolean noiseReduction)
Implemented as specified by the
RenderingEngine interface. |
void |
setQuantumStrategy(int bitResolution)
Implemented as specified by the
RenderingEngine interface. |
void |
setResolutionLevel(int resolutionLevel) |
void |
setRGBA(int w,
int red,
int green,
int blue,
int alpha)
Implemented as specified by the
RenderingEngine interface. |
void |
updateCodomainMap(omeis.providers.re.codomain.CodomainMapContext mapCtx)
Deprecated.
|
void |
updateSettings(ome.model.display.RenderingDef settings)
Implemented as specified by the
RenderingEngine interface. |
protected static final java.lang.String NULL_RENDERER
public RenderingBean(ome.io.nio.PixelsService dataService, LocalCompress compress, Executor ex, SecuritySystem secSys, omeis.providers.re.lut.LutProvider lutProvider)
dataService
- The pixels servicecompress
- an ICompress
.ex
- Reference to the executor.secSys
- Reference to the security system.lutProvider
- Reference to the lookup table provider.public java.lang.Class<? extends ome.api.ServiceInterface> getServiceInterface()
public long getRenderingDefId()
getRenderingDefId
in interface omeis.providers.re.RenderingEngine
@Transactional(readOnly=true) public void passivate()
passivate
in interface ome.api.StatefulServiceInterface
@Transactional(readOnly=true) public void activate()
activate
in interface ome.api.StatefulServiceInterface
public void close()
close
in interface ome.api.StatefulServiceInterface
public void lookupPixels(long pixelsId)
RenderingEngine
interface.lookupPixels
in interface omeis.providers.re.RenderingEngine
RenderingEngine.lookupPixels(long)
public boolean lookupRenderingDef(long pixelsId)
RenderingEngine
interface.lookupRenderingDef
in interface omeis.providers.re.RenderingEngine
RenderingEngine.lookupRenderingDef(long)
public void loadRenderingDef(long renderingDefId)
RenderingEngine
interface.loadRenderingDef
in interface omeis.providers.re.RenderingEngine
RenderingEngine.loadRenderingDef(long)
public void load()
RenderingEngine
interface.load
in interface omeis.providers.re.RenderingEngine
RenderingEngine.load()
public void setOverlays(java.util.Map<byte[],java.lang.Integer> overlays)
PlaneDef.setShapeIds(List)
.RenderingEngine
interface.setOverlays
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setOverlays(Map)
public ome.system.EventContext getCurrentEventContext()
RenderingEngine
interface.getCurrentEventContext
in interface ome.api.StatefulServiceInterface
StatefulServiceInterface.getCurrentEventContext()
public omeis.providers.re.RGBBuffer render(omeis.providers.re.data.PlaneDef pd)
RenderingEngine
interface.render
in interface omeis.providers.re.RenderingEngine
RenderingEngine.render(PlaneDef)
public int[] renderAsPackedInt(omeis.providers.re.data.PlaneDef pd)
RenderingEngine
interface.renderAsPackedInt
in interface omeis.providers.re.RenderingEngine
RenderingEngine.render(PlaneDef)
public byte[] renderCompressed(omeis.providers.re.data.PlaneDef pd)
RenderingEngine
interface.renderCompressed
in interface omeis.providers.re.RenderingEngine
LocalCompress.compressToStream(BufferedImage, java.io.OutputStream)
public int[] renderProjectedAsPackedInt(int algorithm, int timepoint, int stepping, int start, int end)
RenderingEngine
interface.renderProjectedAsPackedInt
in interface omeis.providers.re.RenderingEngine
RenderingEngine.renderAsPackedInt(PlaneDef)
public byte[] renderProjectedCompressed(int algorithm, int timepoint, int stepping, int start, int end)
RenderingEngine
interface.renderProjectedCompressed
in interface omeis.providers.re.RenderingEngine
LocalCompress.compressToStream(BufferedImage, java.io.OutputStream)
public long resetDefaultSettings(boolean save)
RenderingEngine
interface.resetDefaultSettings
in interface omeis.providers.re.RenderingEngine
RenderingEngine.resetDefaultSettings(boolean)
public void setCompressionLevel(float percentage)
RenderingEngine
interface.setCompressionLevel
in interface omeis.providers.re.RenderingEngine
LocalCompress.setCompressionLevel(float)
public float getCompressionLevel()
RenderingEngine
interface.getCompressionLevel
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getCompressionLevel()
@Transactional(readOnly=false) public long saveAsNewSettings()
RenderingEngine
interface.saveAsNewSettings
in interface omeis.providers.re.RenderingEngine
RenderingEngine.saveAsNewSettings()
public void updateSettings(ome.model.display.RenderingDef settings)
RenderingEngine
interface.updateSettings
in interface omeis.providers.re.RenderingEngine
RenderingEngine.updateSettings(RenderingDef)
@Transactional(readOnly=false) public void saveCurrentSettings()
RenderingEngine
interface.saveCurrentSettings
in interface omeis.providers.re.RenderingEngine
RenderingEngine.saveCurrentSettings()
public double getChannelCurveCoefficient(int w)
RenderingEngine
interface.getChannelCurveCoefficient
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getChannelCurveCoefficient(int)
public ome.model.enums.Family getChannelFamily(int w)
RenderingEngine
interface.getChannelFamily
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getChannelFamily(int)
public boolean getChannelNoiseReduction(int w)
RenderingEngine
interface.getChannelNoiseReduction
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getChannelNoiseReduction(int)
public double[] getChannelStats(int w)
RenderingEngine
interface.getChannelStats
in interface omeis.providers.re.RenderingEngine
public double getChannelWindowEnd(int w)
RenderingEngine
interface.getChannelWindowEnd
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getChannelWindowEnd(int)
public double getChannelWindowStart(int w)
RenderingEngine
interface.getChannelWindowStart
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getChannelWindowStart(int)
public int[] getRGBA(int w)
RenderingEngine
interface.getRGBA
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getRGBA(int)
public boolean isActive(int w)
RenderingEngine
interface.isActive
in interface omeis.providers.re.RenderingEngine
RenderingEngine.isActive(int)
public java.lang.String getChannelLookupTable(int w)
getChannelLookupTable
in interface omeis.providers.re.RenderingEngine
public void setChannelLookupTable(int w, java.lang.String lookup)
setChannelLookupTable
in interface omeis.providers.re.RenderingEngine
public int getDefaultT()
RenderingEngine
interface.getDefaultT
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getDefaultT()
public int getDefaultZ()
RenderingEngine
interface.getDefaultZ
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getDefaultZ()
public ome.model.enums.RenderingModel getModel()
RenderingEngine
interface.getModel
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getModel()
public ome.model.display.QuantumDef getQuantumDef()
RenderingEngine
interface.getQuantumDef
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getQuantumDef()
public ome.model.core.Pixels getPixels()
RenderingEngine
interface.getPixels
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getPixels()
public java.util.List getAvailableModels()
RenderingEngine
interface.getAvailableModels
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getAvailableModels()
public java.util.List getAvailableFamilies()
RenderingEngine
interface.getAvailableFamilies
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getAvailableFamilies()
@Deprecated public void addCodomainMap(omeis.providers.re.codomain.CodomainMapContext mapCtx)
RenderingEngine
interface.addCodomainMap
in interface omeis.providers.re.RenderingEngine
public void addCodomainMapToChannel(omeis.providers.re.codomain.CodomainMapContext mapCtx, int w)
RenderingEngine
interface.addCodomainMapToChannel
in interface omeis.providers.re.RenderingEngine
@Deprecated public void removeCodomainMap(omeis.providers.re.codomain.CodomainMapContext mapCtx)
RenderingEngine
interface.removeCodomainMap
in interface omeis.providers.re.RenderingEngine
public void removeCodomainMapFromChannel(omeis.providers.re.codomain.CodomainMapContext mapCtx, int w)
RenderingEngine
interface.removeCodomainMapFromChannel
in interface omeis.providers.re.RenderingEngine
@Deprecated public void updateCodomainMap(omeis.providers.re.codomain.CodomainMapContext mapCtx)
RenderingEngine
interface.updateCodomainMap
in interface omeis.providers.re.RenderingEngine
public void setActive(int w, boolean active)
RenderingEngine
interface.setActive
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setActive(int, boolean)
public void setChannelWindow(int w, double start, double end)
RenderingEngine
interface.setChannelWindow
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setChannelWindow(int, double, double)
public void setCodomainInterval(int start, int end)
RenderingEngine
interface.setCodomainInterval
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setCodomainInterval(int, int)
public void setDefaultT(int t)
RenderingEngine
interface.setDefaultT
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setDefaultT(int)
public void setDefaultZ(int z)
RenderingEngine
interface.setDefaultZ
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setDefaultZ(int)
public void setModel(ome.model.enums.RenderingModel model)
RenderingEngine
interface.setModel
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setModel(RenderingModel)
public void setQuantizationMap(int w, ome.model.enums.Family family, double coefficient, boolean noiseReduction)
RenderingEngine
interface.setQuantizationMap
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setQuantizationMap(int, Family, double, boolean)
public void setQuantumStrategy(int bitResolution)
RenderingEngine
interface.setQuantumStrategy
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setQuantumStrategy(int)
public void setRGBA(int w, int red, int green, int blue, int alpha)
RenderingEngine
interface.setRGBA
in interface omeis.providers.re.RenderingEngine
RenderingEngine.setRGBA(int, int, int, int, int)
public boolean isPixelsTypeSigned()
RenderingEngine
interface.isPixelsTypeSigned
in interface omeis.providers.re.RenderingEngine
RenderingEngine.isPixelsTypeSigned()
public double getPixelsTypeLowerBound(int w)
RenderingEngine
interface.getPixelsTypeLowerBound
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getPixelsTypeLowerBound(int)
public int getResolutionLevel()
getResolutionLevel
in interface omeis.providers.re.RenderingEngine
public int getResolutionLevels()
getResolutionLevels
in interface omeis.providers.re.RenderingEngine
public java.util.List<java.util.List<java.lang.Integer>> getResolutionDescriptions()
getResolutionDescriptions
in interface omeis.providers.re.RenderingEngine
public int[] getTileSize()
getTileSize
in interface omeis.providers.re.RenderingEngine
public boolean requiresPixelsPyramid()
requiresPixelsPyramid
in interface omeis.providers.re.RenderingEngine
public void setResolutionLevel(int resolutionLevel)
setResolutionLevel
in interface omeis.providers.re.RenderingEngine
public double getPixelsTypeUpperBound(int w)
RenderingEngine
interface.getPixelsTypeUpperBound
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getPixelsTypeUpperBound(int)
public java.util.List<omeis.providers.re.codomain.CodomainMapContext> getCodomainMapContext(int w)
RenderingEngine
interface.getCodomainMapContext
in interface omeis.providers.re.RenderingEngine
RenderingEngine.getCodomainMapContext(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.