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

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.LevelsetSegmentationNonPDE
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener

@ALDAOperator(level=APPLICATION,
              genericExecutionMode=ALL)
public class LevelsetSegmentationNonPDE
extends MTBOperator

Operator intended as user interface for level set segmentation using nonPDE optimization and optionally topology preserving.
An image containing the initial segmentation may be supplied. Also a mask image indicating invalid pixels/voxels may be given.

Details

The input image is segmented using a level set technique. Segmentation by be done using two or multiple phases, if multiphase is true. Optionally a topology preserving mode is available (only 2D currently) which assumes initially object phases with exactly one connected component each and no holes. This condition is preserved during optimization.
The maximal number of iterations is given as maxiter.
If invalidImg all pixels/voxels in this image with non-zero intensities are interpreted as invalid. This is in principle as if this pixels/voxels would not exist (similar to pixels/voxels outside the image domain): They are neither assigned a phase to, nor are image intensities used, e.g. to compute gradients.

Initialization
If no initialization is given, a default initialization, usually a circle/sphere is used. If both initLabelImg and initBinImg are supplied, initLabelImg is used. If a two phase approach is used (i.e. multiphase is false) then both types of initialization are identical: all pixels/voxels with intensity zero are assumed as background (phase), all other as foreground phase. In the multi phase case the labels in initLabelImg are assumed to be the phases to be used for initialization. Again, pixels/voxels with intensity zero are assumed as background (phase). If in the multi phase case initBinImg is given, the image is interpreted as a binary image (zero is again background), a compontent labeling is done and each resulting connected component assign to one phase (in addition to the background phase).

Result

The final segmentation is output as a label image.

Additional Output

If verbose is set output is written to stdout. The debug argument is a bit mask to control debuggung output. This is intended for developers and not (well) documented, also behaviour may change over time without notice. If spacing is non-zero, intermediate levelset functions after each spacing-th iteration are output to files with prefix ibase (default intermediateLS) and incrementally numbered. As a zero-th levelset function the initialization is prepended and the final result added as a last levelset image (which might happen to show up twice). Additionally the input image is overlayed with the final contours of the object phases as well as with the contours of the intialization. This image is output to the file contourResult (default: contourImg.tif).

Limitations Currently not all options are implemented for the plugin version.

Author:
Stefan Posch, Markus Glass, Birgit Moeller

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, verbose, versionProvider
 
Constructor Summary
LevelsetSegmentationNonPDE()
          Default constructor.
 
Method Summary
 Integer getDebug()
          Get value of debug.
 MTBGenericEnergyNonPDE getEnergy()
          Get value of energy.
 MTBImage getInImg()
          Get value of inImg.
 MTBImage getInitBinImg()
          Get value of initBinImg.
 MTBImage getInitLabelImg()
          Get value of initLabelImg.
 MTBImage getIntermediateLS()
           
 MTBImage getInvalidImg()
          Get value of invalidImg.
 Integer getMaxIter()
          Get value of maxIter.
 Boolean getMultiphase()
          Get value of multiphase.
 Integer getNumIterations()
          Get value of numIterations Explanation: Number of iterations performed
 Boolean getPreserveTopology()
          Get value of preserveTopology.
 MTBImage getResultContourImage()
          Get value of ResultContourImage.
 MTBImage getResultImage()
          Get value of ResultImage.
 Integer getSpacing()
          Get value of spacing.
 Double getThreshold()
          Get value of threshold.
protected  void operate()
           
 void setDebug(Integer value)
          Set value of debug.
 void setEnergy(MTBGenericEnergyNonPDE energy)
          Set value of energy.
 void setInImg(MTBImage value)
          Set value of inImg.
 void setInitBinImg(MTBImage value)
          Set value of initBinImg.
 void setInitLabelImg(MTBImage value)
          Set value of initLabelImg.
 void setIntermediateLS(MTBImage intermediateLS)
           
 void setInvalidImg(MTBImage value)
          Set value of invalidImg.
 void setMaxIter(Integer value)
          Set value of maxIter.
 void setMultiphase(Boolean value)
          Set value of multiphase.
 void setNumIterations(Integer value)
          Set value of numIterations Explanation: Number of iterations performed
 void setPreserveTopology(Boolean value)
          Set value of preserveTopology.
 void setResultContourImage(MTBImage value)
          Set value of ResultContourImage.
 void setResultImage(MTBImage value)
          Set value of ResultImage.
 void setSpacing(Integer value)
          Set value of spacing.
 void setThreshold(Double value)
          Set value of threshold.
 
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

LevelsetSegmentationNonPDE

public LevelsetSegmentationNonPDE()
                           throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

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

operate

protected void operate()
                throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException,
                       de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException

getDebug

public Integer getDebug()
Get value of debug. Explanation: Bit mask for debugging of levelset solver.

Returns:
value of debug

setDebug

public void setDebug(Integer value)
Set value of debug. Explanation: Bit mask for debugging of levelset solver.

Parameters:
value - New value of debug

getEnergy

public MTBGenericEnergyNonPDE getEnergy()
Get value of energy.

Returns:
value of energy

setEnergy

public void setEnergy(MTBGenericEnergyNonPDE energy)
Set value of energy.

Parameters:
energy - New value of energy

getThreshold

public Double getThreshold()
Get value of threshold. Explanation: Maximal number of iterations for optimization.

Returns:
value of threshold

setThreshold

public void setThreshold(Double value)
Set value of threshold. Explanation: Maximal number of iterations for optimization.

Parameters:
value - New value of threshold

getMaxIter

public Integer getMaxIter()
Get value of maxIter. Explanation: Maximal number of iterations for optimization.

Returns:
value of maxIter

setMaxIter

public void setMaxIter(Integer value)
Set value of maxIter. Explanation: Maximal number of iterations for optimization.

Parameters:
value - New value of maxIter

getPreserveTopology

public Boolean getPreserveTopology()
Get value of preserveTopology. Explanation: Preserve topology during optimization.

Returns:
value of preserveTopology

setPreserveTopology

public void setPreserveTopology(Boolean value)
Set value of preserveTopology. Explanation: Preserve topology during optimization.

Parameters:
value - New value of preserveTopology

getSpacing

public Integer getSpacing()
Get value of spacing. Explanation: Spacing of intermediate results (none if spacing == 0) solver.

Returns:
value of spacing

setSpacing

public void setSpacing(Integer value)
Set value of spacing. Explanation: Spacing of intermediate results (none if spacing == 0) solver.

Parameters:
value - New value of spacing

getMultiphase

public Boolean getMultiphase()
Get value of multiphase. Explanation: Use multiphase levelsets.

Returns:
value of multiphase

setMultiphase

public void setMultiphase(Boolean value)
Set value of multiphase. Explanation: Use multiphase levelsets.

Parameters:
value - New value of multiphase

getInvalidImg

public MTBImage getInvalidImg()
Get value of invalidImg. Explanation: Image of invalid pixels (pixels <> 0 are invalid.

Returns:
value of invalidImg

setInvalidImg

public void setInvalidImg(MTBImage value)
Set value of invalidImg. Explanation: Image of invalid pixels (pixels <> 0 are invalid.

Parameters:
value - New value of invalidImg

getInitLabelImg

public MTBImage getInitLabelImg()
Get value of initLabelImg. Explanation: Label image for initialization.

Returns:
value of initLabelImg

setInitLabelImg

public void setInitLabelImg(MTBImage value)
Set value of initLabelImg. Explanation: Label image for initialization.

Parameters:
value - New value of initLabelImg

getInImg

public MTBImage getInImg()
Get value of inImg. Explanation: Input image to segment

Returns:
value of inImg

setInImg

public void setInImg(MTBImage value)
Set value of inImg. Explanation: Input image to segment

Parameters:
value - New value of inImg

getInitBinImg

public MTBImage getInitBinImg()
Get value of initBinImg. Explanation: Binary image for initialization.

Returns:
value of initBinImg

setInitBinImg

public void setInitBinImg(MTBImage value)
Set value of initBinImg. Explanation: Binary image for initialization.

Parameters:
value - New value of initBinImg

getResultContourImage

public MTBImage getResultContourImage()
Get value of ResultContourImage. Explanation: Resulting contour image.

Returns:
value of ResultContourImage

setResultContourImage

public void setResultContourImage(MTBImage value)
Set value of ResultContourImage. Explanation: Resulting contour image.

Parameters:
value - New value of ResultContourImage

getResultImage

public MTBImage getResultImage()
Get value of ResultImage. Explanation: Resulting label image.

Returns:
value of ResultImage

setResultImage

public void setResultImage(MTBImage value)
Set value of ResultImage. Explanation: Resulting label image.

Parameters:
value - New value of ResultImage

getNumIterations

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

Returns:
value of numIterations

setNumIterations

public void setNumIterations(Integer value)
Set value of numIterations Explanation: Number of iterations performed

Parameters:
New - value of numIterations

getIntermediateLS

public MTBImage getIntermediateLS()

setIntermediateLS

public void setIntermediateLS(MTBImage intermediateLS)


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