|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperatorControllable
de.unihalle.informatik.MiToBo.core.operator.MTBOperatorControllable
de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.SnakeOptimizer
de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.SnakeOptimizerCoupled
@ALDDerivedClass @ALDAOperator(genericExecutionMode=ALL) public class SnakeOptimizerCoupled
Image contour segmentation using multiple parametric snakes.
This class provides methods to segment multiple contours in an image based on parametric active contour models, i.e. snakes. Multiple snakes may be coupled in the sense that overlap will be penalized by a common energy term in the functional.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.SnakeOptimizer |
---|
SnakeOptimizer.Snake_status |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperatorControllable |
---|
de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorControlStatus, de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorExecutionStatus |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
protected boolean[] |
activityArray
Array of active snakes, suitable for masking snakes in optimization. |
protected int[] |
colorArray
Array containing pseudo-colors for snake visualization. |
protected MTBImageRGB |
dispImg
Image for displaying intermediate/final results. |
protected int[] |
iterationsPerSnake
Number of iterations done for each snake. |
protected int[][] |
overlapMask
Mask to indicate overlap regions between snakes. |
protected boolean |
overlapMaskRequested
Flag to indicate if overlap mask is required by at least one energy. |
protected SnakeOptimizerSingle[] |
snakeOpters
Array of individual snake optimizers. |
protected SnakeOptimizerSingle |
snakeOptimizer
Optimizer object for a single snake. |
Fields inherited from class de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.SnakeOptimizer |
---|
counterClockwiseSnakePointOrderRequested, energyData, excludeMask, iHeight, inImg, initialSnakes, intermediateResults, itCounter, iWidth, outIntermediateResultsStack, outIntermediateResultsStackInterval, outIntermediateResultsStackWanted, outSnakes, outSnakesImg, sampleEnergyData, saveIntermediateResults, saveIntermediateResultsPath, showIntermediateResults, snakeNum |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperatorControllable |
---|
configurationEventlistenerList, controlEventlistenerList, notifyListenersRecursively, operatorExecStatus, operatorStatus, stepSize, stepWiseExecution |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
SnakeOptimizerCoupled()
Default constructor. |
|
SnakeOptimizerCoupled(MTBImage img,
MTBPolygon2DSet initSnakes,
SnakeOptimizerSingle sopt,
boolean[] activeArray)
Default constructor. |
Method Summary | |
---|---|
SnakeOptimizerCoupled |
clone()
|
protected void |
closeWindows()
Close all windows openened by this operator (for clean-up). |
protected SnakeOptimizer.Snake_status |
doIteration()
Here the main work should be done. |
boolean[] |
getActivityArray()
Returns current activity array. |
int[][] |
getCurrentOverlapMask()
Get the current overlap mask. |
MTBPolygon2DSet |
getCurrentSnakes()
Returns a copy of the set of current snakes. |
int[] |
getIterationsPerSnake()
Returns the total number of iterations per snake. |
MTBImage |
getWorkingImage()
Returns working image. |
protected void |
initOptimizer()
Initializes the optimizer. |
protected void |
plotImageToBackground()
Copies the input image as background into the output frame. |
protected void |
plotSnakeToImage(MTBImageRGB img)
|
void |
printParams()
Print current parameter settings to standard output device. |
protected void |
saveSnake()
Save intermediate results. |
void |
setActivityArray(boolean[] array)
Specify set of active snakes. |
void |
setColorArray(int[] array)
Specify pseudo-colors for snake visualization. |
protected void |
showSnake()
Display input image with current snake overlayed. |
String |
toString()
|
void |
updateOverlapMask()
Update current overlap mask for all snakes. |
void |
validateCustom()
|
Methods inherited from class de.unihalle.informatik.MiToBo.segmentation.snakes.optimize.SnakeOptimizer |
---|
disableSaveIntermediateResults, disableShowIntermediateResults, enableSaveIntermediateResults, enableShowIntermediateResults, getExcludeMask, getInitialSnakes, getInputImage, getIterationCount, getResultSnakeImage, getResultSnakes, getSnakeNumber, getStackWithIntermediateResults, operate, readResolve, setExcludeMask, setInitialSnakes, setInputImage, setIntermediateResultPath, supportsStepWiseExecution, wantStackWithIntermediateResults |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperatorControllable |
---|
addALDConfigurationEventListener, addALDControlEventListener, fireALDConfigurationEvent, fireALDControlEvent, getExecutionStatus, handleALDConfigurationEvent, handleALDControlEvent, removeALDConfigurationEventListener, removeALDControlEventListener, setNotifyRecursiveFlag |
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, validateGeneric, writeHistory, writeHistory, writeHistory |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@Parameter(label="Snake Optimizer", direction=IN, required=true, dataIOOrder=3, description="Snake optimizer for single snake segmentation.") protected SnakeOptimizerSingle snakeOptimizer
@Parameter(label="Activity array", direction=IN, required=false, description="Array of active snakes.") protected boolean[] activityArray
Note, per default all snakes are active. The size of the array on init is just randomly chosen, but a certain size is required since otherwise the GUI will initialize the array with false values.
@Parameter(label="Number of iterations per snake", direction=OUT, description="Iterations per snake.") protected transient int[] iterationsPerSnake
protected transient SnakeOptimizerSingle[] snakeOpters
protected transient int[] colorArray
protected transient boolean overlapMaskRequested
protected transient int[][] overlapMask
protected transient MTBImageRGB dispImg
Constructor Detail |
---|
public SnakeOptimizerCoupled() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public SnakeOptimizerCoupled(MTBImage img, MTBPolygon2DSet initSnakes, SnakeOptimizerSingle sopt, boolean[] activeArray) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- Image to work on.initSnakes
- Set of initial snakes.sopt
- Snake optimizer.activeArray
- Array indicating active snakes.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class SnakeOptimizer
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public SnakeOptimizerCoupled clone()
clone
in class SnakeOptimizer
public void setActivityArray(boolean[] array)
array
- Boolean array to indicate active snakes.public boolean[] getActivityArray()
public void setColorArray(int[] array)
protected void initOptimizer() throws MTBSnakeException
Here internal member variables are initialized according to the given parameters, and memory for intermediate results and debug data is allocated.
initOptimizer
in class SnakeOptimizer
MTBSnakeException
protected SnakeOptimizer.Snake_status doIteration() throws MTBException
SnakeOptimizer
doIteration
in class SnakeOptimizer
MTBException
protected void showSnake()
showSnake
in class SnakeOptimizer
protected void closeWindows()
SnakeOptimizer
closeWindows
in class SnakeOptimizer
protected void saveSnake()
SnakeOptimizer
saveSnake
in class SnakeOptimizer
public void updateOverlapMask()
public MTBImage getWorkingImage()
SnakeOptimizer
Usually this will be the input image, however, e.g. in case of image normalization being applied the normalized image will be returned.
getWorkingImage
in class SnakeOptimizer
public MTBPolygon2DSet getCurrentSnakes()
getCurrentSnakes
in class SnakeOptimizer
public int[][] getCurrentOverlapMask()
public int[] getIterationsPerSnake()
public void printParams()
SnakeOptimizer
printParams
in class SnakeOptimizer
public String toString()
toString
in class SnakeOptimizer
protected void plotImageToBackground()
protected void plotSnakeToImage(MTBImageRGB img)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |