Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
9597844a
Commit
9597844a
authored
Jan 16, 2013
by
Sebastian Eichelbaum
Browse files
[CHANGE
#172
] now colormaps support the window level settings.
parent
9db1ef0a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
203 additions
and
60 deletions
+203
-60
src/core/graphicsEngine/WGETexture.h
src/core/graphicsEngine/WGETexture.h
+24
-4
src/core/graphicsEngine/shaders/shaders/WGEColorMapsImproved.glsl
.../graphicsEngine/shaders/shaders/WGEColorMapsImproved.glsl
+56
-10
src/core/graphicsEngine/shaders/shaders/WGEColormapping-fragment.glsl
...phicsEngine/shaders/shaders/WGEColormapping-fragment.glsl
+40
-11
src/core/graphicsEngine/shaders/shaders/WGEColormapping-uniforms.glsl
...phicsEngine/shaders/shaders/WGEColormapping-uniforms.glsl
+80
-32
src/qt4gui/qt4/controlPanel/WPropertyIntervalWidget.cpp
src/qt4gui/qt4/controlPanel/WPropertyIntervalWidget.cpp
+3
-3
No files found.
src/core/graphicsEngine/WGETexture.h
View file @
9597844a
...
...
@@ -156,10 +156,17 @@ public:
/**
* Returns the window level definition for the colormap. The property can be changed. A change affects all colormaps using this texture.
*
* \return window colormap
* \return window colormap
*/
WPropInterval
window
()
const
;
/**
* Returns the property responsible for enabling window based interval scaling. If this is false, the window setting is ignored.
*
* \return windowing-enable property.
*/
WPropBool
windowEnabled
()
const
;
/**
* Returns the texture transformation matrix. The property can be changed. A change affects all colormaps using this texture. This matrix
* converts an world-space coordinate to an texture coordinate! This can be seen as a scaled inverse matrix of the grid's transformation.
...
...
@@ -363,6 +370,11 @@ private:
* Window level setting for the current colormap
*/
WPropInterval
m_window
;
/**
* Window-Level-Setting-enable flag.
*/
WPropBool
m_windowEnabled
;
};
// Some convenience typedefs
...
...
@@ -442,6 +454,10 @@ void WGETexture< TextureType >::setupProperties( double scale, double min )
m_threshold
->
setMin
(
min
);
m_threshold
->
setMax
(
min
+
scale
);
m_windowEnabled
=
m_properties
->
addProperty
(
"Enable Windowing"
,
"If enabled, window level settings are applied."
,
false
);
m_window
=
m_properties
->
addProperty
(
"Window Level"
,
"Define the interval in the data which is mapped to the colormap."
,
make_interval
(
0.0
,
1.0
)
);
m_interpolation
=
m_properties
->
addProperty
(
"Interpolate"
,
"Interpolation of the volume data."
,
true
,
m_propCondition
);
m_colorMapSelectionsList
=
boost
::
shared_ptr
<
WItemSelection
>
(
new
WItemSelection
()
);
...
...
@@ -458,9 +474,6 @@ void WGETexture< TextureType >::setupProperties( double scale, double min )
m_active
=
m_properties
->
addProperty
(
"Active"
,
"Can dis-enable a texture."
,
true
);
m_window
=
m_properties
->
addProperty
(
"Window Level"
,
"Define the interval in the data which is mapped to the colormap."
,
make_interval
(
0.0
,
1.0
)
);
WMatrix4d
m
=
WMatrix4d
::
identity
();
m_texMatrix
=
m_properties
->
addProperty
(
"Texture Transformation"
,
"Usable to transform the texture."
,
m
);
m_texMatrix
->
setPurpose
(
PV_PURPOSE_INFORMATION
);
...
...
@@ -547,6 +560,12 @@ inline WPropBool WGETexture< TextureType >::active() const
return
m_active
;
}
template
<
typename
TextureType
>
inline
WPropBool
WGETexture
<
TextureType
>::
windowEnabled
()
const
{
return
m_windowEnabled
;
}
template
<
typename
TextureType
>
inline
WPropInterval
WGETexture
<
TextureType
>::
window
()
const
{
...
...
@@ -579,6 +598,7 @@ void WGETexture< TextureType >::applyUniforms( std::string prefix, osg::StateSe
states
->
addUniform
(
new
WGEPropertyUniform
<
WPropDouble
>
(
prefix
+
"Threshold"
,
threshold
()
)
);
states
->
addUniform
(
new
WGEPropertyUniform
<
WPropSelection
>
(
prefix
+
"Colormap"
,
colormap
()
)
);
states
->
addUniform
(
new
WGEPropertyUniform
<
WPropBool
>
(
prefix
+
"Active"
,
active
()
)
);
states
->
addUniform
(
new
WGEPropertyUniform
<
WPropBool
>
(
prefix
+
"WindowEnabled"
,
windowEnabled
()
)
);
states
->
addUniform
(
new
WGEPropertyUniform
<
WPropInterval
>
(
prefix
+
"Window"
,
window
()
)
);
}
...
...
src/core/graphicsEngine/shaders/shaders/WGEColorMapsImproved.glsl
View file @
9597844a
...
...
@@ -433,52 +433,98 @@ vec4 atlas( in float value )
* \param scaleV the scaler used to downscale the original value to [0-1]
* \param thresholdV a threshold in original space (you need to downscale it to [0-1] if you want to use it to scaled values.
* \param thresholdEnabled a flag denoting whether threshold-based clipping should be done or not
* \param window a window level scaling in the descaled value
* \param windowEnabled if true, the window level scaling is applied
* \param alpha the alpha blending value
* \param colormap the colormap index to use
*/
vec4
colormap
(
in
vec4
value
,
float
minV
,
float
scaleV
,
float
thresholdV
,
bool
thresholdEnabled
,
float
alpha
,
int
colormap
,
bool
active
)
vec4
colormap
(
in
vec4
value
,
float
minV
,
float
scaleV
,
float
thresholdV
,
bool
thresholdEnabled
,
vec2
window
,
bool
windowEnabled
,
float
alpha
,
int
colormap
,
bool
active
)
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Scale the input data to original space, and apply windowing
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// descale value
vec3
valueDescaled
=
vec3
(
minV
)
+
(
value
.
rgb
*
scaleV
);
// apply window scaling. If windowing is disabled, the window is the same as the original data interval
float
winLo
=
(
window
.
x
*
float
(
windowEnabled
)
)
+
// OR
(
minV
*
(
1
.
0
-
float
(
windowEnabled
)
)
);
float
winUp
=
(
window
.
y
*
float
(
windowEnabled
)
)
+
// OR
(
(
minV
+
scaleV
)
*
(
1
.
0
-
float
(
windowEnabled
)
)
);
float
winLen
=
winUp
-
winLo
;
// this is the descaled value, scaled using the window interval to be mapped to [0,1]
vec3
valueWindowedNormalized
=
(
valueDescaled
-
vec3
(
winLo
)
)
/
winLen
;
// clip values outside the window level
valueWindowedNormalized
=
min
(
vec3
(
1
.
0
),
valueWindowedNormalized
);
valueWindowedNormalized
=
max
(
vec3
(
0
.
0
),
valueWindowedNormalized
);
// scale it back to original data space
vec3
valueWindowedOriginal
=
vec3
(
minV
)
+
(
valueWindowedNormalized
*
scaleV
);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Do clippings
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// is this a border pixel marked by a 0 alpha value?
float
isNotBorder
=
float
(
value
.
a
>=
0
.
75
);
// make "zero" values transarent
float
clip
=
clipZero
(
valueWindowedOriginal
.
r
,
minV
);
// use threshold to clip away fragments.
// NOTE: thresholding is applied to the original interval in valueDescaled, NOT the window interval
float
clipTh
=
clipThreshold
(
valueDescaled
,
colormap
,
thresholdV
,
thresholdEnabled
);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Do colormapping
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// this is the final color returned by the colormapping algorithm. This is the correct value for the gray colormap
vec4
cmapped
=
grayscale
(
value
.
rgb
);
float
clip
=
clipZero
(
valueDescaled
.
r
,
minV
);
vec4
cmapped
=
grayscale
(
valueWindowedNormalized
.
rgb
);
// negative to positive shading in red-blue
if
(
colormap
==
1
)
{
cmapped
=
rainbow
(
value
.
r
);
cmapped
=
rainbow
(
value
WindowedNormalized
.
r
);
}
else
if
(
colormap
==
2
)
{
cmapped
=
hotIron
(
value
.
r
);
cmapped
=
hotIron
(
value
WindowedNormalized
.
r
);
}
else
if
(
colormap
==
3
)
{
cmapped
=
negative2positive
(
value
Descaled
.
r
,
minV
,
scaleV
);
cmapped
=
negative2positive
(
value
WindowedOriginal
.
r
,
minV
,
scaleV
);
}
else
if
(
colormap
==
4
)
{
cmapped
=
atlas
(
value
.
r
);
cmapped
=
atlas
(
value
WindowedNormalized
.
r
);
}
else
if
(
colormap
==
5
)
{
cmapped
=
blueGreenPurple
(
value
.
r
);
cmapped
=
blueGreenPurple
(
value
WindowedNormalized
.
r
);
}
else
if
(
colormap
==
6
)
{
cmapped
=
vector
(
value
Descaled
,
minV
,
scaleV
);
cmapped
=
vector
(
value
WindowedOriginal
,
minV
,
scaleV
);
clip
=
clipZero
(
valueDescaled
);
// vectors get clipped by their length
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Compose
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// build final color
return
vec4
(
cmapped
.
rgb
,
cmapped
.
a
*
// did the colormap use a alpha value?
isNotBorder
*
// is this a border pixel?
alpha
*
// did the user specified an alpha?
clip
*
// value clip?
clipTh
reshold
(
valueDescaled
,
colormap
,
thresholdV
,
thresholdEnabled
)
*
// clip due to threshold?
clipTh
*
// clip due to threshold?
float
(
active
)
);
// is it active?
}
...
...
src/core/graphicsEngine/shaders/shaders/WGEColormapping-fragment.glsl
View file @
9597844a
...
...
@@ -43,11 +43,16 @@
* \param minV the minimum of the original value
* \param scaleV the scaler used to downscale the original value to [0-1]
* \param thresholdV a threshold in original space (you need to downscale it to [0-1] if you want to use it to scaled values.
* \param window a window level scaling
* \param windowEnabled if true, the window level scaling is applied
* \param alpha the alpha blending value
* \param cmap the colormap index to use
*/
void
colormap
(
inout
vec4
color
,
in
sampler3D
sampler
,
in
vec3
coord
,
in
vec3
size
,
float
minV
,
float
scaleV
,
float
thresholdV
,
bool
thresholdEnabled
,
float
alpha
,
int
cmap
,
bool
active
)
void
colormap
(
inout
vec4
color
,
in
sampler3D
sampler
,
in
vec3
coord
,
in
vec3
size
,
float
minV
,
float
scaleV
,
float
thresholdV
,
bool
thresholdEnabled
,
bool
windowEnabled
,
vec2
window
,
float
alpha
,
int
cmap
,
bool
active
)
{
// This implements a manual trilinear interpolation. Include WGETextureutils.glsl to use this
// vec3 vSize = vec3( 1.0 / float( size.x ),
...
...
@@ -83,7 +88,7 @@ void colormap( inout vec4 color, in sampler3D sampler, in vec3 coord, in vec3 si
vec4
value
=
texture3D
(
sampler
,
coord
).
rgba
;
// let someone else apply the colormap
vec4
src
=
colormap
(
value
,
minV
,
scaleV
,
thresholdV
,
thresholdEnabled
,
alpha
,
cmap
,
active
);
vec4
src
=
colormap
(
value
,
minV
,
scaleV
,
thresholdV
,
thresholdEnabled
,
window
,
windowEnabled
,
alpha
,
cmap
,
active
);
// compositing:
// associated colors needed
...
...
@@ -114,48 +119,56 @@ vec4 colormapping( vec4 texcoord )
colormap
(
finalColor
,
u_colormap7Sampler
,
(
gl_TextureMatrix
[
Colormap7Unit
]
*
t
).
xyz
,
vec3
(
u_colormap7SizeX
,
u_colormap7SizeY
,
u_colormap7SizeZ
),
u_colormap7Min
,
u_colormap7Scale
,
u_colormap7Threshold
,
u_colormap7ThresholdEnabled
,
u_colormap7WindowEnabled
,
u_colormap7Window
,
u_colormap7Alpha
,
u_colormap7Colormap
,
u_colormap7Active
);
#endif
#ifdef Colormap6Enabled
colormap
(
finalColor
,
u_colormap6Sampler
,
(
gl_TextureMatrix
[
Colormap6Unit
]
*
t
).
xyz
,
vec3
(
u_colormap6SizeX
,
u_colormap6SizeY
,
u_colormap6SizeZ
),
u_colormap6Min
,
u_colormap6Scale
,
u_colormap6Threshold
,
u_colormap6ThresholdEnabled
,
u_colormap6WindowEnabled
,
u_colormap6Window
,
u_colormap6Alpha
,
u_colormap6Colormap
,
u_colormap6Active
);
#endif
#ifdef Colormap5Enabled
colormap
(
finalColor
,
u_colormap5Sampler
,
(
gl_TextureMatrix
[
Colormap5Unit
]
*
t
).
xyz
,
vec3
(
u_colormap5SizeX
,
u_colormap5SizeY
,
u_colormap5SizeZ
),
u_colormap5Min
,
u_colormap5Scale
,
u_colormap5Threshold
,
u_colormap5ThresholdEnabled
,
u_colormap5WindowEnabled
,
u_colormap5Window
,
u_colormap5Alpha
,
u_colormap5Colormap
,
u_colormap5Active
);
#endif
#ifdef Colormap4Enabled
colormap
(
finalColor
,
u_colormap4Sampler
,
(
gl_TextureMatrix
[
Colormap4Unit
]
*
t
).
xyz
,
vec3
(
u_colormap4SizeX
,
u_colormap4SizeY
,
u_colormap4SizeZ
),
u_colormap4Min
,
u_colormap4Scale
,
u_colormap4Threshold
,
u_colormap4ThresholdEnabled
,
u_colormap4WindowEnabled
,
u_colormap4Window
,
u_colormap4Alpha
,
u_colormap4Colormap
,
u_colormap4Active
);
#endif
#ifdef Colormap3Enabled
colormap
(
finalColor
,
u_colormap3Sampler
,
(
gl_TextureMatrix
[
Colormap3Unit
]
*
t
).
xyz
,
vec3
(
u_colormap3SizeX
,
u_colormap3SizeY
,
u_colormap3SizeZ
),
u_colormap3Min
,
u_colormap3Scale
,
u_colormap3Threshold
,
u_colormap3ThresholdEnabled
,
u_colormap3WindowEnabled
,
u_colormap3Window
,
u_colormap3Alpha
,
u_colormap3Colormap
,
u_colormap3Active
);
#endif
#ifdef Colormap2Enabled
colormap
(
finalColor
,
u_colormap2Sampler
,
(
gl_TextureMatrix
[
Colormap2Unit
]
*
t
).
xyz
,
vec3
(
u_colormap2SizeX
,
u_colormap2SizeY
,
u_colormap2SizeZ
),
u_colormap2Min
,
u_colormap2Scale
,
u_colormap2Threshold
,
u_colormap2ThresholdEnabled
,
u_colormap2WindowEnabled
,
u_colormap2Window
,
u_colormap2Alpha
,
u_colormap2Colormap
,
u_colormap2Active
);
#endif
#ifdef Colormap1Enabled
colormap
(
finalColor
,
u_colormap1Sampler
,
(
gl_TextureMatrix
[
Colormap1Unit
]
*
t
).
xyz
,
vec3
(
u_colormap1SizeX
,
u_colormap1SizeY
,
u_colormap1SizeZ
),
u_colormap1Min
,
u_colormap1Scale
,
u_colormap1Threshold
,
u_colormap1ThresholdEnabled
,
u_colormap1WindowEnabled
,
u_colormap1Window
,
u_colormap1Alpha
,
u_colormap1Colormap
,
u_colormap1Active
);
#endif
#ifdef Colormap0Enabled
colormap
(
finalColor
,
u_colormap0Sampler
,
(
gl_TextureMatrix
[
Colormap0Unit
]
*
t
).
xyz
,
vec3
(
u_colormap0SizeX
,
u_colormap0SizeY
,
u_colormap0SizeZ
),
u_colormap0Min
,
u_colormap0Scale
,
u_colormap0Threshold
,
u_colormap0ThresholdEnabled
,
u_colormap0WindowEnabled
,
u_colormap0Window
,
u_colormap0Alpha
,
u_colormap0Colormap
,
u_colormap0Active
);
#endif
...
...
@@ -179,49 +192,65 @@ vec4 colormapping()
colormap
(
finalColor
,
u_colormap7Sampler
,
v_colormap7TexCoord
.
xyz
,
vec3
(
u_colormap7SizeX
,
u_colormap7SizeY
,
u_colormap7SizeZ
),
u_colormap7Min
,
u_colormap7Scale
,
u_colormap7Threshold
,
u_colormap7ThresholdEnabled
,
u_colormap7Alpha
,
u_colormap7Colormap
,
u_colormap7Active
);
u_colormap7ThresholdEnabled
,
u_colormap7WindowEnabled
,
u_colormap7Window
,
u_colormap7Alpha
,
u_colormap7Colormap
,
u_colormap7Active
);
#endif
#ifdef Colormap6Enabled
colormap
(
finalColor
,
u_colormap6Sampler
,
v_colormap6TexCoord
.
xyz
,
vec3
(
u_colormap6SizeX
,
u_colormap6SizeY
,
u_colormap6SizeZ
),
u_colormap6Min
,
u_colormap6Scale
,
u_colormap6Threshold
,
u_colormap6ThresholdEnabled
,
u_colormap6Alpha
,
u_colormap6Colormap
,
u_colormap6Active
);
u_colormap6ThresholdEnabled
,
u_colormap6WindowEnabled
,
u_colormap6Window
,
u_colormap6Alpha
,
u_colormap6Colormap
,
u_colormap6Active
);
#endif
#ifdef Colormap5Enabled
colormap
(
finalColor
,
u_colormap5Sampler
,
v_colormap5TexCoord
.
xyz
,
vec3
(
u_colormap5SizeX
,
u_colormap5SizeY
,
u_colormap5SizeZ
),
u_colormap5Min
,
u_colormap5Scale
,
u_colormap5Threshold
,
u_colormap5ThresholdEnabled
,
u_colormap5Alpha
,
u_colormap5Colormap
,
u_colormap5Active
);
u_colormap5ThresholdEnabled
,
u_colormap5WindowEnabled
,
u_colormap5Window
,
u_colormap5Alpha
,
u_colormap5Colormap
,
u_colormap5Active
);
#endif
#ifdef Colormap4Enabled
colormap
(
finalColor
,
u_colormap4Sampler
,
v_colormap4TexCoord
.
xyz
,
vec3
(
u_colormap4SizeX
,
u_colormap4SizeY
,
u_colormap4SizeZ
),
u_colormap4Min
,
u_colormap4Scale
,
u_colormap4Threshold
,
u_colormap4ThresholdEnabled
,
u_colormap4Alpha
,
u_colormap4Colormap
,
u_colormap4Active
);
u_colormap4ThresholdEnabled
,
u_colormap4WindowEnabled
,
u_colormap4Window
,
u_colormap4Alpha
,
u_colormap4Colormap
,
u_colormap4Active
);
#endif
#ifdef Colormap3Enabled
colormap
(
finalColor
,
u_colormap3Sampler
,
v_colormap3TexCoord
.
xyz
,
vec3
(
u_colormap3SizeX
,
u_colormap3SizeY
,
u_colormap3SizeZ
),
u_colormap3Min
,
u_colormap3Scale
,
u_colormap3Threshold
,
u_colormap3ThresholdEnabled
,
u_colormap3Alpha
,
u_colormap3Colormap
,
u_colormap3Active
);
u_colormap3ThresholdEnabled
,
u_colormap3WindowEnabled
,
u_colormap3Window
,
u_colormap3Alpha
,
u_colormap3Colormap
,
u_colormap3Active
);
#endif
#ifdef Colormap2Enabled
colormap
(
finalColor
,
u_colormap2Sampler
,
v_colormap2TexCoord
.
xyz
,
vec3
(
u_colormap2SizeX
,
u_colormap2SizeY
,
u_colormap2SizeZ
),
u_colormap2Min
,
u_colormap2Scale
,
u_colormap2Threshold
,
u_colormap2ThresholdEnabled
,
u_colormap2Alpha
,
u_colormap2Colormap
,
u_colormap2Active
);
u_colormap2ThresholdEnabled
,
u_colormap2WindowEnabled
,
u_colormap2Window
,
u_colormap2Alpha
,
u_colormap2Colormap
,
u_colormap2Active
);
#endif
#ifdef Colormap1Enabled
colormap
(
finalColor
,
u_colormap1Sampler
,
v_colormap1TexCoord
.
xyz
,
vec3
(
u_colormap1SizeX
,
u_colormap1SizeY
,
u_colormap1SizeZ
),
u_colormap1Min
,
u_colormap1Scale
,
u_colormap1Threshold
,
u_colormap1ThresholdEnabled
,
u_colormap1Alpha
,
u_colormap1Colormap
,
u_colormap1Active
);
u_colormap1ThresholdEnabled
,
u_colormap1WindowEnabled
,
u_colormap1Window
,
u_colormap1Alpha
,
u_colormap1Colormap
,
u_colormap1Active
);
#endif
#ifdef Colormap0Enabled
colormap
(
finalColor
,
u_colormap0Sampler
,
v_colormap0TexCoord
.
xyz
,
vec3
(
u_colormap0SizeX
,
u_colormap0SizeY
,
u_colormap0SizeZ
),
u_colormap0Min
,
u_colormap0Scale
,
u_colormap0Threshold
,
u_colormap0ThresholdEnabled
,
u_colormap0Alpha
,
u_colormap0Colormap
,
u_colormap0Active
);
u_colormap0ThresholdEnabled
,
u_colormap0WindowEnabled
,
u_colormap0Window
,
u_colormap0Alpha
,
u_colormap0Colormap
,
u_colormap0Active
);
#endif
return
finalColor
;
...
...
src/core/graphicsEngine/shaders/shaders/WGEColormapping-uniforms.glsl
View file @
9597844a
...
...
@@ -35,10 +35,10 @@
/////////////////////////////////////////////////////////////////////////////
//!< For unscaling the data: the minimum.
uniform
float
u_colormap0Min
;
uniform
float
u_colormap0Min
=
0
;
//!< For unscaling the data: the scaling factor.
uniform
float
u_colormap0Scale
;
uniform
float
u_colormap0Scale
=
1
;
//!< The alpha value for this colormap. Is in [0,1].
uniform
float
u_colormap0Alpha
;
...
...
@@ -47,13 +47,19 @@ uniform float u_colormap0Alpha;
uniform
float
u_colormap0Threshold
;
//!< Flag denoting whether to use the threshold value for clipping or not.
uniform
bool
u_colormap0ThresholdEnabled
;
uniform
bool
u_colormap0ThresholdEnabled
=
false
;
//!< Flag denoting whether to use the windowing values for scaling or not.
uniform
bool
u_colormap0WindowEnabled
=
false
;
//!< Contains the lower and upper window level.
uniform
vec2
u_colormap0Window
=
vec2
(
0
.
0
,
1
.
0
);
//!< The index of the colormap to use
uniform
int
u_colormap0Colormap
;
//!< True if the colormap is active.
uniform
bool
u_colormap0Active
;
uniform
bool
u_colormap0Active
=
false
;
//!< The sampler for texture access.
uniform
sampler3D
u_colormap0Sampler
;
...
...
@@ -68,10 +74,10 @@ uniform int u_colormap0SizeZ;
/////////////////////////////////////////////////////////////////////////////
//!< For unscaling the data: the minimum.
uniform
float
u_colormap1Min
;
uniform
float
u_colormap1Min
=
0
;
//!< For unscaling the data: the scaling factor.
uniform
float
u_colormap1Scale
;
uniform
float
u_colormap1Scale
=
1
;
//!< The alpha value for this colormap. Is in [0,1].
uniform
float
u_colormap1Alpha
;
...
...
@@ -80,13 +86,19 @@ uniform float u_colormap1Alpha;
uniform
float
u_colormap1Threshold
;
//!< Flag denoting whether to use the threshold value for clipping or not.
uniform
bool
u_colormap1ThresholdEnabled
;
uniform
bool
u_colormap1ThresholdEnabled
=
false
;
//!< Flag denoting whether to use the windowing values for scaling or not.
uniform
bool
u_colormap1WindowEnabled
=
false
;
//!< Contains the lower and upper window level.
uniform
vec2
u_colormap1Window
=
vec2
(
0
.
0
,
1
.
0
);
//!< The index of the colormap to use
uniform
int
u_colormap1Colormap
;
//!< True if the colormap is active.
uniform
bool
u_colormap1Active
;
uniform
bool
u_colormap1Active
=
false
;
//!< The sampler for texture access.
uniform
sampler3D
u_colormap1Sampler
;
...
...
@@ -101,10 +113,10 @@ uniform int u_colormap1SizeZ;
/////////////////////////////////////////////////////////////////////////////
//!< For unscaling the data: the minimum.
uniform
float
u_colormap2Min
;
uniform
float
u_colormap2Min
=
0
;
//!< For unscaling the data: the scaling factor.
uniform
float
u_colormap2Scale
;
uniform
float
u_colormap2Scale
=
1
;
//!< The alpha value for this colormap. Is in [0,1].
uniform
float
u_colormap2Alpha
;
...
...
@@ -113,13 +125,19 @@ uniform float u_colormap2Alpha;
uniform
float
u_colormap2Threshold
;
//!< Flag denoting whether to use the threshold value for clipping or not.
uniform
bool
u_colormap2ThresholdEnabled
;
uniform
bool
u_colormap2ThresholdEnabled
=
false
;
//!< Flag denoting whether to use the windowing values for scaling or not.
uniform
bool
u_colormap2WindowEnabled
=
false
;
//!< Contains the lower and upper window level.
uniform
vec2
u_colormap2Window
=
vec2
(
0
.
0
,
1
.
0
);
//!< The index of the colormap to use
uniform
int
u_colormap2Colormap
;
//!< True if the colormap is active.
uniform
bool
u_colormap2Active
;
uniform
bool
u_colormap2Active
=
false
;
//!< The sampler for texture access.
uniform
sampler3D
u_colormap2Sampler
;
...
...
@@ -134,10 +152,10 @@ uniform int u_colormap2SizeZ;
/////////////////////////////////////////////////////////////////////////////
//!< For unscaling the data: the minimum.
uniform
float
u_colormap3Min
;
uniform
float
u_colormap3Min
=
0
;
//!< For unscaling the data: the scaling factor.
uniform
float
u_colormap3Scale
;
uniform
float
u_colormap3Scale
=
1
;
//!< The alpha value for this colormap. Is in [0,1].
uniform
float
u_colormap3Alpha
;
...
...
@@ -146,13 +164,19 @@ uniform float u_colormap3Alpha;
uniform
float
u_colormap3Threshold
;
//!< Flag denoting whether to use the threshold value for clipping or not.
uniform
bool
u_colormap3ThresholdEnabled
;
uniform
bool
u_colormap3ThresholdEnabled
=
false
;
//!< Flag denoting whether to use the windowing values for scaling or not.
uniform
bool
u_colormap3WindowEnabled
=
false
;
//!< Contains the lower and upper window level.
uniform
vec2
u_colormap3Window
=
vec2
(
0
.
0
,
1
.
0
);
//!< The index of the colormap to use
uniform
int
u_colormap3Colormap
;
//!< True if the colormap is active.
uniform
bool
u_colormap3Active
;
uniform
bool
u_colormap3Active
=
false
;
//!< The sampler for texture access.
uniform
sampler3D
u_colormap3Sampler
;
...
...
@@ -167,10 +191,10 @@ uniform int u_colormap3SizeZ;
/////////////////////////////////////////////////////////////////////////////
//!< For unscaling the data: the minimum.
uniform
float
u_colormap4Min
;
uniform
float
u_colormap4Min
=
0
;
//!< For unscaling the data: the scaling factor.
uniform
float
u_colormap4Scale
;
uniform
float
u_colormap4Scale
=
1
;
//!< The alpha value for this colormap. Is in [0,1].
uniform
float
u_colormap4Alpha
;
...
...
@@ -179,13 +203,19 @@ uniform float u_colormap4Alpha;
uniform
float
u_colormap4Threshold
;
//!< Flag denoting whether to use the threshold value for clipping or not.
uniform
bool
u_colormap4ThresholdEnabled
;
uniform
bool
u_colormap4ThresholdEnabled
=
false
;
//!< Flag denoting whether to use the windowing values for scaling or not.
uniform
bool
u_colormap4WindowEnabled
=
false
;
//!< Contains the lower and upper window level.
uniform
vec2
u_colormap4Window
=
vec2
(
0
.
0
,
1
.
0
);
//!< The index of the colormap to use
uniform
int
u_colormap4Colormap
;
//!< True if the colormap is active.
uniform
bool
u_colormap4Active
;
uniform
bool
u_colormap4Active
=
false
;
//!< The sampler for texture access.
uniform
sampler3D
u_colormap4Sampler
;
...
...
@@ -200,10 +230,10 @@ uniform int u_colormap4SizeZ;
/////////////////////////////////////////////////////////////////////////////
//!< For unscaling the data: the minimum.
uniform
float
u_colormap5Min
;
uniform
float
u_colormap5Min
=
0
;
//!< For unscaling the data: the scaling factor.
uniform
float
u_colormap5Scale
;
uniform
float
u_colormap5Scale
=
1
;
//!< The alpha value for this colormap. Is in [0,1].
uniform
float
u_colormap5Alpha
;
...
...
@@ -212,13 +242,19 @@ uniform float u_colormap5Alpha;
uniform
float
u_colormap5Threshold
;
//!< Flag denoting whether to use the threshold value for clipping or not.
uniform
bool
u_colormap5ThresholdEnabled
;
uniform
bool
u_colormap5ThresholdEnabled
=
false
;
//!< Flag denoting whether to use the windowing values for scaling or not.
uniform
bool
u_colormap5WindowEnabled
=
false
;
//!< Contains the lower and upper window level.
uniform
vec2
u_colormap5Window
=
vec2
(
0
.
0
,
1
.
0
);
//!< The index of the colormap to use
uniform
int
u_colormap5Colormap
;
//!< True if the colormap is active.
uniform
bool
u_colormap5Active
;
uniform
bool
u_colormap5Active
=
false
;
//!< The sampler for texture access.
uniform
sampler3D
u_colormap5Sampler
;
...
...
@@ -233,10 +269,10 @@ uniform int u_colormap5SizeZ;
/////////////////////////////////////////////////////////////////////////////
//!< For unscaling the data: the minimum.
uniform
float
u_colormap6Min
;
uniform
float
u_colormap6Min
=
0
;
//!< For unscaling the data: the scaling factor.
uniform
float
u_colormap6Scale
;
uniform
float
u_colormap6Scale
=
1
;
//!< The alpha value for this colormap. Is in [0,1].
uniform
float
u_colormap6Alpha
;
...
...
@@ -245,13 +281,19 @@ uniform float u_colormap6Alpha;
uniform
float
u_colormap6Threshold
;
//!< Flag denoting whether to use the threshold value for clipping or not.
uniform
bool
u_colormap6ThresholdEnabled
;
uniform
bool
u_colormap6ThresholdEnabled
=
false
;
//!< Flag denoting whether to use the windowing values for scaling or not.
uniform
bool
u_colormap6WindowEnabled
=
false
;
//!< Contains the lower and upper window level.
uniform
vec2
u_colormap6Window
=
vec2
(
0
.
0
,
1
.
0
);
//!< The index of the colormap to use
uniform
int
u_colormap6Colormap
;
//!< True if the colormap is active.
uniform
bool
u_colormap6Active
;
uniform
bool
u_colormap6Active
=
false
;
//!< The sampler for texture access.
uniform
sampler3D
u_colormap6Sampler
;
...
...
@@ -266,10 +308,10 @@ uniform int u_colormap6SizeZ;
/////////////////////////////////////////////////////////////////////////////
//!< For unscaling the data: the minimum.
uniform
float
u_colormap7Min
;
uniform
float
u_colormap7Min
=
0
;
//!< For unscaling the data: the scaling factor.
uniform
float
u_colormap7Scale
;
uniform
float
u_colormap7Scale
=
1
;
//!< The alpha value for this colormap. Is in [0,1].
uniform
float
u_colormap7Alpha
;
...
...
@@ -278,13 +320,19 @@ uniform float u_colormap7Alpha;
uniform
float
u_colormap7Threshold
;
//!< Flag denoting whether to use the threshold value for clipping or not.