@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class LevelsetSolverPDE extends LevelsetSolverDerivatives
Modifier and Type | Class and Description |
---|---|
static class |
LevelsetSolverPDE.VelocityExpansionMode
Available modes for expanding zero level velocities.
|
Modifier and Type | Field and Description |
---|---|
protected int |
depth
Depth of the input image.
|
protected int |
height
Height of the input image.
|
protected MTBImageRGB |
intermediatePhiColorImage
Color image to visualize intermediate segmentation results.
|
protected Vector<MTBImageByte> |
intermediateResults
List of intermediate result segmentations.
|
protected int |
intermediateResultSamplingRate |
protected MTBImageByte |
intermediateResultStack |
protected MTBPolygon2DSet |
invisibleRegionSet |
protected int |
iteration
Iteration counter.
|
protected int |
maxIterations |
protected double |
narrowBandWidth |
private MTBLevelsetFunctionPDE |
phi_old
Variable to store old level set function for comparison with new one.
|
protected MTBImageRGB |
resultImage |
protected MTBImageByte |
resultMask |
protected boolean |
showIntermediateResults |
(package private) MTBTopologicalNumber2DN4 |
topologicalNumber2DN4
Helper object used in topology preservation.
|
(package private) MTBTopologicalNumber2DN8 |
topologicalNumber2DN8
Helper object used in topology preservation.
|
protected boolean |
topologyPreservation |
protected LevelsetSolverPDE.VelocityExpansionMode |
vExpandMode |
protected int |
width
Width of the input image.
|
approxFunction, deltaApproximator, deltaT, energySet, epsilon, phi
initGenerator, initialSegmentation, inputImg
Constructor and Description |
---|
LevelsetSolverPDE()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Get height of level set function.
|
int |
getMaxIterations()
Get maximal number of iterations.
|
double |
getNarrowBandWidth()
Get width of narrow band.
|
MTBImageRGB |
getResultImage()
Get image with segmentation result overlay.
|
MTBImageByte |
getResultMask()
Get binary mask of segmentation result.
|
int |
getWidth()
Get width of level set function domain.
|
protected void |
operate()
Methode that runs the operator.
|
void |
setInputImg(MTBImage img)
Set input image.
|
void |
setNarrowBandWidth(double w)
Set width of narrow band.
|
protected int |
sgn(double ka)
Returns the sign of a value.
|
protected boolean |
solve()
Solve this level set problem.
|
protected int |
step()
Do one iteration, update all pixels of levelset function (in narrow band).
|
void |
validateCustom() |
getDeltaApproximator, getDeltaT, getEnergySet, getEpsilon, getPhi
getInitialSegmentation, getInputImg, initSegmentation
readResolve
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getDocumentation, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory
@Parameter(label="Velocity Expansion Mode", required=true, direction=IN, dataIOOrder=19, description="Mode for expansion of contour pixel velocities.") protected LevelsetSolverPDE.VelocityExpansionMode vExpandMode
@Parameter(label="Max. Iterations", required=false, direction=IN, dataIOOrder=1, description="Max. number of iterations in iterative optimization.") protected int maxIterations
@Parameter(label="Narrow Band Width", required=false, direction=IN, dataIOOrder=2, description="Width of narrow band, if zero, all pixels are considered.") protected double narrowBandWidth
@Parameter(label="Preserve Topology", required=false, direction=IN, dataIOOrder=3, description="Enables/disables topology preservation.") protected boolean topologyPreservation
@Parameter(label="Regions to mask (only 2D)", required=false, direction=IN, dataIOOrder=4, description="Optional polygon set to set parts of the image invisible.") protected MTBPolygon2DSet invisibleRegionSet
@Parameter(label="Show Intermediate Results", required=false, supplemental=true, dataIOOrder=-99, direction=IN, description="Displays additional, intermediate segmentation results.") protected boolean showIntermediateResults
@Parameter(label="Save Intermediate Segmentations, Rate = ", required=false, supplemental=true, dataIOOrder=-98, direction=IN, description="Sampling rate for intermediate results,\n if zero no stack with intermediate results is generated.") protected int intermediateResultSamplingRate
@Parameter(label="Result Image", direction=OUT, dataIOOrder=0, description="Overlay of contour on input image.") protected transient MTBImageRGB resultImage
@Parameter(label="Result Mask", direction=OUT, dataIOOrder=1, description="Binary segmentation mask.") protected transient MTBImageByte resultMask
@Parameter(label="Intermediate Results Stack", required=false, supplemental=true, dataIOOrder=2, direction=OUT, description="Stack with intermediate results.") protected transient MTBImageByte intermediateResultStack
protected int height
protected int width
protected int depth
protected int iteration
private transient MTBLevelsetFunctionPDE phi_old
MTBTopologicalNumber2DN4 topologicalNumber2DN4
MTBTopologicalNumber2DN8 topologicalNumber2DN8
protected transient Vector<MTBImageByte> intermediateResults
protected transient MTBImageRGB intermediatePhiColorImage
public LevelsetSolverPDE() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected boolean solve()
protected int step()
protected int sgn(double ka)
ka
- Value.public double getNarrowBandWidth()
public void setNarrowBandWidth(double w)
w
- New width of narrow band.public int getWidth()
public int getMaxIterations()
public int getHeight()
public void setInputImg(MTBImage img)
img
- Image to segment.public MTBImageByte getResultMask()
public MTBImageRGB getResultImage()
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.