|
||||||||
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.GradientFieldCalculator2D
@ALDAOperator(genericExecutionMode=ALL, level=STANDARD) public class GradientFieldCalculator2D
Class to calculate a gradient vector field of a given image.
Some methods to get derivatives on several operators are implemented like central and forward differences and the Sobel operator.
Nested Class Summary | |
---|---|
static class |
GradientFieldCalculator2D.GradientMode
Provided calculation modes for calculation the gradient image. |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
private GradientFieldCalculator2D.GradientMode |
gradientMode
The used gradient mode for field calculation. |
private int |
height
Height of the image. |
private MTBImage |
inputImage
The input image to get the gradient values and differences. |
private MTBVectorField2D |
vectorField
The resulting 2D vector field. |
private MTBImageDouble |
vectorFieldImage
The resulting 2D vector field stored to an image. |
private int |
width
Width of the image. |
protected double[] |
xFlow
Vector field flow in x-direction. |
protected double[] |
yFlow
Vector field flow in y-direction. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
GradientFieldCalculator2D()
Standard constructor. |
|
GradientFieldCalculator2D(MTBImage inImg,
GradientFieldCalculator2D.GradientMode mode)
Constructor. |
Method Summary | |
---|---|
GradientFieldCalculator2D.GradientMode |
getGradientMode()
Get the used gradient mode for field calculation. |
void |
getGradientMode(GradientFieldCalculator2D.GradientMode mode)
Set the used gradient mode for field calculation. |
int |
getHeight()
Get image height. |
MTBImage |
getInputImage()
Get the underlying input image of the gradient field.. |
protected void |
getPartialDiffX_forward()
Calculate first order partial derivative in x-direction using forward differences. |
protected void |
getPartialDiffX_sobel()
Calculate first order partial derivative in x-direction using Sobel. |
protected void |
getPartialDiffX()
Calculate first order partial derivative in x-direction using central differences. |
protected void |
getPartialDiffY_forward()
Calculate first order partial derivative in y-direction using forward differences. |
protected void |
getPartialDiffY_sobel()
Calculate first order partial derivative in y-direction using Sobel. |
protected void |
getPartialDiffY()
Calculate first order partial derivative in y-direction using central differences. |
MTBVectorField2D |
getVectorField()
Get the resulting 2D vector field. |
int |
getWidth()
Get image width. |
protected void |
operate()
This method does the actual work. |
void |
setHeight(int h)
Set image height. |
void |
setInputImage(MTBImage inImg)
Set the underlying input image of the gradient 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 |
---|
@Parameter(label="Approximation Mode", required=true, direction=IN, dataIOOrder=-8, description="Type of the gradient mode") private GradientFieldCalculator2D.GradientMode gradientMode
private transient int height
@Parameter(label="Input Image", required=true, direction=IN, dataIOOrder=-10, description="Input image") private transient MTBImage inputImage
@Parameter(label="Vector Field", direction=OUT, description="Gradient field of the 2D image.") private transient MTBVectorField2D vectorField
@Parameter(label="Vector Field Image", direction=OUT, description="Gradient field image.") private transient MTBImageDouble vectorFieldImage
The image has to layers where the first one contains the values of the x-direction and the second one the values of the y-direction.
private transient int width
protected double[] xFlow
protected double[] yFlow
Constructor Detail |
---|
public GradientFieldCalculator2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public GradientFieldCalculator2D(MTBImage inImg, GradientFieldCalculator2D.GradientMode mode) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inImg
- image to work onmode
- gradient calculation mode
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public GradientFieldCalculator2D.GradientMode getGradientMode()
public void getGradientMode(GradientFieldCalculator2D.GradientMode mode)
public int getHeight()
public MTBImage getInputImage()
protected void getPartialDiffX_forward()
protected void getPartialDiffX_sobel()
protected void getPartialDiffX()
protected void getPartialDiffY_forward()
protected void getPartialDiffY_sobel()
protected void getPartialDiffY()
public MTBVectorField2D getVectorField()
public int getWidth()
protected void operate()
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
public void setHeight(int h)
public void setInputImage(MTBImage inImg)
public void setWidth(int w)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |