|
||||||||||
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.MiToBo.core.operator.MTBOperator
de.unihalle.informatik.MiToBo.fields.GVFFieldCalculator2D
@ALDAOperator(genericExecutionMode=NONE, level=STANDARD) @ALDMetaInfo(export=ALLOWED) public class GVFFieldCalculator2D
Class to calculate a special 2D vector field, a Gradient Vector Flow Field (GVF) with its x- and y-flows from the given image. The GVF field is used as external energy in the snake calculation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
protected double[] |
myX
The flows of the field in x- and y-direction. |
protected double[] |
myY
The flows of the field in x- and y-direction. |
protected double[] |
xFlow
The flows of the field in x- and y-direction. |
protected double[] |
yFlow
The flows of the field in x- and y-direction. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
GVFFieldCalculator2D()
Standard constructor. |
|
GVFFieldCalculator2D(MTBImage inImg,
int iterations)
Constructor. |
Method Summary | |
---|---|
protected double[] |
Abl_X(double[] values,
int w,
int h)
Calculate the x-derivative of the gradient image. |
protected double[] |
Abl_Y(double[] values,
int w,
int h)
Calculate the y-derivative of the gradient image. |
protected double[] |
BoundEnsure(double[] A,
int w,
int h)
Test the image boundary. |
protected double[] |
BoundExpand(double[] A,
int w,
int h)
Expand the image boundary. |
protected double[] |
BoundShrink(double[] A,
int w,
int h)
Shrink the image boundary. |
protected void |
calcGVF()
Calculate the GVF field with the given number of iterations on the given input image. |
int |
getHeight()
Get image height. |
MTBImage |
getInputImage()
Get input image. |
int |
getNumIterations()
Get number of iterations for the GVF field. |
MTBImage.MTBImageType |
getType()
Get input image type. |
protected double[] |
getValues()
Get the double values of the given image. |
MTBVectorField2D |
getVectorField()
Get calculated GVF vector field.. |
int |
getWidth()
Get image width. |
protected void |
normValues()
Normalize the values in the gvf field in a range of [-1,1]. |
protected void |
operate()
This method does the actual work. |
void |
setHeight(int h)
Set image height. |
void |
setInputImage(MTBImage inImg)
Set input image. |
void |
setNumIterations(int iterations)
Set number of iterations for the GVF field. |
void |
setWidth(int w)
Set image width. |
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 |
Field Detail |
---|
protected transient double[] myX
protected transient double[] myY
protected transient double[] xFlow
protected transient double[] yFlow
Constructor Detail |
---|
public GVFFieldCalculator2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public GVFFieldCalculator2D(MTBImage inImg, int iterations) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inImg
- image to work oniterations
- number of iterations for the gvf field
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public MTBImage getInputImage()
public void setInputImage(MTBImage inImg)
public int getNumIterations()
public void setNumIterations(int iterations)
public MTBImage.MTBImageType getType()
public MTBVectorField2D getVectorField()
public int getWidth()
public void setWidth(int w)
public int getHeight()
public void setHeight(int h)
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void calcGVF()
protected double[] getValues()
protected void normValues()
protected double[] Abl_X(double[] values, int w, int h)
values
- gradient values of the imagew
- width of the given imageh
- height of the given image
protected double[] Abl_Y(double[] values, int w, int h)
values
- gradient values of the imagew
- width of the given imageh
- height of the given image
protected double[] BoundExpand(double[] A, int w, int h)
A
- gradient image of the given imagew
- width of the given imageh
- height of the given imageprotected double[] BoundEnsure(double[] A, int w, int h)
A
- gradient image of the given imagew
- width of the given imageh
- height of the given imageprotected double[] BoundShrink(double[] A, int w, int h)
A
- gradient image of the given imagew
- width of the given imageh
- height of the given image
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |