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

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

@ALDDerivedClass
@ALDParametrizedClass
public class MTBLengthEnergyFWNonPDE
extends MTBLengthEnergyNonPDE

Base class of length energies using forward differences. This is an abstract class, gradMagHeaviside still needs to be implemented.


Field Summary
 
Fields inherited from class de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.MTBLengthEnergyNonPDE
doNormalization, FLAG_LENGTH, mu, scaleFactor
 
Fields inherited from class de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.MTBGenericEnergyNonPDE
debug, name
 
Constructor Summary
MTBLengthEnergyFWNonPDE()
          constructor
MTBLengthEnergyFWNonPDE(double mu)
          constructor
 
Method Summary
static MTBLengthEnergyNonPDE createEnergy(MTBLevelsetMembership phi, double mu)
          Create a proper length energy asked for by the level set function.
 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.
 
Methods inherited from class de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.MTBLengthEnergyNonPDE
setScaleFactor, toString
 
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
 

Constructor Detail

MTBLengthEnergyFWNonPDE

public MTBLengthEnergyFWNonPDE()
constructor


MTBLengthEnergyFWNonPDE

public MTBLengthEnergyFWNonPDE(double mu)
constructor

Parameters:
mu - weight of the length term
Method Detail

createEnergy

public static MTBLengthEnergyNonPDE createEnergy(MTBLevelsetMembership phi,
                                                 double mu)
Create a proper length energy asked for by the level set function. If sizeZ = 1 than 2D, otherwise 3D . If the number of phases in phi is 2 than two phase, otherwise multi phase.
In the future more types, e.g. various methods to approximate length may be available

Parameters:
mu - weight of length term
phi - Level set function associated with this energy object
Returns:
length energy

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.

Overrides:
deltaE in class MTBLengthEnergyNonPDE
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.

Overrides:
E in class MTBLengthEnergyNonPDE
Parameters:
phi - level set function assumed to be associated with this energy object
Returns:
energy

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 MTBLengthEnergyNonPDE
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.