The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

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

Adapted code to rebase API/code changes.

parent ffd976dd
......@@ -26,8 +26,9 @@
#include "core/tools/quadrenderer.h"
#include "core/datastructures/renderdata.h"
#include "core/pipeline/processordecoratorshading.h"
#include "core/pipeline/processordecoratorgradient.h"
#include "core/datastructures/imagedata.h"
#include "core/datastructures/lightsourcedata.h"
#include "core/datastructures/geometrydatafactory.h"
#include "modules/vis/advraycaster/voxeltexturemipmapping.h"
......@@ -39,27 +40,21 @@ namespace campvis {
AdvOptimizedRaycaster::AdvOptimizedRaycaster(IVec2Property* viewportSizeProp)
: RaycastingProcessor(viewportSizeProp, "modules/vis/advraycaster/glsl/AdvOptimizedRaycaster.frag", true, "400")
, p_enableShadowing("EnableShadowing", "Enable Hard Shadows (Expensive!)", false, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_SHADER | AbstractProcessor::INVALID_PROPERTIES)
, p_shadowIntensity("ShadowIntensity", "Shadow Intensity", .5f, .0f, 1.f)
, p_enableIntersectionRefinement("EnableIntersectionRefinement", "Enable Intersection Refinement", false, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_SHADER)
, p_useEmptySpaceSkipping("EnableEmptySpaceSkipping", "Enable Empty Space Skipping", true, AbstractProcessor::INVALID_RESULT | INVALID_BBV)
, p_enableShading("EnableShading", "Enable Shading", true)
, p_lightId("LightId", "Input Light Source", "lightsource", DataNameProperty::READ)
, _vv(0)
, _quad(0)
, _voxelGeneratorShdr(0)
, _vvTex(0)
, _mipMapGen(0)
{
addDecorator(new ProcessorDecoratorShading());
addDecorator(new ProcessorDecoratorGradient());
addProperty(&p_enableIntersectionRefinement);
addProperty(&p_useEmptySpaceSkipping);
addProperty(p_enableShading, INVALID_RESULT | INVALID_PROPERTIES | INVALID_SHADER);
addProperty(p_lightId);
addProperty(&p_enableShadowing);
addProperty(&p_shadowIntensity);
p_shadowIntensity.setVisible(false);
p_transferFunction.setInvalidationLevel(p_transferFunction.getInvalidationLevel() | INVALID_BBV);
p_sourceImageID.setInvalidationLevel(p_sourceImageID.getInvalidationLevel() | INVALID_BBV);
setPropertyInvalidationLevel(p_transferFunction, INVALID_BBV | INVALID_RESULT);
setPropertyInvalidationLevel(p_sourceImageID, INVALID_BBV | INVALID_RESULT);
decoratePropertyCollection(this);
}
......@@ -90,66 +85,70 @@ namespace campvis {
renderVv(data);
validate(INVALID_BBV);
_shader->activate();
}
if (_vvTex != 0 && p_useEmptySpaceSkipping.getValue()){
// bind
bbvUnit.activate();
_vvTex->bind();
_shader->setIgnoreUniformLocationError(true);
_shader->setUniform("_vvTexture", bbvUnit.getUnitNumber());
_shader->setUniform("_vvTextureParams._size", tgt::vec3(_vvTex->getDimensions()));
_shader->setUniform("_vvTextureParams._sizeRCP", tgt::vec3(1.f) / tgt::vec3(_vvTex->getDimensions()));
_shader->setUniform("_vvTextureParams._numChannels", static_cast<int>(1));
_shader->setUniform("_vvVoxelSize", static_cast<int>(_vv->getBrickSize()));
_shader->setUniform("_vvVoxelDepth", static_cast<int>(_vv->getBrickDepth()));
_shader->setUniform("_hasVv", true);
_shader->setUniform("_vvMaxMipMapLevel", _maxMipMapLevel);
_shader->setIgnoreUniformLocationError(false);
} else {
_shader->setUniform("_hasVv", false);
}
ScopedTypedData<LightSourceData> light(data, p_lightId.getValue());
if (p_enableShading.getValue() == false || light != nullptr) {
_shader->activate();
if (_vvTex != 0){
// bind
bbvUnit.activate();
_vvTex->bind();
_shader->setIgnoreUniformLocationError(true);
_shader->setUniform("_vvTexture", bbvUnit.getUnitNumber());
_shader->setUniform("_vvTextureParams._size", tgt::vec3(_vvTex->getDimensions()));
_shader->setUniform("_vvTextureParams._sizeRCP", tgt::vec3(1.f) / tgt::vec3(_vvTex->getDimensions()));
_shader->setUniform("_vvTextureParams._numChannels", static_cast<int>(1));
FramebufferActivationGuard fag(this);
createAndAttachTexture(GL_RGBA8);
createAndAttachTexture(GL_RGBA32F);
createAndAttachTexture(GL_RGBA32F);
createAndAttachDepthTexture();
_shader->setUniform("_vvVoxelSize", static_cast<int>(_vv->getBrickSize()));
_shader->setUniform("_vvVoxelDepth", static_cast<int>(_vv->getBrickDepth()));
_shader->setUniform("_hasVv", true);
static const GLenum buffers[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 , GL_COLOR_ATTACHMENT2 };
glDrawBuffers(3, buffers);
_shader->setUniform("_vvMaxMipMapLevel", _maxMipMapLevel);
if (p_enableShadowing.getValue())
_shader->setUniform("_shadowIntensity", p_shadowIntensity.getValue());
_shader->setIgnoreUniformLocationError(false);
} else {
_shader->setUniform("_hasVv", false);
}
glEnable(GL_DEPTH_TEST);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
if (p_enableShading.getValue() && light != nullptr) {
light->bind(_shader, "_lightSource");
}
QuadRdr.renderQuad();
FramebufferActivationGuard fag(this);
createAndAttachTexture(GL_RGBA8);
createAndAttachTexture(GL_RGBA32F);
createAndAttachTexture(GL_RGBA32F);
createAndAttachDepthTexture();
glDisable(GL_DEPTH_TEST);
LGL_ERROR;
glDrawBuffers(1, buffers);
static const GLenum buffers[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 , GL_COLOR_ATTACHMENT2 };
glDrawBuffers(3, buffers);
data.addData(p_targetImageID.getValue(), new RenderData(_fbo));
glEnable(GL_DEPTH_TEST);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
QuadRdr.renderQuad();
glDisable(GL_DEPTH_TEST);
LGL_ERROR;
glDrawBuffers(1, buffers);
data.addData(p_targetImageID.getValue(), new RenderData(_fbo));
}
}
std::string AdvOptimizedRaycaster::generateHeader() const {
std::string toReturn = RaycastingProcessor::generateHeader();
if (p_enableShadowing.getValue())
toReturn += "#define ENABLE_SHADOWING\n";
if (p_enableIntersectionRefinement.getValue())
toReturn += "#define INTERSECTION_REFINEMENT\n";
if (p_enableShading.getValue())
toReturn += "#define ENABLE_SHADING\n";
return toReturn;
}
void AdvOptimizedRaycaster::updateProperties() {
p_shadowIntensity.setVisible(p_enableShadowing.getValue());
validate(AbstractProcessor::INVALID_PROPERTIES);
}
......
......@@ -75,12 +75,9 @@ namespace campvis {
/// \see AbstractProcessor::deinit
virtual void deinit();
BoolProperty p_enableShadowing;
FloatProperty p_shadowIntensity;
BoolProperty p_enableIntersectionRefinement;
BoolProperty p_enableShading; ///< Flag whether to enable shading
DataNameProperty p_lightId; ///< Name/ID for the LightSource to use
BoolProperty p_useEmptySpaceSkipping;
protected:
/// \see HasProperyCollection::updateProperties()
virtual void updateProperties();
......
......@@ -78,8 +78,6 @@ bool _inVoid = false;
uniform float _shadowIntensity;
#endif
const float positiveInfinity = 1.0 / 0.0;
// TODO: copy+paste from Voreen - eliminate or improve.
const float SAMPLING_BASE_INTERVAL_RCP = 200.0;
......@@ -288,7 +286,7 @@ vec4 performRaycasting(in vec3 entryPoint, in vec3 exitPoint, in vec2 texCoords)
// accomodate for variable sampling rates
color.a = 1.0 - pow(1.0 - color.a, _samplingStepSize * SAMPLING_BASE_INTERVAL_RCP);
result.rgb = mix(color.rgb, result.rgb, result.a);
result.rgb = result.rgb + color.rgb * color.a * (1.0 - result.a);
result.a = result.a + (1.0 -result.a) * color.a;
}
......
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
#include "advanceddvrvis.h"
#include "tgt/event/keyevent.h"
#include "core/datastructures/imagedata.h"
#include "core/classification/geometry1dtransferfunction.h"
#include "core/classification/tfgeometry1d.h"
namespace campvis {
AdvancedDVRVis::AdvancedDVRVis(DataContainer* dc)
: AutoEvaluationPipeline(dc)
, _camera("camera", "Camera")
, _imageReader()
, _pgGenerator()
, _vmgGenerator()
, _vmRenderer(&_canvasSize)
, _eepGenerator(&_canvasSize)
, _vmEepGenerator(&_canvasSize)
, _dvrNormal(&_canvasSize)
, _dvrVM(&_canvasSize)
, _depthDarkening(&_canvasSize)
, _combine(&_canvasSize)
, _trackballEH(0)
{
addProperty(&_camera);
_trackballEH = new TrackballNavigationEventListener(&_camera, &_canvasSize);
_trackballEH->addLqModeProcessor(&_dvrNormal);
_trackballEH->addLqModeProcessor(&_dvrVM);
_trackballEH->addLqModeProcessor(&_depthDarkening);
addEventListenerToBack(_trackballEH);
addProcessor(&_imageReader);
addProcessor(&_pgGenerator);
addProcessor(&_vmgGenerator);
addProcessor(&_vmRenderer);
addProcessor(&_eepGenerator);
addProcessor(&_vmEepGenerator);
addProcessor(&_dvrNormal);
addProcessor(&_dvrVM);
addProcessor(&_depthDarkening);
addProcessor(&_combine);
}
AdvancedDVRVis::~AdvancedDVRVis() {
delete _trackballEH;
}
void AdvancedDVRVis::init() {
AutoEvaluationPipeline::init();
_imageReader.s_validated.connect(this, &AdvancedDVRVis::onProcessorValidated);
_camera.addSharedProperty(&_vmgGenerator.p_camera);
_camera.addSharedProperty(&_vmRenderer.p_camera);
_camera.addSharedProperty(&_eepGenerator.p_camera);
_camera.addSharedProperty(&_vmEepGenerator.p_camera);
_camera.addSharedProperty(&_dvrNormal.p_camera);
_camera.addSharedProperty(&_dvrVM.p_camera);
//_imageReader.p_url.setValue("D:\\Medical Data\\Dentalscan\\dental.mhd");
_imageReader.p_url.setValue("D:\\Medical Data\\smallHeart.mhd");
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_eepGenerator.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_vmEepGenerator.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_dvrVM.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_dvrNormal.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_pgGenerator.p_sourceImageID);
_dvrNormal.p_targetImageID.setValue("drr.output");
_dvrVM.p_targetImageID.setValue("dvr.output");
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .42f), tgt::col4(255, 0, 0, 255), tgt::col4(255, 0, 0, 255)));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.45f, .5f), tgt::col4(0, 255, 0, 255), tgt::col4(0, 255, 0, 255)));
_dvrNormal.p_transferFunction.replaceTF(dvrTF);
Geometry1DTransferFunction* vmTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
vmTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .42f), tgt::col4(255, 0, 0, 255), tgt::col4(255, 0, 0, 255)));
vmTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.45f, .5f), tgt::col4(0, 255, 0, 255), tgt::col4(0, 255, 0, 255)));
_dvrVM.p_transferFunction.replaceTF(vmTF);
_vmRenderer.p_renderTargetID.addSharedProperty(&_combine.p_mirrorRenderID);
_vmEepGenerator.p_entryImageID.setValue("vm.eep.entry");
_vmEepGenerator.p_exitImageID.setValue("vm.eep.exit");
_vmEepGenerator.p_enableMirror.setValue(true);
// not the most beautiful way... *g*
// this will all get better with scripting support.
static_cast<BoolProperty*>(_vmEepGenerator.getProperty("applyMask"))->setValue(true);
_vmRenderer.p_renderTargetID.addSharedProperty(static_cast<DataNameProperty*>(_vmEepGenerator.getProperty("maskID")));
_renderTargetID.setValue("combine");
_pgGenerator.p_geometryID.addSharedProperty(&_vmEepGenerator.p_geometryID);
_pgGenerator.p_geometryID.addSharedProperty(&_eepGenerator.p_geometryID);
_vmgGenerator.p_mirrorID.addSharedProperty(&_vmEepGenerator.p_mirrorID);
_vmgGenerator.p_mirrorID.addSharedProperty(&_vmRenderer.p_geometryID);
_vmgGenerator.p_mirrorCenter.setValue(tgt::vec3(0.f, 0.f, -20.f));
_vmgGenerator.p_poi.setValue(tgt::vec3(40.f, 40.f, 40.f));
_vmgGenerator.p_size.setValue(60.f);
_eepGenerator.p_entryImageID.addSharedProperty(&_dvrNormal.p_entryImageID);
_vmEepGenerator.p_entryImageID.addSharedProperty(&_dvrVM.p_entryImageID);
_eepGenerator.p_exitImageID.addSharedProperty(&_dvrNormal.p_exitImageID);
_vmEepGenerator.p_exitImageID.addSharedProperty(&_dvrVM.p_exitImageID);
_dvrVM.p_targetImageID.addSharedProperty(&_combine.p_mirrorImageID);
_combine.p_targetImageID.setValue("combine");
_dvrNormal.p_targetImageID.addSharedProperty(&_depthDarkening.p_inputImage);
_depthDarkening.p_outputImage.addSharedProperty(&_combine.p_normalImageID);
}
void AdvancedDVRVis::deinit() {
_canvasSize.s_changed.disconnect(this);
AutoEvaluationPipeline::deinit();
}
void AdvancedDVRVis::onProcessorValidated(AbstractProcessor* processor) {
if (processor == &_imageReader) {
// update camera
ScopedTypedData<ImageData> img(*_data, _imageReader.p_targetImageID.getValue());
if (img != 0) {
_trackballEH->reinitializeCamera(img);
}
}
}
}
\ No newline at end of file
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
#ifndef ADVANCEDDVRVIS_H__
#define ADVANCEDDVRVIS_H__
#include "core/datastructures/imagerepresentationlocal.h"
#include "core/eventhandlers/trackballnavigationeventlistener.h"
#include "core/pipeline/autoevaluationpipeline.h"
#include "core/properties/cameraproperty.h"
#include "modules/io/processors/mhdimagereader.h"
#include "modules/vis/processors/virtualmirrorgeometrygenerator.h"
#include "modules/vis/processors/proxygeometrygenerator.h"
#include "modules/vis/processors/geometryrenderer.h"
#include "modules/vis/processors/eepgenerator.h"
#include "modules/vis/processors/drrraycaster.h"
#include "modules/vis/processors/optimizedraycaster.h"
#include "modules/vis/processors/depthdarkening.h"
#include "modules/vis/processors/virtualmirrorcombine.h"
namespace campvis {
class AdvancedDVRVis : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
*/
AdvancedDVRVis(DataContainer* dc);
/**
* Virtual Destructor
**/
virtual ~AdvancedDVRVis();
/// \see AutoEvaluationPipeline::init()
virtual void init();
/// \see AutoEvaluationPipeline::deinit()
virtual void deinit();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
static const std::string getId() { return "AdvancedDVRVis"; };
protected:
/**
* Slot getting called when one of the observed processors got validated.
* Updates the camera properties, when the input image has changed.
* \param processor The processor that emitted the signal
*/
virtual void onProcessorValidated(AbstractProcessor* processor);
CameraProperty _camera;
MhdImageReader _imageReader;
ProxyGeometryGenerator _pgGenerator;
VirtualMirrorGeometryGenerator _vmgGenerator;
GeometryRenderer _vmRenderer;
EEPGenerator _eepGenerator;
EEPGenerator _vmEepGenerator;
OptimizedRaycaster _dvrNormal;
OptimizedRaycaster _dvrVM;
DepthDarkening _depthDarkening;
VirtualMirrorCombine _combine;
TrackballNavigationEventListener* _trackballEH;
};
}
#endif // ADVANCEDDVRVIS_H__
......@@ -22,7 +22,7 @@
//
// ================================================================================================
#include "AdvDVRVis.h"
#include "advdvrvis.h"
#include "tgt/event/keyevent.h"
#include "core/datastructures/imagedata.h"
......@@ -30,41 +30,27 @@
#include "core/classification/geometry1dtransferfunction.h"
#include "core/classification/tfgeometry1d.h"
#include "modules/vis/advraycaster/advoptimizedraycaster.h"
namespace campvis {
AdvDVRVis::AdvDVRVis(DataContainer* dc)
: AutoEvaluationPipeline(dc)
, _camera("camera", "Camera")
, _lsp()
, _imageReader()
, _pgGenerator()
, _vmgGenerator()
, _vmRenderer(&_canvasSize)
, _eepGenerator(&_canvasSize)
, _vmEepGenerator(&_canvasSize)
, _dvrNormal(&_canvasSize)
, _dvrVM(&_canvasSize)
, _depthDarkening(&_canvasSize)
, _combine(&_canvasSize)
, _vr(&_canvasSize, new AdvOptimizedRaycaster(&_canvasSize))
, _trackballEH(0)
{
addProperty(&_camera);
addProperty(_camera);
_trackballEH = new TrackballNavigationEventListener(&_camera, &_canvasSize);
_trackballEH->addLqModeProcessor(&_dvrNormal);
_trackballEH->addLqModeProcessor(&_dvrVM);
_trackballEH->addLqModeProcessor(&_depthDarkening);
_trackballEH->addLqModeProcessor(&_vr);
addEventListenerToBack(_trackballEH);
addProcessor(&_lsp);
addProcessor(&_imageReader);
addProcessor(&_pgGenerator);
addProcessor(&_vmgGenerator);
addProcessor(&_vmRenderer);
addProcessor(&_eepGenerator);
addProcessor(&_vmEepGenerator);
addProcessor(&_dvrNormal);
addProcessor(&_dvrVM);
addProcessor(&_depthDarkening);
addProcessor(&_combine);
addProcessor(&_vr);
}
AdvDVRVis::~AdvDVRVis() {
......@@ -73,72 +59,23 @@ namespace campvis {
void AdvDVRVis::init() {
AutoEvaluationPipeline::init();
_imageReader.s_validated.connect(this, &AdvDVRVis::onProcessorValidated);
_camera.addSharedProperty(&_vmgGenerator.p_camera);
_camera.addSharedProperty(&_vmRenderer.p_camera);
_camera.addSharedProperty(&_eepGenerator.p_camera);
_camera.addSharedProperty(&_vmEepGenerator.p_camera);
_camera.addSharedProperty(&_dvrNormal.p_camera);
_camera.addSharedProperty(&_dvrVM.p_camera);
//_imageReader.p_url.setValue("D:\\Medical Data\\Dentalscan\\dental.mhd");
//_imageReader.p_url.setValue("C:/NavabJob/Dataset/nucleon.mhd");
//_imageReader.p_url.setValue("C:/NavabJob/Dataset/walnut.mhd");
//_imageReader.p_url.setValue("C:/NavabJob/Dataset/dental.mhd");
_imageReader.p_url.setValue("C:/Campvis/Dataset/smallHeart.mhd");
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_eepGenerator.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_vmEepGenerator.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_dvrVM.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_dvrNormal.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_pgGenerator.p_sourceImageID);
_dvrNormal.p_targetImageID.setValue("drr.output");
_dvrVM.p_targetImageID.setValue("dvr.output");
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .42f), tgt::col4(255, 0, 0, 255), tgt::col4(255, 0, 0, 255)));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.45f, .5f), tgt::col4(0, 255, 0, 255), tgt::col4(0, 255, 0, 255)));
_dvrNormal.p_transferFunction.replaceTF(dvrTF);
Geometry1DTransferFunction* vmTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
vmTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .42f), tgt::col4(255, 0, 0, 255), tgt::col4(255, 0, 0, 255)));
vmTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.45f, .5f), tgt::col4(0, 255, 0, 255), tgt::col4(0, 255, 0, 255)));
_dvrVM.p_transferFunction.replaceTF(vmTF);
_vmRenderer.p_renderTargetID.addSharedProperty(&_combine.p_mirrorRenderID);
_vmEepGenerator.p_entryImageID.setValue("vm.eep.entry");
_vmEepGenerator.p_exitImageID.setValue("vm.eep.exit");
_vmEepGenerator.p_enableMirror.setValue(true);
// not the most beautiful way... *g*
// this will all get better with scripting support.
static_cast<BoolProperty*>(_vmEepGenerator.getProperty("applyMask"))->setValue(true);
_vmRenderer.p_renderTargetID.addSharedProperty(static_cast<DataNameProperty*>(_vmEepGenerator.getProperty("maskID")));
_imageReader.s_validated.connect(this, &AdvDVRVis::onProcessorValidated);
_camera.addSharedProperty(&_vr.p_camera);
_vr.p_outputImage.setValue("combine");
_renderTargetID.setValue("combine");
_pgGenerator.p_geometryID.addSharedProperty(&_vmEepGenerator.p_geometryID);
_pgGenerator.p_geometryID.addSharedProperty(&_eepGenerator.p_geometryID);
_vmgGenerator.p_mirrorID.addSharedProperty(&_vmEepGenerator.p_mirrorID);
_vmgGenerator.p_mirrorID.addSharedProperty(&_vmRenderer.p_geometryID);
_vmgGenerator.p_mirrorCenter.setValue(tgt::vec3(0.f, 0.f, -20.f));
_vmgGenerator.p_poi.setValue(tgt::vec3(40.f, 40.f, 40.f));
_vmgGenerator.p_size.setValue(60.f);
_eepGenerator.p_entryImageID.addSharedProperty(&_dvrNormal.p_entryImageID);
_vmEepGenerator.p_entryImageID.addSharedProperty(&_dvrVM.p_entryImageID);
_eepGenerator.p_exitImageID.addSharedProperty(&_dvrNormal.p_exitImageID);
_vmEepGenerator.p_exitImageID.addSharedProperty(&_dvrVM.p_exitImageID);
_dvrVM.p_targetImageID.addSharedProperty(&_combine.p_mirrorImageID);
_combine.p_targetImageID.setValue("combine");
_dvrNormal.p_targetImageID.addSharedProperty(&_depthDarkening.p_inputImage);
_depthDarkening.p_outputImage.addSharedProperty(&_combine.p_normalImageID);
_imageReader.p_url.setValue(ShdrMgr.completePath("/modules/vis/sampledata/smallHeart.mhd"));
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.addSharedProperty(&_vr.p_inputVolume);
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.12f, .15f), tgt::col4(85, 0, 0, 128), tgt::col4(255, 0, 0, 128)));