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

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

@ALDDerivedClass
@ALDParametrizedClass
public class MTBTermMotionDiff
extends MTBTermination

Check on snake termination by motion difference.

Termination is done when the snake control point motion of the former and the current snake is below a given fraction factor or if a maximum number of iterations is reached.

Author:
misiak

Field Summary
 
Fields inherited from class de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.termination.MTBTermination
optimizer, status, verbose
 
Constructor Summary
MTBTermMotionDiff()
          Default constructor.
MTBTermMotionDiff(double _motionFraction, int _maxIterations)
          Constructor with motion fraction factor and maximum iteration count.
 
Method Summary
 MTBTermMotionDiff clone()
          Clones this object.
 int getMaxIter()
          Get maximum iteration count.
 double getMotionFraction()
          Get motion 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 snake control point motion of the former and the current snake is below a given fraction factor or if a maximum number of iterations is reached.
 String toString()
          Method for short termination description name.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MTBTermMotionDiff

public MTBTermMotionDiff()
Default constructor.


MTBTermMotionDiff

public MTBTermMotionDiff(double _motionFraction,
                         int _maxIterations)
Constructor with motion fraction factor and maximum iteration count. Snake optimization is terminated if point motion of the snake is below the motion fraction or the number of iterations has reached the maximum iteration count.

Parameters:
_motionFraction - motion fraction
_maxIterations - maximum iteration count
Method Detail

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 snake control point motion 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.

getMotionFraction

public double getMotionFraction()
Get motion fraction.

Returns:
Motion fraction.

getMaxIter

public int getMaxIter()
Get maximum iteration count.

Returns:
Maximum Iterations.

toString

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

Specified by:
toString in class MTBTermination

clone

public MTBTermMotionDiff clone()
                        throws 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:
CloneNotSupportedException


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.