Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
52503fb5
Commit
52503fb5
authored
Aug 12, 2014
by
Christian Schulte zu Berge
Browse files
Added option to IvusTcSliceExtractor to mix tissue classification with IVUS image.
parent
0c92f330
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/ivus_tc/glsl/ivustcsliceextractor.frag
View file @
52503fb5
...
...
@@ -41,6 +41,7 @@ uniform TextureParameters3D _plaqueParams;
uniform
mat4
_texCoordsMatrix
;
uniform
bool
_mixWithIvus
=
true
;
uniform
bool
_useTexturing
=
true
;
uniform
bool
_useSolidColor
=
true
;
uniform
vec4
_color
=
vec4
(
1
.
0
,
1
.
0
,
1
.
0
,
1
.
0
);
...
...
@@ -58,8 +59,12 @@ void main() {
vec3
hcy
=
vec3
(
pr
.
xy
,
cm
*
smoothstep
(
0
.
0
,
0
.
5
,
pr
.
y
));
vec3
mixed
=
hcy2rgb
(
hcy
);
//vec3 mixed = mix(vec3(ivus), hcy2rgb(hcy), min(cm, pr.y));
//vec3 mixed = mix(vec3(1.0), vec3(1.0, 0.5, 0.0), max(cm, pr.y));
if
(
_mixWithIvus
)
// mixed = max(vec3(ivus), mixed);
mixed
=
mix
(
vec3
(
ivus
),
mixed
,
max
(
cm
,
pr
.
y
));
// mixed = mix(vec3(ivus), mixed, min(cm, pr.y));
//vec3 mixed = mix(vec3(1.0), vec3(1.0, 0.5, 0.0), max(cm, pr.y));
out_Color
=
vec4
(
mixed
,
1
.
0
);
//vec3 hsl = rgb2hcy(vec3(ivus));
...
...
modules/ivus_tc/pipelines/ivustcdemo.cpp
View file @
52503fb5
...
...
@@ -52,6 +52,7 @@ namespace campvis {
addProperty
(
p_sourceDirectory
);
addProperty
(
p_readImagesButton
);
addProperty
(
*
(
_ve
.
getSliceRenderer
()
->
getProperty
(
"MixWithIvus"
)));
addEventListenerToBack
(
&
_ve
);
...
...
modules/ivus_tc/processors/ivustcsliceextractor.cpp
View file @
52503fb5
...
...
@@ -43,11 +43,13 @@ namespace campvis {
,
p_tcImage
(
"TcImage"
,
"Tissue Classification Image"
,
"image.tc"
,
DataNameProperty
::
READ
)
,
p_plaqueImage
(
"PlaqueImage"
,
"Plaque Mask Image"
,
"image.plaque"
,
DataNameProperty
::
READ
)
,
p_predicateHistogram
(
"PredicateHistogram"
,
"predicate Histogram"
)
,
p_mixWithIvus
(
"MixWithIvus"
,
"Mix Segmentation with IVUS"
,
true
)
{
addProperty
(
p_cmImage
);
addProperty
(
p_tcImage
);
addProperty
(
p_plaqueImage
);
addProperty
(
p_predicateHistogram
);
addProperty
(
p_mixWithIvus
);
invalidate
(
AbstractProcessor
::
INVALID_SHADER
);
...
...
@@ -85,6 +87,7 @@ namespace campvis {
_shader
->
setUniform
(
"_projectionMatrix"
,
identity
);
_shader
->
setUniform
(
"_useTexturing"
,
true
);
_shader
->
setUniform
(
"_useSolidColor"
,
true
);
_shader
->
setUniform
(
"_mixWithIvus"
,
p_mixWithIvus
.
getValue
());
// render slice
FramebufferActivationGuard
fag
(
this
);
...
...
modules/ivus_tc/processors/ivustcsliceextractor.h
View file @
52503fb5
...
...
@@ -59,6 +59,7 @@ namespace campvis {
DataNameProperty
p_plaqueImage
;
PointPredicateHistogramProperty
p_predicateHistogram
;
BoolProperty
p_mixWithIvus
;
protected:
/// \see SliceRenderProcessor::renderImageImpl
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment