|
||||||||||
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.color.visualization.ArrayToColorMapImage
@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class ArrayToColorMapImage
This operator visualizes a 2D array using a specified color mapping.
Negative and positive values are shown highly saturated in the corresponding
color for the negative and positive value ranges, respectively. Values close
to zero appear almost white, i.e. least saturated.
The default color map is a red-blue color map, i.e. negative values are
shown in blue, positive ones in red.
Nested Class Summary | |
---|---|
static class |
ArrayToColorMapImage.RangeColor
Possible colors to colorize value ranges. |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
protected ArrayToColorMapImage.RangeColor |
colorNegative
Color for negative values. |
protected ArrayToColorMapImage.RangeColor |
colorPositive
Color for positive values. |
protected double[][] |
inputArray
Input array to visualize. |
protected MTBImageRGB |
targetImage
Optional target image for result. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ArrayToColorMapImage()
Default constructor. |
|
ArrayToColorMapImage(double[][] array)
Constructor. |
Method Summary | |
---|---|
protected static double |
convertRangeColorToHue(ArrayToColorMapImage.RangeColor c)
Converts given color to hue value. |
MTBImageRGB |
getResultImage()
Returns the result color image. |
protected void |
operate()
This method does the actual work. |
void |
setNegativeColor(ArrayToColorMapImage.RangeColor c)
Color for negative values. |
void |
setPositiveColor(ArrayToColorMapImage.RangeColor c)
Color for positive values. |
void |
setTargetImage(MTBImageRGB tImage)
Set target image. |
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 |
---|
@Parameter(label="Input Array", required=true, dataIOOrder=1, direction=IN, description="Input array.") protected double[][] inputArray
If the array has h rows and w columns, the result image gets a size of w x h.
@Parameter(label="Positive range color", required=false, dataIOOrder=1, direction=IN, description="Positive color.") protected ArrayToColorMapImage.RangeColor colorPositive
@Parameter(label="Negative range color", required=false, dataIOOrder=2, direction=IN, description="Negative color.") protected ArrayToColorMapImage.RangeColor colorNegative
@Parameter(label="Target image", required=false, dataIOOrder=3, direction=IN, description="Target image.") protected transient MTBImageRGB targetImage
If left unset a new image is generated.
Constructor Detail |
---|
public ArrayToColorMapImage() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ArrayToColorMapImage(double[][] array) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
array
- Input array.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public MTBImageRGB getResultImage()
public void setTargetImage(MTBImageRGB tImage)
tImage
- Image where to plot the result.public void setPositiveColor(ArrayToColorMapImage.RangeColor c)
c
- Color to use.public void setNegativeColor(ArrayToColorMapImage.RangeColor c)
c
- Color to use.protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected static double convertRangeColorToHue(ArrayToColorMapImage.RangeColor c)
c
- Color identifier.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |