|
||||||||
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.FieldOperations2D
@ALDAOperator(genericExecutionMode=NONE, level=STANDARD) public class FieldOperations2D
Class implements several operations on a 2D vector field.
Nested Class Summary | |
---|---|
static class |
FieldOperations2D.FieldOperation
Several operation types on a 2D vector field. |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
private int |
fieldSizeX
Vector field size in x-direction. |
private int |
fieldSizeY
Vector field size in y-direction. |
private FieldOperations2D.FieldOperation |
operationType
The operation which should be applied to the input vector field. |
private MTBImage |
resultImage
Several result formats. |
private double[] |
U
U-component-vector of the vector field. |
private double[] |
V
V-component-vector of the vector field. |
private MTBVectorField2D |
vectorField
The 2D vector field for several operations. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
FieldOperations2D()
Standard constructor. |
|
FieldOperations2D(MTBVectorField2D inField,
FieldOperations2D.FieldOperation op)
Constructor to create a new field operation operator. |
Method Summary | |
---|---|
protected MTBImageRGB |
colorPlot()
Plots the field in colored image. |
protected MTBImage |
getDiffX_image()
Calculate the image from the first order partial derivative in x-direction from the vectors U and V. |
protected MTBImage |
getDiffY_image()
Calculate the image from the first order partial derivative in y-direction from the vectors U and V. |
int |
getFieldSizeX()
Get the field size in x-direction. |
int |
getFieldSizeY()
Get the field size in y-direction. |
protected MTBImage |
getMagImage()
Calculate the gradient magnitude image from the vectors U and V. |
protected MTBImage |
getNormedMagImage()
Normalize the gradient magnitude values into a range of [0,1]. |
FieldOperations2D.FieldOperation |
getOperationType()
Get the operation type which should be applied to the input vector field. |
MTBImage |
getResultImage()
Get result image of the operation on the vector field. |
MTBVectorField2D |
getVectorField()
Get the operation based 2D vector field. |
protected void |
operate()
This method does the actual work. |
void |
setFieldSizeX(int sizeX)
Set the field size in x-direction. |
void |
setFieldSizeY(int sizeY)
Set the field size in y-direction. |
void |
setOperationType(FieldOperations2D.FieldOperation type)
|
void |
setVectorField(MTBVectorField2D inField)
Set the operation based 2D vector field. |
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="fieldSizeX", required=true, direction=IN, description="Size of the vector field in x-direction") private int fieldSizeX
@Parameter(label="fieldSizeY", required=true, direction=IN, description="Size of the vector field in y-direction") private int fieldSizeY
@Parameter(label="Operation Type", required=true, direction=IN, description="Type of used field operation.") private FieldOperations2D.FieldOperation operationType
@Parameter(label="Result Image", required=false, direction=OUT, description="Result image.") private transient MTBImage resultImage
private transient double[] U
private transient double[] V
@Parameter(label="Vector Field", required=true, direction=IN, description="2D vector field input") private transient MTBVectorField2D vectorField
Constructor Detail |
---|
public FieldOperations2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public FieldOperations2D(MTBVectorField2D inField, FieldOperations2D.FieldOperation op) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inField
- input 2D vector fieldop
- operator type
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
protected MTBImageRGB colorPlot()
Plots the field in colored image. The colors derived from the field vectors magnitude (length of the vector) and their direction (degree from x-axis to y-axis). HSI color spaced is used to represent direction and magnitude. To view the field, HSI color space is converted to RGBcolor space. H: (the used color) is derived from the angle of the vector. S: (saturation) of color H is derived from the vector magnitude. I: (color intensity) is set to 1.0 (100%), to get colors only from 0% saturation of color H (white) to 100% saturation of color H. Ranges of HSI: H in [0, 360) (representing degrees), S and I in [0, 1] (representing [0, 100 %]).
protected MTBImage getDiffX_image()
protected MTBImage getDiffY_image()
public int getFieldSizeX()
public int getFieldSizeY()
protected MTBImage getMagImage()
protected MTBImage getNormedMagImage()
public FieldOperations2D.FieldOperation getOperationType()
public MTBImage getResultImage()
public MTBVectorField2D getVectorField()
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 setFieldSizeX(int sizeX)
public void setFieldSizeY(int sizeY)
public void setOperationType(FieldOperations2D.FieldOperation type)
public void setVectorField(MTBVectorField2D inField)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |