de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE
Class LevelsetSolveNonPDE

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDOperator
      extended by de.unihalle.informatik.MiToBo.core.operator.MTBOperator
          extended by de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.LevelsetSolveNonPDE
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener

@ALDAOperator(genericExecutionMode=NONE)
public class LevelsetSolveNonPDE
extends MTBOperator

Implements a level set solver which may optionally perserve the topology using non PDE optimization. See: Song, B. and Chan, T.: A fast algorithm for level set based optimization, UCLA Cam Report, 2002

Optionally a invalid image may be supplied which defines pixels with nonzero value as invalid and not considered for segmentation.

The resulting image is a byte image, where background and invalid pixels have zeros and the obejct compontens/phases values starting from one.

NOTE: if verbose is turned on runtime will typically be increase considerably due to outputting (and consequently computing) the complete energy.

Currently only 2D images are supported.

Author:
Stefan Posch, partially bases on code by Markus Glass

Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, versionProvider
 
Constructor Summary
LevelsetSolveNonPDE()
          Constructor
LevelsetSolveNonPDE(MTBGenericEnergyNonPDE energy, MTBLevelsetMembership phi, int maxIter, int spacingIntermediate, MTBImage invalidImg, boolean preserveTopology)
          Constructor.
 
Method Summary
 Integer getDebug()
          Get value of debug.
 MTBGenericEnergyNonPDE getEnergy()
          Get value of energy.
 Vector<MTBImageByte> getIntermediateLS()
          Get value of intermediateLS.
 MTBImage getInvalidImage()
          Get value of invalidImage.
 Integer getMaxIterations()
          Get value of maxIterations.
 Integer getNumIterations()
          Get value of numIterations Explanation: Number of iterations performed
 MTBLevelsetMembership getPhi()
          Get value of phi.
 Boolean getPreserveTopology()
          Get value of preserveTopology.
 MTBImageByte getResultImage()
          Get value of resultImage.
 Integer getSpacingIntermediate()
          Get value of spacingIntermediate.
protected  void operate()
          This function does the actual work, i.e. optimization of the energy.
 void setDebug(Integer value)
          Set value of debug.
 void setMaxIterations(Integer value)
          Set value of maxIterations.
 void setPreserveTopology(Boolean value)
          Set value of preserveTopology.
 void setSpacingIntermediate(Integer value)
          Set value of spacingIntermediate.
 
Methods inherited from class de.unihalle.informatik.MiToBo.core.operator.MTBOperator
readResolve
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
addOperatorExecutionProgressEventListener, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getHidingMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, runOp, runOp, runOp, setConstructionMode, setHidingMode, setName, setParameter, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LevelsetSolveNonPDE

public LevelsetSolveNonPDE(MTBGenericEnergyNonPDE energy,
                           MTBLevelsetMembership phi,
                           int maxIter,
                           int spacingIntermediate,
                           MTBImage invalidImg,
                           boolean preserveTopology)
                    throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor.

Parameters:
enery - Energy
ls - initialed level set function of type membership, i.e. LevelsetMembership
maxIter - maximal number of iterations
spacingIntermediate - spacing of intermediate of level set function returned; 0 = none
invalidImg - optional image of invalid pixels (pixels <> 0 are invalid)
preserveTopology -
verbose - output if requested
debug - bit mask for debugging output
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

LevelsetSolveNonPDE

public LevelsetSolveNonPDE()
                    throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

operate

protected void operate()
                throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
This function does the actual work, i.e. optimization of the energy. NOTE: Currently only 2D level set functions are supported NOTE: if debug & FLAG_SOLVER, then for debugging purposes the complete energy is computed in each iteration, which is expensive

Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

getMaxIterations

public Integer getMaxIterations()
Get value of maxIterations. Explanation: Maximal number of iterations.

Returns:
value of maxIterations

setMaxIterations

public void setMaxIterations(Integer value)
Set value of maxIterations. Explanation: Maximal number of iterations.

Parameters:
value - New value of maxIterations

getPreserveTopology

public Boolean getPreserveTopology()
Get value of preserveTopology. Explanation: Topology preserving mode?.

Returns:
value of preserveTopology

setPreserveTopology

public void setPreserveTopology(Boolean value)
Set value of preserveTopology. Explanation: Topology preserving mode?.

Parameters:
value - New value of preserveTopology

getEnergy

public MTBGenericEnergyNonPDE getEnergy()
Get value of energy. Explanation: Energy to use for optimization.

Returns:
value of energy

getInvalidImage

public MTBImage getInvalidImage()
Get value of invalidImage. Explanation: optional image of invalid pixels (pixels <> 0 are invalid).

Returns:
value of invalidImage

getPhi

public MTBLevelsetMembership getPhi()
Get value of phi. Explanation: Initial levelset function.

Returns:
value of phi

getResultImage

public MTBImageByte getResultImage()
Get value of resultImage. Explanation: Result image.

Returns:
value of resultImage

getIntermediateLS

public Vector<MTBImageByte> getIntermediateLS()
Get value of intermediateLS. Explanation: Additional dubugging informaton.

Returns:
value of intermediateLS

getDebug

public Integer getDebug()
Get value of debug. Explanation: Additional dubugging informaton.

Returns:
value of debug

setDebug

public void setDebug(Integer value)
Set value of debug. Explanation: Additional dubugging informaton.

Parameters:
value - New value of debug

getNumIterations

public Integer getNumIterations()
Get value of numIterations Explanation: Number of iterations performed

Returns:
value of numIterations

getSpacingIntermediate

public Integer getSpacingIntermediate()
Get value of spacingIntermediate. Explanation: spacing of intermediate of levelset function returned; 0 = none?.

Returns:
value of spacingIntermediate

setSpacingIntermediate

public void setSpacingIntermediate(Integer value)
Set value of spacingIntermediate. Explanation: spacing of intermediate of levelset function returned; 0 = none?.

Parameters:
value - New value of spacingIntermediate


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