de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE
Class MTBLengthEnergyNonPDE

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.MTBGenericEnergyNonPDE
      extended by de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.MTBLengthEnergyNonPDE
Direct Known Subclasses:
MTBLengthEnergyFWNonPDE, MTBLengthEnergyKBNonPDE

@ALDDerivedClass
@ALDParametrizedClass
public class MTBLengthEnergyNonPDE
extends MTBGenericEnergyNonPDE

An class for energies for a nonPDF level set approach based on different length energies of the phases boundaries. In principle this class should be abstract but may not in order to facilitate generic execution.

TODO: each create function returning a suitable energy instance has to call the method setScaleFactor()!!


Field Summary
protected  boolean doNormalization
          do normalization?
protected  int FLAG_LENGTH
          Bit mask for length energies for debugging purposes.
protected  double mu
          weight of the length term
protected  double scaleFactor
          Scaling factor for normalization Still experimental
 
Fields inherited from class de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.MTBGenericEnergyNonPDE
debug, name
 
Constructor Summary
MTBLengthEnergyNonPDE()
          Constructor
MTBLengthEnergyNonPDE(double mu)
          Constructor
 
Method Summary
 double deltaE(int x, int y, int z, byte newPhase, MTBLevelsetMembership phi)
          Calculate differences of energy if the pixel/voxel (x,y,z) is changed from its current phase in the level set function phi supplied from current phase to newPhase.
 double E(MTBLevelsetMembership phi)
          Return the complete energy for the level set function phi.
 MTBGenericEnergyNonPDE init(MTBImage img, MTBLevelsetMembership phi)
          Initialization routine which is called once before the energy is actually used.
protected  void setScaleFactor(MTBLevelsetMembership phi)
          set the scale factor if normalization is requested.
 String toString()
          Return an ascii representation identifying the energy and internal parameters, but not the state.
 
Methods inherited from class de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.MTBGenericEnergyNonPDE
deltaE, estimateParams, getNewIndent, print, setDebug, updateParams, updateParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mu

@ALDClassParameter(label="Weight of the length term")
protected double mu
weight of the length term


doNormalization

protected boolean doNormalization
do normalization? The dimension of the largest direction in the original image (thus level set function) is scale to 1.

Still experimental


scaleFactor

protected double scaleFactor
Scaling factor for normalization

Still experimental


FLAG_LENGTH

protected final int FLAG_LENGTH
Bit mask for length energies for debugging purposes. The value has to be coordinated with other bit masks.

See Also:
Constant Field Values
Constructor Detail

MTBLengthEnergyNonPDE

public MTBLengthEnergyNonPDE()
Constructor


MTBLengthEnergyNonPDE

public MTBLengthEnergyNonPDE(double mu)
Constructor

Parameters:
mu - weight of the length term
Method Detail

toString

public String toString()
Description copied from class: MTBGenericEnergyNonPDE
Return an ascii representation identifying the energy and internal parameters, but not the state.

Specified by:
toString in class MTBGenericEnergyNonPDE

init

public MTBGenericEnergyNonPDE init(MTBImage img,
                                   MTBLevelsetMembership phi)
Description copied from class: MTBGenericEnergyNonPDE
Initialization routine which is called once before the energy is actually used.

This method assumes, that all class parameters of the energy are already set and takes care of initializations which depend on the image to be segmented and/or the initial level set function supplied as argument. It may also be the case that depending on the image and/or the initial level set function a new energy object is created, e.g. if a specialized energy according to dimensionality of the image of the type of the level set function (multi phase) is required.

If no initialization is required the routine should just return the unmodified energy object.

Overrides:
init in class MTBGenericEnergyNonPDE
Parameters:
img - the image to be segmented
phi - the level set function associated with this energy object in its initial state
Returns:
The modified or a new energy if initialization was successful, otherwise null.

setScaleFactor

protected void setScaleFactor(MTBLevelsetMembership phi)
set the scale factor if normalization is requested.

Parameters:
phi - Levelset function

deltaE

public double deltaE(int x,
                     int y,
                     int z,
                     byte newPhase,
                     MTBLevelsetMembership phi)
Description copied from class: MTBGenericEnergyNonPDE
Calculate differences of energy if the pixel/voxel (x,y,z) is changed from its current phase in the level set function phi supplied from current phase to newPhase.

Specified by:
deltaE in class MTBGenericEnergyNonPDE
newPhase - new phase to change the pixel/voxel to
phi - level set function assumed to be associated with this energy object
Returns:
difference of energy

E

public double E(MTBLevelsetMembership phi)
Description copied from class: MTBGenericEnergyNonPDE
Return the complete energy for the level set function phi.
Note: this may be an expensive operation.

Specified by:
E in class MTBGenericEnergyNonPDE
Parameters:
phi - level set function assumed to be associated with this energy object
Returns:
energy


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