|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectomeis.providers.re.quantum.QuantumStrategy
public abstract class QuantumStrategy
Subclasses Work on explicit pixel types. Taking into
account the pixel types, transform the pixel intensity value passed to
quantize(double)
by delegating to the configured quantum map. Encapsulate a
computation strategy for the quantization process i.e. LUT and Approximation.
Implement onWindowChange()
to get notified when the input interval
changes.
Field Summary | |
---|---|
static int |
DECILE
Determines the number of sub-intervals of the [globalMin, globalMax] interval. |
static int |
MAX
Maximum value ( 255 ) allowed for the upper bound of the
codomain interval. |
static int |
MIN
Minimum value ( 0 ) allowed for the lower bound of the
codomain interval. |
protected ome.model.display.QuantumDef |
qDef
Reference to a quantumDef object. |
protected ome.model.enums.PixelsType |
type
The type of pixels this strategy is for. |
protected QuantumMap |
valueMapper
Reference to the value mapper. |
Constructor Summary | |
---|---|
protected |
QuantumStrategy(ome.model.display.QuantumDef qd,
ome.model.enums.PixelsType pt)
Creates a new instance. |
Method Summary | |
---|---|
double |
getCurveCoefficient()
Returns the coefficient identifying a curve within a given family. |
ome.model.enums.Family |
getFamily()
Returns the mapping family. |
double |
getGlobalMax()
Returns the maximum of all maxima. |
double |
getGlobalMin()
Returns the minimum of all minima. |
boolean |
getNoiseReduction()
Returns true if the noise reduction algorithm
is turned on, false if turned off. |
double |
getOriginalGlobalMax()
Returns the original maximum of all minima. |
double |
getOriginalGlobalMin()
Returns the original minimum of all minima. |
double |
getPixelsTypeMax()
Returns the upper bound of the pixels range or 0
if the value couldn't be set. |
double |
getPixelsTypeMin()
Returns the lower bound of the pixels range or 0
if the value couldn't be set. |
double |
getWindowEnd()
Returns the upper bound of the input interval. |
double |
getWindowStart()
Returns the lower bound of the input interval. |
protected abstract void |
onWindowChange()
Notifies when the input interval has changed or the mapping strategy has changed. |
abstract int |
quantize(double value)
Maps a value from [windowStart, windowEnd] to a value in the codomain interval. |
void |
setExtent(double globalMin,
double globalMax)
Sets the maximum range of the input window. |
void |
setMap(QuantumMap qMap)
Sets the quantum map. |
void |
setMapping(ome.model.enums.Family family,
double k,
boolean noiseReduction)
Sets the selected family, the curve coefficient and the noise reduction flag. |
void |
setQuantizationMap(ome.model.enums.Family family,
double k,
boolean noiseReduction)
Sets the selected family, the curve coefficient and the noise reduction flag and rebuilds the look-up table. |
void |
setWindow(double start,
double end)
Sets the input window interval. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX
255
) allowed for the upper bound of the
codomain interval.
public static final int MIN
0
) allowed for the lower bound of the
codomain interval.
public static final int DECILE
protected final ome.model.display.QuantumDef qDef
protected final ome.model.enums.PixelsType type
protected QuantumMap valueMapper
Constructor Detail |
---|
protected QuantumStrategy(ome.model.display.QuantumDef qd, ome.model.enums.PixelsType pt)
qd
- The QuantumDef
this strategy is for.pt
- The pixels type to handle.Method Detail |
---|
public void setExtent(double globalMin, double globalMax)
globalMin
- The minimum of all minima for a specified stack.globalMax
- The maximum of all maxima for a specified stack.public void setWindow(double start, double end)
start
- The lower bound of the interval.end
- The upper bound of the interval.public void setMapping(ome.model.enums.Family family, double k, boolean noiseReduction)
family
- The mapping family.k
- The curve coefficient.noiseReduction
- The noise reduction flag.public void setQuantizationMap(ome.model.enums.Family family, double k, boolean noiseReduction)
family
- The mapping family.k
- The curve coefficient.noiseReduction
- The noise reduction flag.public void setMap(QuantumMap qMap)
qMap
- The value to set.public ome.model.enums.Family getFamily()
public double getCurveCoefficient()
public boolean getNoiseReduction()
true
if the noise reduction algorithm
is turned on, false
if turned off.
public double getGlobalMin()
public double getGlobalMax()
public double getOriginalGlobalMin()
public double getOriginalGlobalMax()
public double getPixelsTypeMin()
0
if the value couldn't be set.
public double getPixelsTypeMax()
0
if the value couldn't be set.
public double getWindowStart()
public double getWindowEnd()
protected abstract void onWindowChange()
public abstract int quantize(double value) throws QuantizationException
value
- The pixel intensity value.
QuantizationException
- If the specified value is not in the interval [globalMin,
globalMax].
|
||||||||||
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.