|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.segmentation.activecontours.energies.MTBActiveContourEnergy_CVRegionFit
de.unihalle.informatik.MiToBo.segmentation.snakes.energies.MTBSnakeEnergyCD_CVRegionFit
@ALDDerivedClass @ALDParametrizedClass public class MTBSnakeEnergyCD_CVRegionFit
Snake energy based on Chan-Vese region fitting.
This energy models the inner and outer regions of a snake by a Gaussian model, i.e. each region is specified by a mean intensity value and deviations from this value are penalized.
Field Summary | |
---|---|
private MTBSnake |
currentSnk
Current snake the energy is based on. |
private double[] |
energyRange
Interval boundaries of adapted energy interval. |
private boolean[][] |
excludeMask
Global exclude mask for image to be segmented. |
private int |
iHeight
Height of working image. |
private int |
iWidth
Width of working image. |
protected SnakeOptimizerSingle.EnergyNormalizationMode |
normMode
Mode of normalization. |
protected double |
scaleFactor
Scaling factor to rescale image coordinates in range [0,1] or several ranges to the original coordinates range like [1000, 1000] in a image of size 1000 x 1000. |
Fields inherited from class de.unihalle.informatik.MiToBo.segmentation.activecontours.energies.MTBActiveContourEnergy_CVRegionFit |
---|
areas, inImg, lambda_in, lambda_out, means, means_compl |
Fields inherited from interface de.unihalle.informatik.MiToBo.segmentation.snakes.energies.MTBSnakeEnergyDerivable |
---|
targetEnergyRange |
Constructor Summary | |
---|---|
MTBSnakeEnergyCD_CVRegionFit()
Default constructor. |
|
MTBSnakeEnergyCD_CVRegionFit(MTBImage im,
double lin,
double lout)
Default constructor. |
Method Summary | |
---|---|
double |
calcEnergy(SnakeOptimizerSingle opt)
Calculates the energy of the current snake. |
Jama.Matrix |
getDerivative_MatrixPart(SnakeOptimizerSingleVarCalc opt)
Updates the fitting term based on new region average values. |
Jama.Matrix |
getDerivative_VectorPart(SnakeOptimizerSingleVarCalc opt)
Returns the vector part of this energy for snake optimization. |
double |
getScaleFactor()
Get scaling factor. |
boolean |
initEnergy(SnakeOptimizerSingleGreedy opt)
Init routine which is called once before the energy is actually used. |
boolean |
initEnergy(SnakeOptimizerSingleVarCalc opt)
Init routine which is called once before the energy is actually used. |
void |
setScaleFactor(double s)
Set the scaling factor. |
java.lang.String |
toString()
Get an identifier string for the energy object. |
void |
updateStatus(SnakeOptimizerSingleGreedy opt)
Update internal state of energy object prior to querying derivatives and so on. |
void |
updateStatus(SnakeOptimizerSingleVarCalc opt)
Update internal state of energy object prior to usaging it. |
Methods inherited from class de.unihalle.informatik.MiToBo.segmentation.activecontours.energies.MTBActiveContourEnergy_CVRegionFit |
---|
calcEnergy, getDerivative, getEnergyDerivativeMaxVal, getEnergyDerivativeMinVal, getMeans, init, updateParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private transient MTBSnake currentSnk
private double[] energyRange
energyRange[0] -> left boundary energyRange[1] -> right boundary energyRange[2] -> interval width
private transient boolean[][] excludeMask
private transient int iHeight
private transient int iWidth
protected SnakeOptimizerSingle.EnergyNormalizationMode normMode
protected transient double scaleFactor
Constructor Detail |
---|
public MTBSnakeEnergyCD_CVRegionFit()
public MTBSnakeEnergyCD_CVRegionFit(MTBImage im, double lin, double lout)
im
- Image to work on.l_in
- Weighting factor for inner region fit.l_out
- Weighting factor for outer region fit.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
ALDProcessingDAGException
Method Detail |
---|
public double calcEnergy(SnakeOptimizerSingle opt)
MTBSnakeEnergyComputable
calcEnergy
in interface MTBSnakeEnergyComputable
opt
- Calling snake optimizer.
public Jama.Matrix getDerivative_MatrixPart(SnakeOptimizerSingleVarCalc opt)
getDerivative_MatrixPart
in interface MTBSnakeEnergyDerivable
opt
- Calling snake optimizer.
public Jama.Matrix getDerivative_VectorPart(SnakeOptimizerSingleVarCalc opt)
MTBSnakeEnergyDerivable
getDerivative_VectorPart
in interface MTBSnakeEnergyDerivable
opt
- Calling snake optimizer.
public double getScaleFactor()
getScaleFactor
in interface MTBSnakeEnergyComputable
getScaleFactor
in interface MTBSnakeEnergyDerivable
public boolean initEnergy(SnakeOptimizerSingleGreedy opt)
MTBSnakeEnergyComputable
In this routine global parameter settings can be handled or other initialization stuff be done. The SnakeOptimizer will call this routine once before the actual use of the energy. If no stuff needs to be done in advance the routine should at least return true.
initEnergy
in interface MTBSnakeEnergyComputable
opt
- Calling snake optimizer.
public boolean initEnergy(SnakeOptimizerSingleVarCalc opt) throws MTBSnakeException
MTBSnakeEnergyDerivable
In this routine global parameter settings can be handled or other initialization stuff be done. The SnakeOptimizer will call this routine once before the actual use of the energy. If no stuff needs to be done in advance the routine should at least return true.
initEnergy
in interface MTBSnakeEnergyDerivable
opt
- Calling snake optimizer.
MTBSnakeException
public void setScaleFactor(double s)
setScaleFactor
in interface MTBSnakeEnergyComputable
setScaleFactor
in interface MTBSnakeEnergyDerivable
s
- new scaling factor.public java.lang.String toString()
MTBSnakeEnergyDerivable
When meta parameters are saved to a file, configuration objects need to be converted to strings. Consequently, each snake energy should be associated with a unique and descriptive string for later reference.
toString
in interface MTBSnakeEnergyComputable
toString
in interface MTBSnakeEnergyDerivable
toString
in class MTBActiveContourEnergy_CVRegionFit
public void updateStatus(SnakeOptimizerSingleGreedy opt)
MTBSnakeEnergyComputable
updateStatus
in interface MTBSnakeEnergyComputable
public void updateStatus(SnakeOptimizerSingleVarCalc opt) throws MTBSnakeException
MTBSnakeEnergyDerivable
updateStatus
in interface MTBSnakeEnergyDerivable
MTBSnakeException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |