Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing 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 549d6b31 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

fixed MetaProperty and added usage in VolumeExplorer

parent 98203ca0
...@@ -41,26 +41,6 @@ namespace campvis { ...@@ -41,26 +41,6 @@ namespace campvis {
MetaProperty::~MetaProperty() { MetaProperty::~MetaProperty() {
} }
void MetaProperty::init() {
AbstractProperty::init();
initAllProperties();
}
void MetaProperty::deinit() {
deinitAllProperties();
AbstractProperty::deinit();
}
void MetaProperty::lock() {
AbstractProperty::lock();
lockAllProperties();
}
void MetaProperty::unlock() {
unlockAllProperties();
AbstractProperty::unlock();
}
void MetaProperty::onPropertyChanged(const AbstractProperty* prop) { void MetaProperty::onPropertyChanged(const AbstractProperty* prop) {
s_changed(prop); s_changed(prop);
} }
......
...@@ -38,6 +38,11 @@ namespace campvis { ...@@ -38,6 +38,11 @@ namespace campvis {
/** /**
* Property wrapping around a bunch of other properties. * Property wrapping around a bunch of other properties.
* Useful either for grouping properties or for wrapping around entire property collections. * Useful either for grouping properties or for wrapping around entire property collections.
*
* \note ATTENTION: Even though MetaProperty derives from HasPropertyCollection, it does
* neither take ownership of its wrapped properties, nor does is (de)initialize
* or (un)lock them. This has to be done by the owners of the wrapped
* properties.
*/ */
class MetaProperty : public AbstractProperty, public HasPropertyCollection { class MetaProperty : public AbstractProperty, public HasPropertyCollection {
public: public:
...@@ -54,15 +59,6 @@ namespace campvis { ...@@ -54,15 +59,6 @@ namespace campvis {
**/ **/
virtual ~MetaProperty(); virtual ~MetaProperty();
/// \see AbstractProperty::init()
virtual void init();
/// \see AbstractProperty::deinit()
virtual void deinit();
/// \see AbstractProperty::lock()
virtual void lock();
/// \see AbstractProperty::unlock()
virtual void unlock();
/// \see HasPropertyCollection::onPropertyChanged /// \see HasPropertyCollection::onPropertyChanged
virtual void onPropertyChanged(const AbstractProperty* prop); virtual void onPropertyChanged(const AbstractProperty* prop);
......
...@@ -39,12 +39,9 @@ namespace campvis { ...@@ -39,12 +39,9 @@ namespace campvis {
VolumeExplorerDemo::VolumeExplorerDemo(DataContainer* dc) VolumeExplorerDemo::VolumeExplorerDemo(DataContainer* dc)
: AutoEvaluationPipeline(dc) : AutoEvaluationPipeline(dc)
, _camera("camera", "Camera")
, _imageReader() , _imageReader()
, _ve(&_canvasSize) , _ve(&_canvasSize)
{ {
addProperty(&_camera);
addProcessor(&_imageReader); addProcessor(&_imageReader);
addProcessor(&_ve); addProcessor(&_ve);
...@@ -59,7 +56,6 @@ namespace campvis { ...@@ -59,7 +56,6 @@ namespace campvis {
_imageReader.s_validated.connect(this, &VolumeExplorerDemo::onProcessorValidated); _imageReader.s_validated.connect(this, &VolumeExplorerDemo::onProcessorValidated);
_camera.addSharedProperty(&_ve.p_camera);
_ve.p_outputImage.setValue("combine"); _ve.p_outputImage.setValue("combine");
_renderTargetID.setValue("combine"); _renderTargetID.setValue("combine");
......
...@@ -68,7 +68,6 @@ namespace campvis { ...@@ -68,7 +68,6 @@ namespace campvis {
*/ */
virtual void onProcessorValidated(AbstractProcessor* processor); virtual void onProcessorValidated(AbstractProcessor* processor);
CameraProperty _camera;
MhdImageReader _imageReader; MhdImageReader _imageReader;
VolumeExplorer _ve; VolumeExplorer _ve;
}; };
......
...@@ -44,39 +44,44 @@ namespace campvis { ...@@ -44,39 +44,44 @@ namespace campvis {
VolumeExplorer::VolumeExplorer(IVec2Property* viewportSizeProp) VolumeExplorer::VolumeExplorer(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp) : VisualizationProcessor(viewportSizeProp)
, p_inputVolume("InputVolume", "Input Volume", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES) , p_inputVolume("InputVolume", "Input Volume", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES)
, p_camera("Camera", "Camera")
, p_xSlice("XSlice", "Slice in YZ Plane", 0, 0, 0, 1, INVALID_RESULT | SLICES_INVALID)
, p_ySlice("YSlice", "Slice in XZ Plane", 0, 0, 0, 1, INVALID_RESULT | SLICES_INVALID)
, p_zSlice("ZSlice", "Slice in XY Plane", 0, 0, 0, 1, INVALID_RESULT | SLICES_INVALID)
, p_outputImage("OutputImage", "Output Image", "ve.output", DataNameProperty::WRITE) , p_outputImage("OutputImage", "Output Image", "ve.output", DataNameProperty::WRITE)
, p_seProperties("SliceExtractorProperties", "Slice Extractor Properties", AbstractProcessor::VALID)
, p_vrProperties("VolumeRendererProperties", "Volume Renderer Properties", AbstractProcessor::VALID)
, _raycaster(viewportSizeProp) , _raycaster(viewportSizeProp)
, _sliceExtractor(viewportSizeProp) , _sliceExtractor(viewportSizeProp)
, p_sliceRenderSize("SliceRenderSize", "Slice Render Size", tgt::ivec2(32), tgt::ivec2(0), tgt::ivec2(10000), tgt::ivec2(1), AbstractProcessor::VALID) , p_sliceRenderSize("SliceRenderSize", "Slice Render Size", tgt::ivec2(32), tgt::ivec2(0), tgt::ivec2(10000), tgt::ivec2(1), AbstractProcessor::VALID)
, p_volumeRenderSize("VolumeRenderSize", "Volume Render Size", tgt::ivec2(32), tgt::ivec2(0), tgt::ivec2(10000), tgt::ivec2(1), AbstractProcessor::VALID) , p_volumeRenderSize("VolumeRenderSize", "Volume Render Size", tgt::ivec2(32), tgt::ivec2(0), tgt::ivec2(10000), tgt::ivec2(1), AbstractProcessor::VALID)
, _xSliceHandler(&p_xSlice) , _xSliceHandler(&_sliceExtractor.p_xSliceNumber)
, _ySliceHandler(&p_ySlice) , _ySliceHandler(&_sliceExtractor.p_ySliceNumber)
, _zSliceHandler(&p_zSlice) , _zSliceHandler(&_sliceExtractor.p_zSliceNumber)
, _windowingHandler(&_sliceExtractor.p_transferFunction) , _windowingHandler(&_sliceExtractor.p_transferFunction)
, _trackballEH(0) , _trackballEH(0)
, _mousePressed(false) , _mousePressed(false)
{ {
addProperty(&p_inputVolume); addProperty(&p_inputVolume);
addProperty(&p_camera);
addProperty(&p_xSlice);
addProperty(&p_ySlice);
addProperty(&p_zSlice);
addProperty(&p_outputImage); addProperty(&p_outputImage);
p_seProperties.addPropertyCollection(_sliceExtractor);
_sliceExtractor.p_lqMode.setVisible(false);
_sliceExtractor.p_sourceImageID.setVisible(false);
_sliceExtractor.p_targetImageID.setVisible(false);
_sliceExtractor.p_sliceOrientation.setVisible(false);
_sliceExtractor.p_xSliceColor.setVisible(false);
_sliceExtractor.p_ySliceColor.setVisible(false);
_sliceExtractor.p_zSliceColor.setVisible(false);
addProperty(&p_seProperties);
p_vrProperties.addPropertyCollection(_raycaster);
_raycaster.p_lqMode.setVisible(false);
_raycaster.p_inputVolume.setVisible(false);
_raycaster.p_outputImage.setVisible(false);
addProperty(&p_vrProperties);
addProperty(&_sliceExtractor.p_transferFunction); addProperty(&_sliceExtractor.p_transferFunction);
addProperty(_raycaster.getProperty("TransferFunction")); addProperty(_raycaster.getProperty("TransferFunction"));
p_inputVolume.addSharedProperty(&_raycaster.p_inputVolume); p_inputVolume.addSharedProperty(&_raycaster.p_inputVolume);
p_inputVolume.addSharedProperty(&_sliceExtractor.p_sourceImageID); p_inputVolume.addSharedProperty(&_sliceExtractor.p_sourceImageID);
p_camera.addSharedProperty(&_raycaster.p_camera);
p_xSlice.addSharedProperty(&_sliceExtractor.p_xSliceNumber);
p_ySlice.addSharedProperty(&_sliceExtractor.p_ySliceNumber);
p_zSlice.addSharedProperty(&_sliceExtractor.p_zSliceNumber);
_sliceExtractor.setViewportSizeProperty(&p_sliceRenderSize); _sliceExtractor.setViewportSizeProperty(&p_sliceRenderSize);
_raycaster.setViewportSizeProperty(&p_volumeRenderSize); _raycaster.setViewportSizeProperty(&p_volumeRenderSize);
...@@ -246,17 +251,17 @@ namespace campvis { ...@@ -246,17 +251,17 @@ namespace campvis {
if (img != 0) { if (img != 0) {
const tgt::svec3& imgSize = img->getSize(); const tgt::svec3& imgSize = img->getSize();
if (p_xSlice.getMaxValue() != imgSize.x - 1){ if (_sliceExtractor.p_xSliceNumber.getMaxValue() != imgSize.x - 1){
p_xSlice.setMaxValue(static_cast<int>(imgSize.x) - 1); _sliceExtractor.p_xSliceNumber.setMaxValue(static_cast<int>(imgSize.x) - 1);
p_xSlice.setValue(static_cast<int>(imgSize.x) / 2); _sliceExtractor.p_xSliceNumber.setValue(static_cast<int>(imgSize.x) / 2);
} }
if (p_ySlice.getMaxValue() != imgSize.y - 1){ if (_sliceExtractor.p_ySliceNumber.getMaxValue() != imgSize.y - 1){
p_ySlice.setMaxValue(static_cast<int>(imgSize.y) - 1); _sliceExtractor.p_ySliceNumber.setMaxValue(static_cast<int>(imgSize.y) - 1);
p_ySlice.setValue(static_cast<int>(imgSize.y) / 2); _sliceExtractor.p_ySliceNumber.setValue(static_cast<int>(imgSize.y) / 2);
} }
if (p_zSlice.getMaxValue() != imgSize.z - 1){ if (_sliceExtractor.p_zSliceNumber.getMaxValue() != imgSize.z - 1){
p_zSlice.setMaxValue(static_cast<int>(imgSize.z) - 1); _sliceExtractor.p_zSliceNumber.setMaxValue(static_cast<int>(imgSize.z) - 1);
p_zSlice.setValue(static_cast<int>(imgSize.z) / 2); _sliceExtractor.p_zSliceNumber.setValue(static_cast<int>(imgSize.z) / 2);
} }
_trackballEH->reinitializeCamera(img); _trackballEH->reinitializeCamera(img);
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "core/pipeline/visualizationprocessor.h" #include "core/pipeline/visualizationprocessor.h"
#include "core/properties/datanameproperty.h" #include "core/properties/datanameproperty.h"
#include "core/properties/numericproperty.h" #include "core/properties/numericproperty.h"
#include "core/properties/metaproperty.h"
#include "modules/vis/processors/volumerenderer.h" #include "modules/vis/processors/volumerenderer.h"
#include "modules/vis/processors/sliceextractor.h" #include "modules/vis/processors/sliceextractor.h"
...@@ -86,13 +87,11 @@ namespace campvis { ...@@ -86,13 +87,11 @@ namespace campvis {
virtual void process(DataContainer& data); virtual void process(DataContainer& data);
DataNameProperty p_inputVolume; ///< image ID for first input image DataNameProperty p_inputVolume; ///< image ID for first input image
DataNameProperty p_outputImage; ///< image ID for output image
CameraProperty p_camera; MetaProperty p_seProperties; ///< MetaProperty for SliceExtractor properties
IntProperty p_xSlice; MetaProperty p_vrProperties; ///< MetaProperty for Raycaster properties
IntProperty p_ySlice;
IntProperty p_zSlice;
DataNameProperty p_outputImage; ///< image ID for output image
protected: protected:
/// Additional invalidation levels for this processor. /// Additional invalidation levels for this processor.
......
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