|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.services.RenderingBean
@Transactional(readOnly=true) public class RenderingBean
Provides the 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 FormField Summary | |
---|---|
protected static String |
NULL_RENDERER
|
Constructor Summary | |
---|---|
RenderingBean(PixelsService dataService,
LocalCompress compress,
OriginalFileMetadataProvider provider,
Executor ex,
SecuritySystem secSys)
Compression service Bean injector. |
Method Summary | |
---|---|
void |
activate()
Completely restore this service for active use from whatever passivation it has implemented. |
void |
addCodomainMap(CodomainMapContext mapCtx)
Implemented as specified by the RenderingEngine interface. |
void |
close()
signals the end of the service lifecycle. |
protected void |
errorIfInvalidState()
|
protected void |
errorIfNullPixels()
|
protected void |
errorIfNullRenderer()
|
protected void |
errorIfNullRenderingDef()
|
List |
getAvailableFamilies()
Implemented as specified by the RenderingEngine interface. |
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. |
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. |
float |
getCompressionLevel()
Implemented as specified by the RenderingEngine interface. |
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. |
int[] |
getRGBA(int w)
Implemented as specified by the RenderingEngine interface. |
Class<? extends ServiceInterface> |
getServiceInterface()
|
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()
Perform whatever passivation is possible or throw an exception. |
void |
removeCodomainMap(CodomainMapContext mapCtx)
Implemented as specified by the RenderingEngine interface. |
RGBBuffer |
render(PlaneDef pd)
Implemented as specified by the RenderingEngine interface. |
int[] |
renderAsPackedInt(PlaneDef pd)
Implemented as specified by the RenderingEngine interface. |
int[] |
renderAsPackedIntAsRGBA(PlaneDef pd)
Implemented as specified by the RenderingEngine interface. |
byte[] |
renderCompressed(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. |
void |
resetDefaults()
Implemented as specified by the RenderingEngine interface. |
void |
resetDefaultsNoSave()
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 |
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(Map<byte[],Integer> overlays)
Implemented as specified by the RenderingEngine interface. |
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 |
setRGBA(int w,
int red,
int green,
int blue,
int alpha)
Implemented as specified by the RenderingEngine interface. |
void |
updateCodomainMap(CodomainMapContext mapCtx)
Implemented as specified by the RenderingEngine interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String NULL_RENDERER
Constructor Detail |
---|
public RenderingBean(PixelsService dataService, LocalCompress compress, OriginalFileMetadataProvider provider, Executor ex, SecuritySystem secSys)
compressionService
- an ICompress
.Method Detail |
---|
public Class<? extends ServiceInterface> getServiceInterface()
@Transactional(readOnly=true) public void passivate()
StatefulServiceInterface
passivate
in interface StatefulServiceInterface
@Transactional(readOnly=true) public void activate()
StatefulServiceInterface
activate
in interface StatefulServiceInterface
public void close()
StatefulServiceInterface
close
in interface StatefulServiceInterface
public void lookupPixels(long pixelsId)
RenderingEngine
interface.
lookupPixels
in interface RenderingEngine
pixelsId
- The pixels set ID.RenderingEngine.lookupPixels(long)
public boolean lookupRenderingDef(long pixelsId)
RenderingEngine
interface.
lookupRenderingDef
in interface RenderingEngine
pixelsId
- 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 RenderingEngine
renderingDefId
- The rendering definition ID.RenderingEngine.loadRenderingDef(long)
public void load()
RenderingEngine
interface.
load
in interface RenderingEngine
RenderingEngine.load()
public void setOverlays(Map<byte[],Integer> overlays)
RenderingEngine
interface.
setOverlays
in interface RenderingEngine
overlays
- Binary mask to color map.RenderingEngine#setOverlays()
public EventContext getCurrentEventContext()
RenderingEngine
interface. TODO
getCurrentEventContext
in interface StatefulServiceInterface
StatefulServiceInterface.getCurrentEventContext()
public RGBBuffer render(PlaneDef pd)
RenderingEngine
interface.
render
in interface RenderingEngine
pd
- 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 RenderingEngine
pd
- Selects a plane orthogonal to one of the X, Y,
or Z axes.
RenderingEngine.render(PlaneDef)
public int[] renderAsPackedIntAsRGBA(PlaneDef pd)
RenderingEngine
interface.
renderAsPackedIntAsRGBA
in interface RenderingEngine
pd
- 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 RenderingEngine
pd
- Selects a plane orthogonal to one of the X, Y,
or Z axes.
RenderingEngine#renderCompressed()
public int[] renderProjectedAsPackedInt(int algorithm, int timepoint, int stepping, int start, int end)
RenderingEngine
interface.
renderProjectedAsPackedInt
in interface RenderingEngine
algorithm
- 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#renderProjectedAsPackedInt()
public byte[] renderProjectedCompressed(int algorithm, int timepoint, int stepping, int start, int end)
RenderingEngine
interface.
renderProjectedCompressed
in interface RenderingEngine
algorithm
- 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#renderProjectedCompressed()
public void resetDefaults()
RenderingEngine
interface.
resetDefaults
in interface RenderingEngine
RenderingEngine.resetDefaults()
public void resetDefaultsNoSave()
RenderingEngine
interface.
resetDefaultsNoSave
in interface RenderingEngine
RenderingEngine.resetDefaults()
public void setCompressionLevel(float percentage)
RenderingEngine
interface.
setCompressionLevel
in interface RenderingEngine
percentage
- A percentage compression level from 1.00 (100%) to
0.01 (1%).RenderingEngine#setCompressionLevel()
public float getCompressionLevel()
RenderingEngine
interface.
getCompressionLevel
in interface RenderingEngine
RenderingEngine.getCompressionLevel()
@Transactional(readOnly=false) public void saveCurrentSettings()
RenderingEngine
interface.
saveCurrentSettings
in interface RenderingEngine
RenderingEngine.saveCurrentSettings()
public double getChannelCurveCoefficient(int w)
RenderingEngine
interface.
getChannelCurveCoefficient
in interface RenderingEngine
w
- The channel index.
RenderingEngine.getChannelCurveCoefficient(int)
public ome.model.enums.Family getChannelFamily(int w)
RenderingEngine
interface.
getChannelFamily
in interface RenderingEngine
w
- The channel index.
RenderingEngine.getChannelFamily(int)
public boolean getChannelNoiseReduction(int w)
RenderingEngine
interface.
getChannelNoiseReduction
in interface RenderingEngine
w
- The channel index.
RenderingEngine.getChannelNoiseReduction(int)
public double[] getChannelStats(int w)
RenderingEngine
interface.
getChannelStats
in interface RenderingEngine
public double getChannelWindowEnd(int w)
RenderingEngine
interface.
getChannelWindowEnd
in interface RenderingEngine
w
- The channel index.
RenderingEngine.getChannelWindowEnd(int)
public double getChannelWindowStart(int w)
RenderingEngine
interface.
getChannelWindowStart
in interface RenderingEngine
w
- The channel index.
RenderingEngine.getChannelWindowStart(int)
public int[] getRGBA(int w)
RenderingEngine
interface.
getRGBA
in interface RenderingEngine
w
- The channel index.
RenderingEngine.getRGBA(int)
public boolean isActive(int w)
RenderingEngine
interface.
isActive
in interface RenderingEngine
w
- The channel index.
RenderingEngine.isActive(int)
public int getDefaultT()
RenderingEngine
interface.
getDefaultT
in interface RenderingEngine
RenderingEngine.getDefaultT()
public int getDefaultZ()
RenderingEngine
interface.
getDefaultZ
in interface RenderingEngine
RenderingEngine.getDefaultZ()
public ome.model.enums.RenderingModel getModel()
RenderingEngine
interface.
getModel
in interface RenderingEngine
RenderingEngine.getModel()
public ome.model.display.QuantumDef getQuantumDef()
RenderingEngine
interface.
getQuantumDef
in interface RenderingEngine
RenderingEngine.getQuantumDef()
public ome.model.core.Pixels getPixels()
RenderingEngine
interface.
getPixels
in interface RenderingEngine
RenderingEngine.getPixels()
public List getAvailableModels()
RenderingEngine
interface.
getAvailableModels
in interface RenderingEngine
RenderingEngine.getAvailableModels()
public List getAvailableFamilies()
RenderingEngine
interface.
getAvailableFamilies
in interface RenderingEngine
RenderingEngine.getAvailableFamilies()
public void addCodomainMap(CodomainMapContext mapCtx)
RenderingEngine
interface.
addCodomainMap
in interface RenderingEngine
mapCtx
- The context to add.RenderingEngine.updateCodomainMap(CodomainMapContext)
,
RenderingEngine.removeCodomainMap(CodomainMapContext)
public void removeCodomainMap(CodomainMapContext mapCtx)
RenderingEngine
interface.
removeCodomainMap
in interface RenderingEngine
mapCtx
- The context to remove.RenderingEngine.addCodomainMap(CodomainMapContext)
,
RenderingEngine.updateCodomainMap(CodomainMapContext)
public void updateCodomainMap(CodomainMapContext mapCtx)
RenderingEngine
interface.
updateCodomainMap
in interface RenderingEngine
mapCtx
- The context to update.RenderingEngine.addCodomainMap(CodomainMapContext)
,
RenderingEngine.removeCodomainMap(CodomainMapContext)
public void setActive(int w, boolean active)
RenderingEngine
interface.
setActive
in interface RenderingEngine
w
- 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 RenderingEngine
w
- 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 RenderingEngine
start
- 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 RenderingEngine
t
- The value to set.RenderingEngine.setDefaultT(int)
public void setDefaultZ(int z)
RenderingEngine
interface.
setDefaultZ
in interface RenderingEngine
z
- The value to set.RenderingEngine.setDefaultZ(int)
public void setModel(ome.model.enums.RenderingModel model)
RenderingEngine
interface.
setModel
in interface RenderingEngine
model
- Identifies the color space model.RenderingEngine.setModel(RenderingModel)
public void setQuantizationMap(int w, ome.model.enums.Family family, double coefficient, boolean noiseReduction)
RenderingEngine
interface.
setQuantizationMap
in interface RenderingEngine
w
- 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 RenderingEngine
bitResolution
- 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 RenderingEngine
w
- 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 RenderingEngine
RenderingEngine.isPixelsTypeSigned()
public double getPixelsTypeLowerBound(int w)
RenderingEngine
interface.
getPixelsTypeLowerBound
in interface RenderingEngine
w
- The channel index.
RenderingEngine.getPixelsTypeLowerBound(int)
public double getPixelsTypeUpperBound(int w)
RenderingEngine
interface.
getPixelsTypeUpperBound
in interface RenderingEngine
w
- The channel index.
RenderingEngine.getPixelsTypeUpperBound(int)
protected void errorIfInvalidState()
protected void errorIfNullPixels()
protected void errorIfNullRenderingDef()
protected void errorIfNullRenderer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.2.0-r7571-b29
Copyright © 2009 The University of Dundee. All Rights Reserved.