Commit 52503fb5 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Added option to IvusTcSliceExtractor to mix tissue classification with IVUS image.

parent 0c92f330
......@@ -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));
......
......@@ -52,6 +52,7 @@ namespace campvis {
addProperty(p_sourceDirectory);
addProperty(p_readImagesButton);
addProperty(*(_ve.getSliceRenderer()->getProperty("MixWithIvus")));
addEventListenerToBack(&_ve);
......
......@@ -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);
......
......@@ -59,6 +59,7 @@ namespace campvis {
DataNameProperty p_plaqueImage;
PointPredicateHistogramProperty p_predicateHistogram;
BoolProperty p_mixWithIvus;
protected:
/// \see SliceRenderProcessor::renderImageImpl
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment