SoLUTEditor¶
-
InventorModule
¶ genre LUT
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoLUTTools
definition SoLUTTools.def see also SoLUTEditor2D
,SoMLLUT
,ApplyLUT
,TableLUT
,SoGVRVolumeRenderer
keywords lookup
,table
Purpose¶
The module SoLUTEditor
allows to edit a RGBA Lookup Table and outputs it as a MLLUT and SoMLLUT object.
Also, the module can be placed in front of a SoView2D
or a SoGVRVolumeRenderer
module to set the LUT in an Open Inventor scene.
NOTE: The SoLUTEditor should mainly be used for interactive editing. If you need a static or programmatic LUT, you should better use a TableLUT
.
Details¶
In the graphical editor, the whole LUT is displayed and can interactively be adjusted.
The horizontal position of a point corresponds with its image value and the vertical position with the opacity.
A point at the bottom marks full transparency while a point at the top marks full opacity.
The color of a point marks the color of that LUT entry.
Below the graph, the interpolated color gradient of the whole LUT is displayed.
Interaction¶
In the editor window, new points can be placed by clicking and existing points can be moved by dragging.
An existing point can be removed by pressing DELETE.
The module supports undo/redo; press CTRL-Z to undo and CTRL-Y to redo.
Input Fields¶
inHistogram¶
-
name:
inHistogram
, type:
CurveData(MLBase)
¶ Needs a CurveData object as input to show as a histogram in the editor.
For accessing this object via scripting see the Scripting Reference:MLCurveDataWrapper
.
Output Fields¶
Parameter Fields¶
Field Index¶
Visible Fields¶
Color¶
-
name:
currentColor
, type:
Color
, persistent:
no
¶ Sets the color of the currently selected point in the editor.
The color editor to the right of this field can also be used to set the color.
Opacity¶
-
name:
currentOpacity
, type:
Float
, minimum:
0
, maximum:
1
, persistent:
no
¶ Sets the opacity of the currently selected point in the editor.
Position¶
-
name:
currentPosition
, type:
Float
, persistent:
no
¶ Sets the position of a LUT entry corresponding with the target image value.
Index¶
-
name:
currentIndex
, type:
Integer
, persistent:
no
¶ Sets the index of a LUT entry point.
With adjusting the index, a certain LUT entry point can be chosen without risking to accidentally move an entry point while selecting it.
Window¶
-
name:
window
, type:
Float
, default:
1
, minimum:
0
, maximum:
1
¶ Sets the relative window value of the LUT.
Level¶
-
name:
level
, type:
Float
, default:
0.5
, minimum:
0
, maximum:
1
¶ Sets the relative level value of the LUT.
Allow New Points¶
-
name:
allowNewPoints
, type:
Bool
, default:
TRUE
¶ If checked, new points can interactively be placed by clicking onto the editor’s graph.
Otherwise, the editor only allows to interactively move points or to delete them.
Update LUT while dragging¶
-
name:
updateLutWhileDragging
, type:
Bool
, default:
TRUE
¶ If checked, the output LUTs are updated while dragging an entry point.
Otherwise, the output LUTs are update on finishing a drag.
Relative LUT¶
-
name:
relativeLut
, type:
Bool
, default:
FALSE
¶ If checked, the module outputs a relative LUT.
Otherwise, the output LUT is absolute.
Current range¶
-
name:
rangeInfo
, type:
String
, persistent:
no
¶ Shows the current range of the LUT.
Even if the output is a relative LUT, the min and max values remain.
Col. Interpol.¶
-
name:
colorInterpolation
, type:
Enum
, default:
InterpolateRGB
¶ Defines the interpolation scheme of the color values.
Values:
Title | Name |
---|---|
RGB | InterpolateRGB |
HLS | InterpolateHLS |
HLS negative | InterpolateHLSneg |
HLS positive | InterpolateHLSpos |
Constant | InterpolateConstant |
sRGB | InterpolateSRGB |
Alpha Factor¶
-
name:
alphaFactor
, type:
Float
, default:
1
, minimum:
0
, maximum:
10
¶ Sets a global alpha multiplicator value.
Be careful with this setting!
Undo¶
-
name:
undo
, type:
Trigger
¶ If pressed, the last interactive change is undone.
Press CTRL-Z in the editor.
Redo¶
-
name:
redo
, type:
Trigger
¶ If pressed, the last undone command is redone.
Press CTRL-Y in the editor.
New Range Min¶
-
name:
newRangeMin
, type:
Float
, default:
0
¶ Sets a new minimum value to the LUT’s range.
New Range Max¶
-
name:
newRangeMax
, type:
Float
, default:
4095
¶ Sets a new maximum value to the LUT’s range.
New Range Mode¶
-
name:
newRangeMode
, type:
Enum
, default:
ClipFormerLUT
¶ Defines how the old LUT entries should be translated to a new range.
Values:
Title | Name | Description |
---|---|---|
Scale Former LUT | ScaleFormerLUT | All values of the old LUT are scaled to the new LUT. |
Clip Former LUT | ClipFormerLUT | The old LUT is clipped if the new min is greater than the old min or the old max is less than the new max. Otherwise, the first or the last entry point is copied. |
Apply New Range¶
-
name:
applyNewRange
, type:
Trigger
¶ If pressed, the new min/max values of the LUT are applied.
The new LUT is computed from the old LUT based on the
New Range Mode
.
Update Range From Histogram¶
-
name:
updateRangeFromHistogram
, type:
Trigger
¶ Sets the min/max values of the LUT to the min/max values of the input histogram.
Reset To Ramp¶
-
name:
resetToRamp
, type:
Trigger
¶ If pressed, the LUT is reset to a standard ramp.
The standard ramp yields two entry points with the first entry point being black and fully transparent while the second and last point being white and fully opaque.
Color Editor Height¶
-
name:
colorEditorHeight
, type:
Float
, default:
24
¶ Sets the height of the color editor which shows the color gradient.
Show Color Editor¶
-
name:
showColorEditor
, type:
Bool
, default:
TRUE
¶ If checked, the editor shows the color gradient of the current LUT.
Also, the color gradient allows for an interactive placement of LUT entry points.
Show Alpha Editor¶
-
name:
showAlphaEditor
, type:
Bool
, default:
TRUE
¶ If checked, the LUT entry points reflect the opactity in their vertical placement.
Otherwise, the editor only shows the color gradient.
Marker Radius¶
-
name:
markerRadius
, type:
Integer
, default:
4
¶ Sets the size of the LUT entry points in the interactive editor.
Selected Marker Radius¶
-
name:
selectedMarkerRadius
, type:
Integer
, default:
6
¶ Sets the size of the selected LUT entry points in the interactive editor.
Snap Marker Radius¶
-
name:
snapMarkerRadius
, type:
Integer
, default:
10
¶ Sets the radius for selecting an entry point in the interactive editor.
Alpha Line Width¶
-
name:
alphaLineWidth
, type:
Integer
, default:
2
¶ Sets the width of the line indicating the alpha values in the interactive editor.
Background Color¶
-
name:
backgroundColor
, type:
Color
, default:
0.800000011920929 0.800000011920929 0.800000011920929
¶ Sets the background color of the interactive editor.
Margin Color¶
-
name:
marginColor
, type:
Color
, default:
0.830999970436096 0.815999984741211 0.783999979496002
¶
Border Color¶
-
name:
borderColor
, type:
Color
, default:
0 0 0
¶ Sets the color of the border of the interactive editor and the LUT entry points.
Alpha Line Color¶
-
name:
alphaLineColor
, type:
Color
, default:
0 0 0
¶ Sets the color of the line indicating the alpha value in the interactive editor.
Histogram Color¶
-
name:
histogramColor
, type:
Color
, default:
0.400000005960464 0.400000005960464 0.400000005960464
¶ Sets the color of the optional histogram in the background of the interactive editor.
Draw Colored Markers¶
-
name:
drawColoredMarkers
, type:
Bool
, default:
TRUE
¶ If checked, the entry points are rendered in their corresponding color of the LUT.
Otherwise, the color of the selected and the unselected entry points can be adjusted.
Selected Marker Color¶
-
name:
selectedMarkerColor
, type:
Color
, default:
1 0.5 0.5
¶ Sets the color of the selected entry point.
Selected Triangle Size¶
-
name:
selectedTriangleSize
, type:
Integer
, default:
8
¶ Sets the size of the selected triangle in the color editor.