motris.algorithm.emcontour
Class GrayValueDistribution

java.lang.Object
  extended bymotris.data.Description
      extended byparameter.ParameterizedObjectAdaptor
          extended bymotris.algorithm.emcontour.GrayValueDistribution
All Implemented Interfaces:
ParameterizedObject
Direct Known Subclasses:
GrayValueGaussianDistribution, GrayValueLaplaceDistribution, GrayValueLinearDistribution, GrayValueUniformDistribution

public abstract class GrayValueDistribution
extends ParameterizedObjectAdaptor

Encapsulates a pdf with a finite set of events. Usually, this class is used for pdfs of Gray Values [0..255] but other ranges are possible

Author:
dahlkamp

Nested Class Summary
 
Nested classes inherited from class parameter.ParameterizedObject
ParameterizedObject.ParameterChangedListener, ParameterizedObject.ParameterizedObjectManager
 
Field Summary
protected  int grayLevels
           
(package private)  double normalizationCoefficient
           
 double[] preComputedProbability
           
(package private)  boolean preComputeValues
           
 
Fields inherited from class parameter.ParameterizedObjectAdaptor
parameterChangedNotifyList
 
Fields inherited from class motris.data.Description
 
Constructor Summary
GrayValueDistribution(java.lang.String _name, java.lang.String _id, int _preComputeAmount)
           
 
Method Summary
(package private)  void computeNormalization()
           
 double getProbability(int grayValueDifference)
           
(package private) abstract  double internalGetProbability(int grayValueDifference)
           
 void setPreComputeAmount(int _preComputeAmount)
           
 
Methods inherited from class parameter.ParameterizedObjectAdaptor
addParameterChangedListener, finalize, fireParameterChanged, getParameters, parameterEdited, removeParameterChangedListener, setParameters
 
Methods inherited from class motris.data.Description
getDescription, getIdentifier, getName, setDescription, setIdentifier, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

grayLevels

protected int grayLevels

normalizationCoefficient

double normalizationCoefficient

preComputeValues

boolean preComputeValues

preComputedProbability

public double[] preComputedProbability
Constructor Detail

GrayValueDistribution

public GrayValueDistribution(java.lang.String _name,
                             java.lang.String _id,
                             int _preComputeAmount)
Method Detail

getProbability

public double getProbability(int grayValueDifference)

internalGetProbability

abstract double internalGetProbability(int grayValueDifference)

setPreComputeAmount

public void setPreComputeAmount(int _preComputeAmount)

computeNormalization

void computeNormalization()