|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.segmentation.snakes.energies.MTBSnakeEnergyCDImageBased
@ALDParametrizedClass public abstract class MTBSnakeEnergyCDImageBased
Interface class for snake energies that are pure image-based.
This class is used by the snake optimizer. Pure image-based energies are energies that just evaluate the energy gradient at single image positions. Examples are intensity gradient, GVFs and so on. On updating the snake optimizer target functional they usually just modify the constant vector and not the linear matrix. All energies of this type share the common property that derivatives can be calculated quite easy and straight-forward which separates them from more complex snake energies.
Field Summary | |
---|---|
protected int |
height
Height of the given image for the energy. |
protected double |
normalizationFactor
Normalization factor for scaling matrix entries. |
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. |
protected int |
width
Width of the given image for the energy. |
Fields inherited from interface de.unihalle.informatik.MiToBo.segmentation.snakes.energies.MTBSnakeEnergyDerivable |
---|
targetEnergyRange |
Constructor Summary | |
---|---|
MTBSnakeEnergyCDImageBased()
|
Method Summary | |
---|---|
double |
calcEnergy(SnakeOptimizerSingle opt)
Calculates the energy of the current snake. |
double |
calcEnergy(SnakeOptimizerSingle opt,
int pointID)
|
Jama.Matrix |
getDerivative_MatrixPart(SnakeOptimizerSingleVarCalc opt)
Returns the linear matrix part of this energy for snake optimization. |
Jama.Matrix |
getDerivative_VectorPart(SnakeOptimizerSingleVarCalc opt)
Returns the vector part of this energy for snake optimization. |
double |
getDerivativeX_norm(double x,
double y)
Get x-derivative of external snake energy at given position on a normalizes image coordinates in range [width*scale, height*scale]. |
abstract double |
getDerivativeX(double x,
double y)
Get x-derivative of external snake energy at given position. |
double |
getDerivativeY_norm(double x,
double y)
Get y-derivative of external snake energy at given position on a normalizes image coordinates in range [width*scale, height*scale]. |
abstract double |
getDerivativeY(double x,
double y)
Get y-derivative of external snake energy at given position. |
double |
getScaleFactor()
Get scaling factor. |
double |
getValue_norm(double x,
double y)
Returns the value of the external energy at the given position on a normalizes image coordinates in range [width*scale, height*scale]. |
abstract double |
getValue(double x,
double y)
Returns the value of the external energy at the given position. |
boolean |
initEnergy(SnakeOptimizerSingleGreedy o)
Init routine which is called once before the energy is actually used. |
boolean |
initEnergy(SnakeOptimizerSingleVarCalc o)
Init routine which is called once before the energy is actually used. |
protected abstract void |
normalizeEnergy()
Normalize the external energy in a range [-1.0, 1.0]. |
void |
setScaleFactor(double s)
Set the scaling factor. |
void |
updateStatus(SnakeOptimizerSingleGreedy o)
Update internal state of energy object prior to querying derivatives and so on. |
void |
updateStatus(SnakeOptimizerSingleVarCalc o)
Update internal state of energy object prior to usaging it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.unihalle.informatik.MiToBo.segmentation.snakes.energies.MTBSnakeEnergyDerivable |
---|
toString |
Methods inherited from interface de.unihalle.informatik.MiToBo.segmentation.snakes.energies.MTBSnakeEnergyComputable |
---|
toString |
Field Detail |
---|
protected int height
protected double normalizationFactor
protected SnakeOptimizerSingle.EnergyNormalizationMode normMode
protected double scaleFactor
protected int width
Constructor Detail |
---|
public MTBSnakeEnergyCDImageBased()
Method Detail |
---|
public double calcEnergy(SnakeOptimizerSingle opt)
MTBSnakeEnergyComputable
calcEnergy
in interface MTBSnakeEnergyComputable
opt
- Calling snake optimizer.
public double calcEnergy(SnakeOptimizerSingle opt, int pointID)
public final Jama.Matrix getDerivative_MatrixPart(SnakeOptimizerSingleVarCalc opt)
MTBSnakeEnergyDerivable
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 getDerivativeX_norm(double x, double y)
x
- x-coordinate of positiony
- y-coordinate of position
public abstract double getDerivativeX(double x, double y)
x
- x-coordinate of pixel positiony
- y-coordinate of pixel position
public double getDerivativeY_norm(double x, double y)
x
- x-coordinate of positiony
- y-coordinate of position
public abstract double getDerivativeY(double x, double y)
x
- x-coordinate of pixel positiony
- y-coordinate of pixel position
public double getScaleFactor()
getScaleFactor
in interface MTBSnakeEnergyComputable
getScaleFactor
in interface MTBSnakeEnergyDerivable
public double getValue_norm(double x, double y)
x
- x-coordinate of positiony
- y-coordinate of position
public abstract double getValue(double x, double y)
x
- x-coordinate of positiony
- y-coordinate of position
public boolean initEnergy(SnakeOptimizerSingleGreedy o)
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
o
- Calling snake optimizer.
public boolean initEnergy(SnakeOptimizerSingleVarCalc o)
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
o
- Calling snake optimizer.
protected abstract void normalizeEnergy()
public void setScaleFactor(double s)
setScaleFactor
in interface MTBSnakeEnergyComputable
setScaleFactor
in interface MTBSnakeEnergyDerivable
s
- new scaling factor.public void updateStatus(SnakeOptimizerSingleGreedy o)
MTBSnakeEnergyComputable
updateStatus
in interface MTBSnakeEnergyComputable
public void updateStatus(SnakeOptimizerSingleVarCalc o)
MTBSnakeEnergyDerivable
updateStatus
in interface MTBSnakeEnergyDerivable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |