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

work on #135: changed VisualizationProcessor::_renderTargetSize to pointer and...

work on #135: changed VisualizationProcessor::_renderTargetSize to pointer and introducing VisualizationProcessor::setViewportSizeProperty()
parent 31d6af0f
......@@ -59,11 +59,11 @@ namespace campvis {
* \note The render target size property of this CLRaycaster will automatically
* be assigned as shared property of the given \a renderTargetSize property.
* \see VisualizationProcessor
* \param renderTargetSize Reference to the parent pipeline's render target size property.
* \param viewportSizeProp Reference to the parent pipeline's render target size property.
* \param fragmentShaderFileName Filename for the fragment shader being automatically loaded.
* \param bindEntryExitDepthTextures Flag whether to also bind the depth textures of the entry-/exit points.
*/
CLRaycaster(IVec2Property& renderTargetSize);
CLRaycaster(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -94,8 +94,8 @@ namespace {
namespace campvis {
const std::string TrackedUsSweepFrameRenderer3D::loggerCat_ = "CAMPVis.modules.vis.TrackedUsSweepFrameRenderer3D";
TrackedUsSweepFrameRenderer3D::TrackedUsSweepFrameRenderer3D(IVec2Property& canvasSize)
: VisualizationProcessor(canvasSize)
TrackedUsSweepFrameRenderer3D::TrackedUsSweepFrameRenderer3D(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_sourceImageID("sourceFioID", "Input Tracked US File IO", "", DataNameProperty::READ, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_PROPERTIES)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_camera("Camera", "Camera")
......@@ -173,7 +173,7 @@ namespace campvis {
glEnable(GL_DEPTH_TEST);
_shader->activate();
_shader->setIgnoreUniformLocationError(true);
_shader->setUniform("_viewportSizeRCP", 1.f / tgt::vec2(_renderTargetSize.getValue()));
_shader->setUniform("_viewportSizeRCP", 1.f / tgt::vec2(_viewportSizeProperty->getValue()));
_shader->setUniform("_projectionMatrix", cam.getProjectionMatrix());
_shader->setUniform("_viewMatrix", cam.getViewMatrix());
......
......@@ -59,7 +59,7 @@ namespace campvis {
/**
* Constructs a new TrackedUsSweepFrameRenderer3D Processor
**/
TrackedUsSweepFrameRenderer3D(IVec2Property& canvasSize);
TrackedUsSweepFrameRenderer3D(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -45,13 +45,13 @@ namespace campvis {
, _imageReader()
, _pgGenerator()
, _vmgGenerator()
, _vmRenderer(_effectiveRenderTargetSize)
, _eepGenerator(_effectiveRenderTargetSize)
, _vmEepGenerator(_effectiveRenderTargetSize)
, _dvrNormal(_effectiveRenderTargetSize)
, _dvrVM(_effectiveRenderTargetSize)
, _depthDarkening(_effectiveRenderTargetSize)
, _combine(_effectiveRenderTargetSize)
, _vmRenderer(&_effectiveRenderTargetSize)
, _eepGenerator(&_effectiveRenderTargetSize)
, _vmEepGenerator(&_effectiveRenderTargetSize)
, _dvrNormal(&_effectiveRenderTargetSize)
, _dvrVM(&_effectiveRenderTargetSize)
, _depthDarkening(&_effectiveRenderTargetSize)
, _combine(&_effectiveRenderTargetSize)
, _trackballEH(0)
{
addProperty(&_camera);
......
......@@ -40,19 +40,19 @@ namespace campvis {
IxpvDemo::IxpvDemo()
: VisualizationPipeline()
, _xrayReader(_effectiveRenderTargetSize)
, _xrayReader(&_effectiveRenderTargetSize)
, _ctReader()
, _ctProxy()
, _ctFullEEP(_effectiveRenderTargetSize)
, _ctClippedEEP(_effectiveRenderTargetSize)
, _ctDVR(_effectiveRenderTargetSize)
, _ctFullDRR(_effectiveRenderTargetSize)
, _ctClippedDRR(_effectiveRenderTargetSize)
, _ctFullEEP(&_effectiveRenderTargetSize)
, _ctClippedEEP(&_effectiveRenderTargetSize)
, _ctDVR(&_effectiveRenderTargetSize)
, _ctFullDRR(&_effectiveRenderTargetSize)
, _ctClippedDRR(&_effectiveRenderTargetSize)
, _usReader()
, _usSliceRenderer(_effectiveRenderTargetSize)
, _compositor(_effectiveRenderTargetSize)
, _compositor2(_effectiveRenderTargetSize)
, _ixpvCompositor(_effectiveRenderTargetSize)
, _usSliceRenderer(&_effectiveRenderTargetSize)
, _compositor(&_effectiveRenderTargetSize)
, _compositor2(&_effectiveRenderTargetSize)
, _ixpvCompositor(&_effectiveRenderTargetSize)
, _camera("camera", "Camera")
, _trackballHandler(0)
, _wheelHandler(&_usSliceRenderer.p_sliceNumber)
......
......@@ -41,7 +41,7 @@ namespace campvis {
, _imageReader()
, _gvg()
, _lhh()
, _sliceExtractor(_effectiveRenderTargetSize)
, _sliceExtractor(&_effectiveRenderTargetSize)
, _wheelHandler(&_sliceExtractor.p_zSliceNumber)
, _tfWindowingHandler(&_sliceExtractor.p_transferFunction)
{
......
......@@ -43,7 +43,7 @@ namespace campvis {
: VisualizationPipeline()
, _camera("camera", "Camera")
, _imageReader()
, _ve(_effectiveRenderTargetSize)
, _ve(&_effectiveRenderTargetSize)
{
addProperty(&_camera);
......
......@@ -57,7 +57,6 @@ namespace campvis {
/// \see AbstractPipeline::getName()
virtual const std::string getName() const;
void onRenderTargetSizeChanged(const AbstractProperty* prop);
protected:
......
......@@ -43,7 +43,7 @@ namespace campvis {
: VisualizationPipeline()
, _camera("camera", "Camera")
, _imageReader()
, _vr(_effectiveRenderTargetSize)
, _vr(&_effectiveRenderTargetSize)
, _trackballEH(0)
{
addProperty(&_camera);
......
......@@ -44,8 +44,8 @@
namespace campvis {
const std::string DepthDarkening::loggerCat_ = "CAMPVis.modules.vis.DepthDarkening";
DepthDarkening::DepthDarkening(IVec2Property& canvasSize)
: VisualizationProcessor(canvasSize)
DepthDarkening::DepthDarkening(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ)
, p_outputImage("OutputImage", "Output Image", "dd.output", DataNameProperty::WRITE)
, p_sigma("Sigma", "Sigma of Gaussian Filter", 2.f, 0.f, 10.f)
......@@ -113,7 +113,7 @@ namespace campvis {
inputImage->bind(_shader, colorUnit, depthUnit);
inputImage->bindDepthTexture(_shader, pass2DepthUnit, "_depthPass2Texture", "_pass2TexParams");
_shader->setUniform("_viewportSizeRCP", 1.f / tgt::vec2(_renderTargetSize.getValue()));
_shader->setUniform("_viewportSizeRCP", 1.f / tgt::vec2(_viewportSizeProperty->getValue()));
_shader->setUniform("_direction", tgt::vec2(1.f, 0.f));
_shader->setUniform("_sigma", p_sigma.getValue());
_shader->setUniform("_lambda", p_lambda.getValue());
......
......@@ -51,7 +51,7 @@ namespace campvis {
/**
* Constructs a new DepthDarkening Processor
**/
DepthDarkening(IVec2Property& canvasSize);
DepthDarkening(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -36,8 +36,8 @@
namespace campvis {
const std::string DRRRaycaster::loggerCat_ = "CAMPVis.modules.vis.DRRRaycaster";
DRRRaycaster::DRRRaycaster(IVec2Property& canvasSize)
: RaycastingProcessor(canvasSize, "modules/vis/glsl/drrraycaster.frag", false)
DRRRaycaster::DRRRaycaster(IVec2Property* viewportSizeProp)
: RaycastingProcessor(viewportSizeProp, "modules/vis/glsl/drrraycaster.frag", false)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_shift("shift", "Normalization Shift", 0.f, -10.f, 10.f)
, p_scale("scale", "Normalization Scale", 1.f, 0.f, 1000.f)
......
......@@ -52,7 +52,7 @@ namespace campvis {
/**
* Constructs a new DRRRaycaster Processor
**/
DRRRaycaster(IVec2Property& canvasSize);
DRRRaycaster(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -44,8 +44,8 @@
namespace campvis {
const std::string EEPGenerator::loggerCat_ = "CAMPVis.modules.vis.EEPGenerator";
EEPGenerator::EEPGenerator(IVec2Property& canvasSize)
: VisualizationProcessor(canvasSize)
EEPGenerator::EEPGenerator(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_sourceImageID("sourceImageID", "Input Image", "", DataNameProperty::READ)
, p_geometryID("geometryID", "Input Proxy Geometry ID", "proxygeometry", DataNameProperty::READ)
, p_mirrorID("mirrorID", "Input Mirror ID", "mirror", DataNameProperty::READ)
......@@ -145,7 +145,7 @@ namespace campvis {
tgt::TextureUnit geometryDepthUnit, entryDepthUnit;
_shader->setIgnoreUniformLocationError(true);
_shader->setUniform("_viewportSizeRCP", 1.f / tgt::vec2(_renderTargetSize.getValue()));
_shader->setUniform("_viewportSizeRCP", 1.f / tgt::vec2(_viewportSizeProperty->getValue()));
_shader->setUniform("_modelMatrix", mirrorMatrix);
_shader->setUniform("_projectionMatrix", cam.getProjectionMatrix());
_shader->setUniform("_viewMatrix", cam.getViewMatrix());
......
......@@ -54,7 +54,7 @@ namespace campvis {
/**
* Constructs a new EEPGenerator Processor
**/
EEPGenerator(IVec2Property& canvasSize);
EEPGenerator(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -42,8 +42,8 @@
namespace campvis {
const std::string GeometryRenderer::loggerCat_ = "CAMPVis.modules.vis.GeometryRenderer";
GeometryRenderer::GeometryRenderer(IVec2Property& canvasSize)
: VisualizationProcessor(canvasSize)
GeometryRenderer::GeometryRenderer(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_geometryID("geometryID", "Input Geometry ID", "gr.input", DataNameProperty::READ)
, p_renderTargetID("p_renderTargetID", "Output Image", "gr.output", DataNameProperty::WRITE)
, p_camera("camera", "Camera")
......
......@@ -52,7 +52,7 @@ namespace campvis {
/**
* Constructs a new GeometryRenderer Processor
**/
GeometryRenderer(IVec2Property& canvasSize);
GeometryRenderer(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -43,8 +43,8 @@
namespace campvis {
const std::string IxpvCompositor::loggerCat_ = "CAMPVis.modules.vis.IxpvCompositor";
IxpvCompositor::IxpvCompositor(IVec2Property& canvasSize)
: VisualizationProcessor(canvasSize)
IxpvCompositor::IxpvCompositor(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_xRayImageId("XRayImageId", "X-Ray input image", "", DataNameProperty::READ)
, p_3dSliceImageId("3DSliceImageId", "Slice input image rendered in 3D world space", "", DataNameProperty::READ)
, p_drrFullImageId("DrrFullImageId", "Full DRR input image", "", DataNameProperty::READ)
......
......@@ -52,7 +52,7 @@ namespace campvis {
/**
* Constructs a new IxpvCompositor Processor
**/
IxpvCompositor(IVec2Property& canvasSize);
IxpvCompositor(IVec2Property* viewportSizeProp);
/**
* Destructor
......
......@@ -42,8 +42,8 @@
namespace campvis {
const std::string QuadView::loggerCat_ = "CAMPVis.modules.vis.QuadView";
QuadView::QuadView(IVec2Property& canvasSize)
: VisualizationProcessor(canvasSize)
QuadView::QuadView(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_inputImage1("InputImage1", "First Input Image", "", DataNameProperty::READ)
, p_inputImage2("InputImage2", "Second Input Image", "", DataNameProperty::READ)
, p_inputImage3("InputImage3", "Third Input Image", "", DataNameProperty::READ)
......
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