Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 65cc4f5f authored by Hossain Mahmud's avatar Hossain Mahmud
Browse files

property explorer updates correctly if raycaster is changed

Conflicts:
	modules/vis/processors/volumerenderer.cpp
	modules/vis/processors/volumerenderer.h
parent e3cb6c9c
......@@ -34,6 +34,7 @@
#include "core/classification/simpletransferfunction.h"
#include "../../raycasterfactory.h"
#include "cgt/opengljobprocessor.h"
namespace campvis {
const std::string VolumeRenderer::loggerCat_ = "CAMPVis.modules.vis.VolumeRenderer";
......@@ -203,22 +204,26 @@ namespace campvis {
_orientationOverlay.p_passThroughImageId.setValue(p_outputImage.getValue() + ".raycasted");
}
if (prop == &p_raycastingProcSelector) {
RaycastingProcessor *currentRaycaster = _raycaster;
// Change to previous raycaster if "Select Processor" is selected
if (p_raycastingProcSelector.getOptionId() == p_raycastingProcSelector.getOptions()[0]._id) {
p_raycastingProcSelector.selectById(_raycaster->getName());
p_raycastingProcSelector.selectById(currentRaycaster->getName());
return;
}
if (p_raycastingProcSelector.getOptionId() == _raycaster->getName()) {
if (p_raycastingProcSelector.getOptionId() == currentRaycaster->getName()) {
return;
}
RaycastingProcessor *currentRaycaster = _raycaster;
removeProperty(p_raycasterProps);
//p_raycasterProps.deinitAllProperties();
p_lqMode.removeSharedProperty(&currentRaycaster->p_lqMode);
p_inputVolume.removeSharedProperty(&currentRaycaster->p_sourceImageID);
p_camera.removeSharedProperty(&currentRaycaster->p_camera);
p_outputImage.removeSharedProperty(&currentRaycaster->p_targetImageID);
p_raycasterProps.clearProperties();
p_raycasterProps.deinitAllProperties();
removeProperty(p_raycasterProps);
currentRaycaster->s_invalidated.disconnect(this);
_raycaster = RaycasterFactory::getRef().createRaycaster(p_raycastingProcSelector.getOptionId(), p_viewportSizeProp);
p_raycasterProps.addPropertyCollection(*_raycaster);
//_raycaster->p_lqMode.setVisible(false);
//_raycaster->p_camera.setVisible(false);
......@@ -226,9 +231,16 @@ namespace campvis {
//_raycaster->p_entryImageID.setVisible(false);
//_raycaster->p_exitImageID.setVisible(false);
//_raycaster->p_targetImageID.setVisible(false);
addProperty(p_raycasterProps, AbstractProcessor::VALID);
p_lqMode.addSharedProperty(&_raycaster->p_lqMode);
p_inputVolume.addSharedProperty(&_raycaster->p_sourceImageID);
p_camera.addSharedProperty(&_raycaster->p_camera);
p_outputImage.addSharedProperty(&_raycaster->p_targetImageID);
_raycaster->s_invalidated.connect(this, &VolumeRenderer::onProcessorInvalidated);
cgt::OpenGLJobProcessor::ScopedSynchronousGlJobExecution jobGuard;
currentRaycaster->deinit();
delete currentRaycaster;
invalidate(RAYCASTER_INVALID);
}
......
......@@ -25,6 +25,7 @@
#ifndef VOLUMERENDERER_H__
#define VOLUMERENDERER_H__
#include "sigslot/sigslot.h"
#include "core/pipeline/visualizationprocessor.h"
#include "core/pipeline/raycastingprocessor.h"
#include "core/properties/allproperties.h"
......@@ -107,6 +108,8 @@ namespace campvis {
MetaProperty p_raycasterProps; ///< MetaProperty for properties of the raycasting processor
MetaProperty p_orientationOverlayProps; ///< MetaProperty for properties of the OrientationOverlay processor
sigslot::signal2<RaycastingProcessor*, RaycastingProcessor*> s_raycasterChanged; ///< Signal emited when the raycaster is changed
protected:
/// \see AbstractProcessor::updateResult
virtual void updateResult(DataContainer& dataContainer);
......
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