de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.termination
Class MTBTermAreaDiffSlidingOffset

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.termination.MTBTermination
      extended by de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.termination.MTBTermAreaDiffSlidingOffset
All Implemented Interfaces:
java.lang.Cloneable

@ALDDerivedClass
@ALDParametrizedClass
public class MTBTermAreaDiffSlidingOffset
extends MTBTermination

Check upon snake termination by area change within the snake.

Author:
moeller

Field Summary
private  double areaFraction
          Area fraction factor.
private  java.util.LinkedList<java.lang.Integer> areas
           
private  int elemCount
           
private  java.util.LinkedList<java.lang.Double> meanAreas
           
private  int timeOffset
           
private  int window
           
 
Fields inherited from class de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.termination.MTBTermination
optimizer, status, verbose
 
Constructor Summary
MTBTermAreaDiffSlidingOffset()
          Default constructor.
MTBTermAreaDiffSlidingOffset(double _areaFraction)
           
 
Method Summary
 MTBTermAreaDiffSlidingOffset clone()
          Clones this object.
 double getAreaFraction()
          Get area fraction.
 boolean init(SnakeOptimizerSingle opt)
          Initializing routine which is called once before the termination is actually used.
 SnakeOptimizer.Snake_status terminate()
          Termination is done when the area difference of the former and the current snake is below a given fraction factor or if a maximum number of iterations is reached.
 java.lang.String toString()
          Method for short termination description name.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

areaFraction

@ALDClassParameter(label="Area Fraction")
private double areaFraction
Area fraction factor.


areas

private java.util.LinkedList<java.lang.Integer> areas

elemCount

private int elemCount

meanAreas

private java.util.LinkedList<java.lang.Double> meanAreas

timeOffset

private int timeOffset

window

private int window
Constructor Detail

MTBTermAreaDiffSlidingOffset

public MTBTermAreaDiffSlidingOffset()
Default constructor.


MTBTermAreaDiffSlidingOffset

public MTBTermAreaDiffSlidingOffset(double _areaFraction)
Method Detail

clone

public MTBTermAreaDiffSlidingOffset clone()
                                   throws java.lang.CloneNotSupportedException
Clones this object.

Note that the SnakeOptimizerSingle object is left null! You have to call SnakeOptimizer.initOptimizer() before using the gamma updater.

Specified by:
clone in class MTBTermination
Throws:
java.lang.CloneNotSupportedException

getAreaFraction

public double getAreaFraction()
Get area fraction.

Returns:
Area Fraction.

init

public boolean init(SnakeOptimizerSingle opt)
Description copied from class: MTBTermination
Initializing routine which is called once before the termination is actually used.

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 termination strategy. If no stuff needs to be done in advance the routine should at least return true.

Specified by:
init in class MTBTermination
Parameters:
opt - calling snake optimizer
Returns:
True if init was successful.

terminate

public SnakeOptimizer.Snake_status terminate()
Termination is done when the area difference of the former and the current snake is below a given fraction factor or if a maximum number of iterations is reached.

Specified by:
terminate in class MTBTermination
Returns:
Status of the current snake.

toString

public java.lang.String toString()
Description copied from class: MTBTermination
Method for short termination description name.

Specified by:
toString in class MTBTermination