@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class ArrayToColorMapImage extends MTBOperator
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.
Modifier and Type | Class and Description |
---|---|
static class |
ArrayToColorMapImage.RangeColor
Possible colors to colorize value ranges.
|
Modifier and Type | Field and Description |
---|---|
protected ArrayToColorMapImage.RangeColor |
colorNegative
Color for negative values.
|
protected ArrayToColorMapImage.RangeColor |
colorPositive
Color for positive values.
|
protected double[][] |
inputArray
Input array to visualize.
|
private MTBImageRGB |
resultImg
Generated result image.
|
protected MTBImageRGB |
targetImage
Optional target image for result.
|
Constructor and Description |
---|
ArrayToColorMapImage()
Default constructor.
|
ArrayToColorMapImage(double[][] array)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
@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.
@Parameter(label="Result Image", required=true, direction=OUT, description="Resulting RGB image.") private transient MTBImageRGB resultImg
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
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.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.