@ALDDerivedClass @ALDParametrizedClass public class MTBLengthEnergyNonPDE extends MTBGenericEnergyNonPDE
TODO: each create function returning a suitable energy instance has to call the method setScaleFactor()!!
Modifier and Type | Field and Description |
---|---|
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
|
debug, name
Constructor and Description |
---|
MTBLengthEnergyNonPDE()
Constructor
|
MTBLengthEnergyNonPDE(double mu)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
deltaE(int x,
int y,
int z,
short 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.
|
deltaE, estimateParams, getNewIndent, print, setDebug, updateParams, updateParams
@ALDClassParameter(label="Weight of the length term") protected double mu
protected boolean doNormalization
Still experimental
protected double scaleFactor
Still experimental
protected final int FLAG_LENGTH
public MTBLengthEnergyNonPDE()
public MTBLengthEnergyNonPDE(double mu)
mu
- weight of the length termpublic String toString()
MTBGenericEnergyNonPDE
toString
in class MTBGenericEnergyNonPDE
public MTBGenericEnergyNonPDE init(MTBImage img, MTBLevelsetMembership phi)
MTBGenericEnergyNonPDE
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.
init
in class MTBGenericEnergyNonPDE
img
- the image to be segmentedphi
- the level set function associated with this energy object in its initial stateprotected void setScaleFactor(MTBLevelsetMembership phi)
phi
- Levelset functionpublic double deltaE(int x, int y, int z, short newPhase, MTBLevelsetMembership phi)
MTBGenericEnergyNonPDE
phi
supplied
from current phase to newPhase
.deltaE
in class MTBGenericEnergyNonPDE
newPhase
- new phase to change the pixel/voxel tophi
- level set function assumed to be associated with this energy objectpublic double E(MTBLevelsetMembership phi)
MTBGenericEnergyNonPDE
phi
.
E
in class MTBGenericEnergyNonPDE
phi
- level set function assumed to be associated with this energy objectCopyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.