|
||||||||
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) 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 | |
---|---|
private int |
height
Size of the image and the calculated gvf field in y-direction. |
private MTBImage |
inputImage
The input image as base for the GVF field calculation. |
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. |
private int |
numIterations
Number of iterations for calculating the GVF field. |
private MTBImage.MTBImageType |
type
Type of the input image and later the type of the calculated 2D vector field. |
private MTBVectorField2D |
vectorField
The calculated GVF vector field. |
private int |
width
Size of the image and the calculated gvf field in x-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, 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 |
---|
deserializeFromXmlFile, fieldContained, getALDPortHashAccessKey, getConstructionMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, isConfigured, parametersToXmlObject, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, runOp, runOp, runOp, serializeToXmlFile, setConstructionMode, setName, setParameter, setParametersFromXml, setParametersFromXml, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory, writeParametersToXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private transient int height
@Parameter(label="inputImage", required=true, direction=IN, description="Input image") private transient MTBImage inputImage
protected transient double[] myX
protected transient double[] myY
@Parameter(label="numIterations", required=true, direction=IN, description="Number of GVF field iterations") private int numIterations
private transient MTBImage.MTBImageType type
@Parameter(label="vectorField", required=true, direction=IN, description="Gradient vector field of the 2D image.") private transient MTBVectorField2D vectorField
private transient int width
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 |
---|
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[] 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[] 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[] BoundShrink(double[] A, int w, int h)
A
- gradient image of the given imagew
- width of the given imageh
- height of the given imageprotected void calcGVF()
public int getHeight()
public MTBImage getInputImage()
public int getNumIterations()
public MTBImage.MTBImageType getType()
protected double[] getValues()
public MTBVectorField2D getVectorField()
public int getWidth()
protected void normValues()
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
public void setHeight(int h)
public void setInputImage(MTBImage inImg)
public void setNumIterations(int iterations)
public void setWidth(int w)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |