de.unihalle.informatik.MiToBo.segmentation.snakes.datatypes
Class MTBSet_SnakeEnergyComputable

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.segmentation.snakes.datatypes.MTBSet_SnakeEnergyComputable
All Implemented Interfaces:
MTBSet_ActiveContourEnergy

@ALDParametrizedClass
public class MTBSet_SnakeEnergyComputable
extends Object
implements MTBSet_ActiveContourEnergy

Container data type for snake energies in nonPDE approaches.

Objects of this class contain a set of snake energies to be used in snake optimization. With each energy an individual weight is associated which allows application-dependent snake energy combinations. Per default the weights of all energies in the set are set to 1.0.

Important notice: in MiToBo there exists a specialized data I/O provider MTBSet_ActiveContourEnergyDataIOSwing for this class; however, the provider only supports graphical data I/O. Accordingly the class is also annotated as parametrized class to allow for using the generic parametrized class data I/O provider ALDParametrizedClassDataIOCmdline when using this class in the context of commandline user interfaces.

Author:
moeller

Field Summary
protected  MTBSetWeightedEnergy<MTBSnakeEnergyComputable> energySet
           
 
Constructor Summary
MTBSet_SnakeEnergyComputable()
          Default contructor for empty set.
MTBSet_SnakeEnergyComputable(Vector<MTBSnakeEnergyComputable> es)
          Constructor for a given vector of energies.
MTBSet_SnakeEnergyComputable(Vector<MTBSnakeEnergyComputable> es, Vector<Double> ws)
          Constructor with energies and weights.
 
Method Summary
 void addEnergy(MTBSnakeEnergyComputable e)
          Append another energy to the list with default weight 1.0.
 void addEnergy(MTBSnakeEnergyComputable e, double w)
          Append another energy to the list.
 MTBSnakeEnergyComputable getEnergy(int i)
          Returns element i of the energy list.
 Vector<MTBSnakeEnergyComputable> getEnergyList()
          Returns list of energies with actual type.
 Vector<MTBActiveContourEnergy> getGenericEnergyList()
          Returns the list of energies.
 Double getWeight(int i)
          Returns element i of the weight list.
 Vector<Double> getWeights()
          Returns the list of weights.
 void setEnergyList(Vector<MTBActiveContourEnergy> es)
          Specify a new set of energies, all weights are reset to 1.0.
 void setWeights(Vector<Double> ws)
          Specify new weights.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

energySet

protected MTBSetWeightedEnergy<MTBSnakeEnergyComputable> energySet
Constructor Detail

MTBSet_SnakeEnergyComputable

public MTBSet_SnakeEnergyComputable()
Default contructor for empty set.


MTBSet_SnakeEnergyComputable

public MTBSet_SnakeEnergyComputable(Vector<MTBSnakeEnergyComputable> es)
Constructor for a given vector of energies.

Parameters:
es - Vector with energies.

MTBSet_SnakeEnergyComputable

public MTBSet_SnakeEnergyComputable(Vector<MTBSnakeEnergyComputable> es,
                                    Vector<Double> ws)
                             throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor with energies and weights.

Both vectors must have the same size, otherwise an exception is thrown.

Parameters:
es - Vector of energies.
ws - Vector of weights.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

setEnergyList

public void setEnergyList(Vector<MTBActiveContourEnergy> es)
Specify a new set of energies, all weights are reset to 1.0.

Specified by:
setEnergyList in interface MTBSet_ActiveContourEnergy
Parameters:
es - New vector of energies.

setWeights

public void setWeights(Vector<Double> ws)
Specify new weights.

Note that it is assumed that the size of the weight vector matches the size of the current energy set.

Specified by:
setWeights in interface MTBSet_ActiveContourEnergy
Parameters:
ws - List of energy weights.

getGenericEnergyList

public Vector<MTBActiveContourEnergy> getGenericEnergyList()
Returns the list of energies.

Specified by:
getGenericEnergyList in interface MTBSet_ActiveContourEnergy
Returns:
List of energies.

getEnergyList

public Vector<MTBSnakeEnergyComputable> getEnergyList()
Returns list of energies with actual type.

Returns:
Reference to list of energies.

getEnergy

public MTBSnakeEnergyComputable getEnergy(int i)
Returns element i of the energy list.

Specified by:
getEnergy in interface MTBSet_ActiveContourEnergy
Parameters:
i - Index of energy to be returned.
Returns:
Requested energy object.

getWeights

public Vector<Double> getWeights()
Returns the list of weights.

Specified by:
getWeights in interface MTBSet_ActiveContourEnergy
Returns:
List of current weights.

getWeight

public Double getWeight(int i)
Returns element i of the weight list.

Specified by:
getWeight in interface MTBSet_ActiveContourEnergy
Parameters:
i - Index of requested weight.
Returns:
Requested element of weight list.

addEnergy

public void addEnergy(MTBSnakeEnergyComputable e,
                      double w)
Append another energy to the list.

Parameters:
e - New energy.
w - Weight for the energy.

addEnergy

public void addEnergy(MTBSnakeEnergyComputable e)
Append another energy to the list with default weight 1.0.

Parameters:
e - New energy to be appended.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.