|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.segmentation.activecontours.datatypes.MTBSetWeightedEnergy<T>
@ALDParametrizedClass public class MTBSetWeightedEnergy<T>
Container data type for energies in PDE approaches.
Objects of this class contain a set of energies. With each energy an individual weight is associated which allows application-dependent energy combinations. Per default the weights of all energies in the set are set to 1.0.
Field Summary | |
---|---|
protected java.util.Vector<T> |
energies
List of snake energies. |
protected java.util.Vector<java.lang.Double> |
weights
List of energy weights. |
Constructor Summary | |
---|---|
MTBSetWeightedEnergy()
Default contructor for empty set. |
|
MTBSetWeightedEnergy(java.util.Vector<T> es)
Constructor for a given vector of energies. |
|
MTBSetWeightedEnergy(java.util.Vector<T> es,
java.util.Vector<java.lang.Double> ws)
Constructor with energies and weights. |
Method Summary | |
---|---|
void |
addEnergy(T e)
Append another energy to the list with default weight 1.0. |
void |
addEnergy(T e,
double w)
Append another energy to the list. |
T |
getEnergy(int i)
Returns element i of the energy list. |
java.util.Vector<T> |
getEnergyList()
Returns the list of energies. |
java.lang.Double |
getWeight(int i)
Returns element i of the weight list. |
java.util.Vector<java.lang.Double> |
getWeights()
Returns the list of weights. |
void |
setEnergyList(java.util.Vector<T> es)
Specify a new set of energies, all weights are reset to 1.0. |
void |
setWeights(java.util.Vector<java.lang.Double> ws)
Specify new weights. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@ALDClassParameter(label="energies", mode=STANDARD, dataIOOrder=-10) protected java.util.Vector<T> energies
@ALDClassParameter(label="weights", mode=STANDARD, dataIOOrder=-5) protected java.util.Vector<java.lang.Double> weights
Constructor Detail |
---|
public MTBSetWeightedEnergy()
public MTBSetWeightedEnergy(java.util.Vector<T> es)
es
- Vector with energies.public MTBSetWeightedEnergy(java.util.Vector<T> es, java.util.Vector<java.lang.Double> ws) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Both vectors must have the same size, otherwise an exception is thrown.
es
- Vector of energies.ws
- Vector of weights.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public void addEnergy(T e)
e
- New energy to be appended.public void addEnergy(T e, double w)
e
- New energy.w
- Weight for the energy.public T getEnergy(int i)
i
- Index of energy to be returned.
public java.util.Vector<T> getEnergyList()
public java.lang.Double getWeight(int i)
public java.util.Vector<java.lang.Double> getWeights()
public void setEnergyList(java.util.Vector<T> es)
es
- New vector of energies.public void setWeights(java.util.Vector<java.lang.Double> ws)
Note that it is assumed that the size of the weight vector matches the size of the current energy set.
ws
- List of energy weights.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |