@ALDAOperator(genericExecutionMode=NONE, level=STANDARD) public class GVFFieldCalculator2D extends MTBOperator
Modifier and Type | Field and Description |
---|---|
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.
|
Constructor and Description |
---|
GVFFieldCalculator2D()
Standard constructor.
|
GVFFieldCalculator2D(MTBImage inImg,
int iterations)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
private transient int width
private transient int height
private transient MTBImage.MTBImageType type
@Parameter(label="numIterations", required=true, direction=IN, description="Number of GVF field iterations") private int numIterations
@Parameter(label="inputImage", required=true, direction=IN, description="Input image") private transient MTBImage inputImage
@Parameter(label="vectorField", required=true, direction=IN, description="Gradient vector field of the 2D image.") private transient MTBVectorField2D vectorField
protected transient double[] myX
protected transient double[] myY
protected transient double[] xFlow
protected transient double[] yFlow
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 fieldde.unihalle.informatik.Alida.exceptions.ALDOperatorException
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 imageprotected double[] Abl_Y(double[] values, int w, int h)
values
- gradient values of the 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[] 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 imageCopyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.