@ALDDerivedClass @ALDParametrizedClass public class MTBEnergySumNonPDE extends MTBGenericEnergyNonPDE
Modifier and Type | Field and Description |
---|---|
private Vector<MTBGenericEnergyNonPDE> |
energies |
debug, name
Constructor and Description |
---|
MTBEnergySumNonPDE()
Construct an energy object for a level set function realizing the sum of energies.
|
MTBEnergySumNonPDE(String name,
Vector<MTBGenericEnergyNonPDE> energies)
Construct an energy object for a level set function realizing the sum of energies
in the vector
energies . |
Modifier and Type | Method and Description |
---|---|
double |
deltaE(int x,
int y,
int z,
MTBLevelsetMembership phi)
Calculate differences of energy if the pixel/voxel (x,y,z) changes its phase in
the levelest function
phi supplied as argument and assumed to be
associated with this energy object. |
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 . |
void |
estimateParams(MTBLevelsetMembership phi)
Estimate internal parameters (if any) for the level set function
phi
assumed to be associated with this energy object. |
MTBGenericEnergyNonPDE |
init(MTBImage img,
MTBLevelsetMembership phi)
Initialization routine which is called once before the energy is actually used.
|
void |
print(MTBLevelsetMembership phi,
PrintStream out,
String indent)
Print this energy object - including the value of the energy for
phi assumed to be associated with this energy object. |
void |
setDebug(int debug)
Set debug bit mask
|
String |
toString()
Return an ascii representation identifying the energy and internal parameters,
but not the state.
|
void |
updateParams(int x,
int y,
int z,
MTBLevelsetMembership phi)
Update parameters (if any) of the energy object which depend on
the associated level set function.
|
void |
updateParams(int x,
int y,
int z,
short newPhase,
MTBLevelsetMembership phi)
Update parameters (if any) of the energy object which depend on
the associated level set function.
|
getNewIndent
@ALDClassParameter(label="Energies") private Vector<MTBGenericEnergyNonPDE> energies
public MTBEnergySumNonPDE(String name, Vector<MTBGenericEnergyNonPDE> energies)
energies
.
The name of the energy is as supplied as parameter-name
- The name of this compound energyenergies
- A vector comprising the energies to be summed in this energypublic MTBEnergySumNonPDE()
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 statepublic double deltaE(int x, int y, int z, MTBLevelsetMembership phi)
MTBGenericEnergyNonPDE
phi
supplied as argument and assumed to be
associated with this energy object.
This version makes sense only for two phase level set function. In the multi phase case any object phase is changed to the background, while a background pixel/voxel is changed to the first object phase.
deltaE
in class MTBGenericEnergyNonPDE
phi
- level set function assumed to be associated with this energy objectpublic 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 objectpublic void updateParams(int x, int y, int z, MTBLevelsetMembership phi)
MTBGenericEnergyNonPDE
This method is called to update the parameters if is is intended to change a pixel/voxel to the other state,
assuming a two phase level set function.
For a multi phase level set function flipping of phases is realized
in MTBGenericEnergyNonPDE.deltaE(int, int, int, short, de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.MTBLevelsetMembership)
.
Note: The level set function phi
is still in the old state and is
assumed to be to updated subsequently.
updateParams
in class MTBGenericEnergyNonPDE
phi
- assumed to be associated with this energy objectpublic void updateParams(int x, int y, int z, short newPhase, MTBLevelsetMembership phi)
MTBGenericEnergyNonPDE
This method is called to update the parameters if is is intended to change the
phase of a pixel/voxel to newPhase
.
Note: The level set function phi
is still in the old state and is
assumed to be to updated subsequently.
updateParams
in class MTBGenericEnergyNonPDE
newPhase
- new phase to change pixel/voxel tophi
- assumed to be associated with this energy objectpublic void estimateParams(MTBLevelsetMembership phi)
MTBGenericEnergyNonPDE
phi
assumed to be associated with this energy object.estimateParams
in class MTBGenericEnergyNonPDE
public void setDebug(int debug)
MTBGenericEnergyNonPDE
setDebug
in class MTBGenericEnergyNonPDE
debug
- bit maskpublic String toString()
MTBGenericEnergyNonPDE
toString
in class MTBGenericEnergyNonPDE
public void print(MTBLevelsetMembership phi, PrintStream out, String indent)
MTBGenericEnergyNonPDE
phi
assumed to be associated with this energy object.
Each line output is prefixed with the string indent
.
Note: this may be an expensive operation.print
in class MTBGenericEnergyNonPDE
phi
- level set function assumed to be associated with this energy objectout
- stream to print toindent
- indentation stringCopyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.