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

Moved invalidation level from AbstractProperty to AbstractProcessor:

To now, each property hat an _invalidationLevel field that was evaluated by processors when the property had changed in order to determine what has to be done. However, since properties could also be owned by other classes, this design was semantically misleading.
Therefore, it was removed with this commit and replaced by the invalidation map of each processor. Now, this per-processor mapping of property -> invalidation level is managed by the processor itself. Furthermore, the invalidation level is no longer setup during property creation but during AbstractProcessor::addProperty(), which also makes much more sense.

ATTENTION: Due to these intrusive API changes, the code of all processors and other classes handling properties needs to be changed. As a reminder, the implementation of addProperty() also now takes a reference instead of a pointer, so that old code does no longer compile.

refs #542
parent 94a730da
......@@ -101,8 +101,8 @@ namespace campvis {
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.05f, .8f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(0.f, 1.f), tgt::col4(0, 0, 0, 0), tgt::col4(255, 255, 255, 255)));
static_cast<TransferFunctionProperty*>(_ve.getProperty("TransferFunction"))->setAutoFitWindowToData(false);
static_cast<TransferFunctionProperty*>(_ve.getProperty("TransferFunction"))->replaceTF(dvrTF);
static_cast<TransferFunctionProperty*>(_ve.getNestedProperty("VolumeRendererProperties::RaycasterProps::TransferFunction"))->setAutoFitWindowToData(false);
static_cast<TransferFunctionProperty*>(_ve.getNestedProperty("VolumeRendererProperties::RaycasterProps::TransferFunction"))->replaceTF(dvrTF);
static_cast<FloatProperty*>(_ve.getNestedProperty("VolumeRendererProperties::RaycasterProps::GradientLod"))->setValue(0.5f);
static_cast<FloatProperty*>(_ve.getNestedProperty("VolumeRendererProperties::RaycasterProps::SamplingRate"))->setValue(1.f);
......@@ -147,7 +147,7 @@ namespace campvis {
histogram->addPredicate(vpToAdd);
histogram->resetPredicates();
addProperty(php);
addProperty(*php);
}
}
......
......@@ -58,7 +58,7 @@ namespace campvis {
AdvancedUsFusion::AdvancedUsFusion(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_usImageId("UsImageId", "Ultrasound Input Image", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES | AbstractProcessor::INVALID_RESULT)
, p_usImageId("UsImageId", "Ultrasound Input Image", "", DataNameProperty::READ)
, p_blurredImageId("BlurredImageId", "Blurred Ultrasound Image", "", DataNameProperty::READ)
, p_gradientImageID("GradientImageId", "Gradient Input Image", "", DataNameProperty::READ)
, p_confidenceImageID("ConfidenceImageId", "Confidence Map Input", "", DataNameProperty::READ)
......@@ -73,18 +73,18 @@ namespace campvis {
, p_use3DTexture("Use3DTexture", "Use 3D Texture", false)
, _shader(0)
{
addProperty(&p_usImageId);
addProperty(&p_blurredImageId);
addProperty(&p_gradientImageID);
addProperty(&p_confidenceImageID);
addProperty(&p_blurredScaling);
addProperty(&p_targetImageID);
addProperty(&p_sliceNumber);
addProperty(&p_transferFunction);
addProperty(&p_confidenceTF);
addProperty(&p_view);
addProperty(&p_confidenceScaling);
addProperty(&p_hue);
addProperty(p_usImageId, INVALID_PROPERTIES | INVALID_RESULT);
addProperty(p_blurredImageId);
addProperty(p_gradientImageID);
addProperty(p_confidenceImageID);
addProperty(p_blurredScaling);
addProperty(p_targetImageID);
addProperty(p_sliceNumber);
addProperty(p_transferFunction);
addProperty(p_confidenceTF);
addProperty(p_view);
addProperty(p_confidenceScaling);
addProperty(p_hue);
Geometry1DTransferFunction* tf = static_cast<Geometry1DTransferFunction*>(p_confidenceTF.getTF());
tf->addGeometry(TFGeometry1D::createQuad(tgt::vec2(0.f, 1.f), tgt::col4(0, 0, 0, 96), tgt::col4(0, 0, 0, 0)));
......
......@@ -49,8 +49,8 @@ namespace campvis {
PointPredicateEvaluator::PointPredicateEvaluator(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES | AbstractProcessor::INVALID_RESULT)
, p_inputLabels("InputLabels", "Input Label Image", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES | AbstractProcessor::INVALID_RESULT)
, p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ)
, p_inputLabels("InputLabels", "Input Label Image", "", DataNameProperty::READ)
, p_inputSnr("InputSnr", "Input SNR", "", DataNameProperty::READ)
, p_inputVesselness("InputVesselness", "Input Vesselness", "", DataNameProperty::READ)
, p_inputConfidence("InputConfidence", "Input Confidence", "", DataNameProperty::READ)
......@@ -59,15 +59,15 @@ namespace campvis {
, p_histogram("PredicateHistogram", "Point Predicate Histogram")
, _shader(0)
{
addProperty(&p_inputImage);
addProperty(&p_inputLabels);
addProperty(&p_inputSnr);
addProperty(&p_inputVesselness);
addProperty(&p_inputConfidence);
addProperty(&p_outputImage);
addProperty(&p_camera);
addProperty(&p_histogram);
addProperty(p_inputImage, INVALID_PROPERTIES | INVALID_RESULT);
addProperty(p_inputLabels, INVALID_PROPERTIES | INVALID_RESULT);
addProperty(p_inputSnr);
addProperty(p_inputVesselness);
addProperty(p_inputConfidence);
addProperty(p_outputImage);
addProperty(p_camera);
addProperty(p_histogram);
}
PointPredicateEvaluator::~PointPredicateEvaluator() {
......@@ -137,7 +137,7 @@ namespace campvis {
glViewport(0, 0, static_cast<GLsizei>(viewportSize.x), static_cast<GLsizei>(viewportSize.y));
// render quad to compute difference measure by shader
for (int z = 0; z < size.z; ++z) {
for (int z = 0; z < static_cast<int>(size.z); ++z) {
float zTexCoord = static_cast<float>(z)/static_cast<float>(size.z) + .5f/static_cast<float>(size.z);
_shader->setUniform("_zTexCoord", zTexCoord);
_fbo->attachTexture(resultTexture, GL_COLOR_ATTACHMENT0, 0, z);
......
......@@ -35,7 +35,7 @@ namespace campvis {
PointPredicateRaycaster::PointPredicateRaycaster(IVec2Property* viewportSizeProp)
: RaycastingProcessor(viewportSizeProp, "modules/advancedusvis/glsl/pointpredicateraycaster.frag", true, "400")
, p_inputLabels("InputLabels", "Input Label Image", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES | AbstractProcessor::INVALID_RESULT)
, p_inputLabels("InputLabels", "Input Label Image", "", DataNameProperty::READ)
, p_inputSnr("InputSnr", "Input SNR", "", DataNameProperty::READ)
, p_inputVesselness("InputVesselness", "Input Vesselness", "", DataNameProperty::READ)
, p_inputConfidence("InputConfidence", "Input Confidence", "", DataNameProperty::READ)
......@@ -43,11 +43,11 @@ namespace campvis {
{
addDecorator(new ProcessorDecoratorShading());
addProperty(&p_inputLabels);
addProperty(&p_inputSnr);
addProperty(&p_inputVesselness);
addProperty(&p_inputConfidence);
addProperty(&p_predicateHistogram);
addProperty(p_inputLabels, INVALID_RESULT | INVALID_PROPERTIES);
addProperty(p_inputSnr);
addProperty(p_inputVesselness);
addProperty(p_inputConfidence);
addProperty(p_predicateHistogram);
decoratePropertyCollection(this);
}
......
......@@ -22,7 +22,7 @@
//
// ================================================================================================
#include "PredicateVolumeExplorer.h"
#include "predicatevolumeexplorer.h"
#include "tgt/logmanager.h"
#include "tgt/shadermanager.h"
#include "tgt/textureunit.h"
......@@ -48,31 +48,31 @@ namespace campvis {
, p_inputVesselness("InputVesselness", "Input Vesselness", "", DataNameProperty::READ)
, p_inputConfidence("InputConfidence", "Input Confidence", "", DataNameProperty::READ)
, p_histogram("PredicateHistogram", "Point Predicate Histogram")
, p_pbProperties("PredicateBitsetProperties", "Predicate Bitset Properties", VALID)
, p_pbProperties("PredicateBitsetProperties", "Predicate Bitset Properties")
, _predicateEvaluation(_viewportSizeProperty)
, _bitmaskHandle(nullptr)
{
p_inputVolume.addSharedProperty(&_predicateEvaluation.p_inputImage);
addProperty(&p_inputLabels);
addProperty(p_inputLabels);
p_inputLabels.addSharedProperty(&(static_cast<PointPredicateRaycaster*>(_raycaster.getRaycastingProcessor()))->p_inputLabels);
p_inputLabels.addSharedProperty(&_predicateEvaluation.p_inputLabels);
addProperty(&p_inputSnr);
addProperty(p_inputSnr);
p_inputSnr.addSharedProperty(&(static_cast<PointPredicateRaycaster*>(_raycaster.getRaycastingProcessor()))->p_inputSnr);
p_inputSnr.addSharedProperty(&_predicateEvaluation.p_inputSnr);
addProperty(&p_inputVesselness);
addProperty(p_inputVesselness);
p_inputVesselness.addSharedProperty(&(static_cast<PointPredicateRaycaster*>(_raycaster.getRaycastingProcessor()))->p_inputVesselness);
p_inputVesselness.addSharedProperty(&_predicateEvaluation.p_inputVesselness);
addProperty(&p_inputConfidence);
addProperty(p_inputConfidence);
p_inputConfidence.addSharedProperty(&(static_cast<PointPredicateRaycaster*>(_raycaster.getRaycastingProcessor()))->p_inputConfidence);
p_inputConfidence.addSharedProperty(&_predicateEvaluation.p_inputConfidence);
addProperty(&p_histogram);
addProperty(p_histogram);
p_pbProperties.addPropertyCollection(_predicateEvaluation);
addProperty(&p_pbProperties);
addProperty(p_pbProperties, VALID);
p_histogram.addSharedProperty(&(static_cast<PointPredicateRaycaster*>(_raycaster.getRaycastingProcessor())->p_predicateHistogram));
p_histogram.addSharedProperty(&_predicateEvaluation.p_histogram);
......
......@@ -49,19 +49,19 @@ namespace campvis {
ScanlineDistributionComputation::ScanlineDistributionComputation(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ, AbstractProcessor::INVALID_PROPERTIES | AbstractProcessor::INVALID_RESULT)
, p_inputImage("InputImage", "Input Image", "", DataNameProperty::READ)
, p_outputImage("OutputImage", "Output Image", "predicatemask", DataNameProperty::WRITE)
, p_scanningDirection("ScanningDirection", "US Scanning Direction", tgt::vec3(0.f, 1.f, 0.f), tgt::vec3(-1.f), tgt::vec3(1.f))
, p_threshold("Threshold", "Threshold", .1f, .01f, 1.f)
, p_stepSize("StepSize", "Step Size", 2.f, 1.f, 16.f, 1.f, 1)
, _shader(0)
{
addProperty(&p_inputImage);
addProperty(&p_outputImage);
addProperty(p_inputImage, INVALID_RESULT | INVALID_PROPERTIES);
addProperty(p_outputImage);
addProperty(&p_scanningDirection);
addProperty(&p_threshold);
addProperty(&p_stepSize);
addProperty(p_scanningDirection);
addProperty(p_threshold);
addProperty(p_stepSize);
}
ScanlineDistributionComputation::~ScanlineDistributionComputation() {
......@@ -76,7 +76,7 @@ namespace campvis {
_shader->setAttributeLocation(1, "in_TexCoord");
_viewportSizeProperty->s_changed.disconnect(this);
_viewportSizeProperty->setInvalidationLevel(AbstractProcessor::VALID);
setPropertyInvalidationLevel(*_viewportSizeProperty, VALID);
}
void ScanlineDistributionComputation::deinit() {
......@@ -112,7 +112,7 @@ namespace campvis {
glViewport(0, 0, static_cast<GLsizei>(viewportSize.x), static_cast<GLsizei>(viewportSize.y));
// render quad to compute difference measure by shader
for (int z = 0; z < size.z; ++z) {
for (int z = 0; z < static_cast<int>(size.z); ++z) {
float zTexCoord = static_cast<float>(z)/static_cast<float>(size.z) + .5f/static_cast<float>(size.z);
_shader->setUniform("_zTexCoord", zTexCoord);
_fbo->attachTexture(distanceTexture, GL_COLOR_ATTACHMENT0, 0, z);
......
......@@ -32,8 +32,8 @@ namespace campvis {
const std::string PointPredicateHistogramProperty::loggerCat_ = "CAMPVis.modules.advancedusvis.PointPredicateHistogramProperty";
PointPredicateHistogramProperty::PointPredicateHistogramProperty(const std::string& name, const std::string& title, int invalidationLevel /*= AbstractProcessor::INVALID_RESULT*/)
: AbstractProperty(name, title, invalidationLevel)
PointPredicateHistogramProperty::PointPredicateHistogramProperty(const std::string& name, const std::string& title)
: AbstractProperty(name, title)
{
_ignoreSignals = 0;
std::shared_ptr<PointPredicateHistogram> ptr(new PointPredicateHistogram());
......
......@@ -51,9 +51,8 @@ namespace campvis {
* Creates a new PointPredicateHistogramProperty
* \param name Property name (unchangable!)
* \param title Property title (e.g. used for GUI)
* \param invalidationLevel Invalidation level that this property triggers
*/
PointPredicateHistogramProperty(const std::string& name, const std::string& title, int invalidationLevel = AbstractProcessor::INVALID_RESULT);
PointPredicateHistogramProperty(const std::string& name, const std::string& title);
/**
* Virtual Destructor
......
......@@ -36,7 +36,7 @@ namespace campvis {
CampcomMhdReceiver::CampcomMhdReceiver()
: AbstractProcessor()
, p_address("ServerAddress", "Server Address", "127.0.0.1")
, p_connect("Connect", "Connect to Server", AbstractProcessor::VALID)
, p_connect("Connect", "Connect to Server")
, p_targetImageID("targetImageName", "Target Image ID", "CampcomMhdReceiver.output", DataNameProperty::WRITE)
, p_imageOffset("ImageOffset", "Image Offset in mm", tgt::vec3(0.f), tgt::vec3(-10000.f), tgt::vec3(10000.f), tgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", tgt::vec3(1.f), tgt::vec3(-100.f), tgt::vec3(100.f), tgt::vec3(0.1f))
......@@ -44,11 +44,11 @@ namespace campvis {
{
_incomingMhd = 0;
addProperty(&p_address);
addProperty(&p_targetImageID);
addProperty(&p_connect);
addProperty(&p_imageOffset);
addProperty(&p_voxelSize);
addProperty(p_address, VALID);
addProperty(p_targetImageID, VALID);
addProperty(p_connect, VALID);
addProperty(p_imageOffset, VALID);
addProperty(p_voxelSize, VALID);
}
......@@ -70,8 +70,6 @@ namespace campvis {
}
void CampcomMhdReceiver::updateResult(DataContainer& data) {
validate(INVALID_RESULT);
// Get the last received MHD file:
// Use atomic fetch and store because at the same time CAMPCom may receive another file!
campcom::MHDImageData* mid = _incomingMhd.fetch_and_store(0);
......@@ -117,6 +115,8 @@ namespace campvis {
ImageRepresentationLocal::create(image, wtp);
image->setMappingInformation(ImageMappingInformation(size, imageOffset + p_imageOffset.getValue(), voxelSize * p_voxelSize.getValue()));
data.addData(p_targetImageID.getValue(), image);
validate(INVALID_RESULT);
}
void CampcomMhdReceiver::onBtnConnectClicked() {
......
......@@ -48,8 +48,8 @@ namespace campvis {
, _compositor(&_canvasSize)
, _trackballEH(0)
{
addProperty(&_camera);
addProperty(&_boundsData);
addProperty(_camera);
addProperty(_boundsData);
_trackballEH = new TrackballNavigationEventListener(&_camera, &_canvasSize);
_trackballEH->addLqModeProcessor(&_vr);
......@@ -126,7 +126,7 @@ namespace campvis {
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, 1.f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.1f, .125f), tgt::col4(255, 0, 0, 32), tgt::col4(255, 0, 0, 32)));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .5f), tgt::col4(0, 255, 0, 128), tgt::col4(0, 255, 0, 128)));
static_cast<TransferFunctionProperty*>(_vr.getProperty("TransferFunction"))->replaceTF(dvrTF);
static_cast<TransferFunctionProperty*>(_vr.getNestedProperty("RaycasterProps::TransferFunction"))->replaceTF(dvrTF);
_vr.p_outputImage.addSharedProperty(&_compositor.p_secondImageId);
_gr.p_renderTargetID.setValue("gr");
......
......@@ -49,10 +49,10 @@ namespace campvis {
{
addDecorator(new ProcessorDecoratorShading());
addProperty(&p_geometryID);
addProperty(&p_renderTargetID);
addProperty(&p_camera);
addProperty(&p_color);
addProperty(p_geometryID);
addProperty(p_renderTargetID);
addProperty(p_camera);
addProperty(p_color);
decoratePropertyCollection(this);
}
......
......@@ -31,13 +31,13 @@ namespace campvis {
ImageSeriesSplitter::ImageSeriesSplitter()
: AbstractProcessor()
, p_inputID("InputID", "Input Image Series ID", "input", DataNameProperty::READ, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_PROPERTIES)
, p_inputID("InputID", "Input Image Series ID", "input", DataNameProperty::READ)
, p_outputID("OutputID", "Output Image ID", "output", DataNameProperty::WRITE)
, p_imageIndex("ImageIndex", "Image to Select", 0, 0, 0)
{
addProperty(&p_inputID);
addProperty(&p_outputID);
addProperty(&p_imageIndex);
addProperty(p_inputID, INVALID_RESULT | INVALID_PROPERTIES);
addProperty(p_outputID);
addProperty(p_imageIndex);
}
ImageSeriesSplitter::~ImageSeriesSplitter() {
......
......@@ -48,20 +48,20 @@ namespace campvis {
: VisualizationProcessor(viewportSizeProp)
, p_strainId("StrainDataId", "Input Strain Data ID", "gr.strain", DataNameProperty::READ)
, p_renderTargetID("p_renderTargetID", "Output Image", "gr.output", DataNameProperty::WRITE)
, p_camera("Camera", "Camera ID")//, "camera", DataNameProperty::READ, AbstractProcessor::INVALID_RESULT, DataNameProperty::CameraData)
, p_renderMode("RenderMode", "Render Mode", renderModeOptions, 2, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_SHADER)
, p_camera("Camera", "Camera ID")
, p_renderMode("RenderMode", "Render Mode", renderModeOptions, 2)
, p_lineWidth("LineWidth", "Line width", 3.f, .5f, 10.f, 0.1f)
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, _shader(0)
{
addDecorator(new ProcessorDecoratorShading());
addProperty(&p_strainId);
addProperty(&p_renderTargetID);
addProperty(&p_camera);
addProperty(&p_color);
addProperty(&p_renderMode);
addProperty(&p_lineWidth);
addProperty(p_strainId);
addProperty(p_renderTargetID);
addProperty(p_camera);
addProperty(p_color);
addProperty(p_renderMode, INVALID_RESULT | INVALID_SHADER);
addProperty(p_lineWidth);
decoratePropertyCollection(this);
}
......@@ -72,7 +72,7 @@ namespace campvis {
void StrainFiberRenderer::init() {
VisualizationProcessor::init();
_shader = ShdrMgr.load("modules/columbia/glsl/strainfiberrenderer.vert", "modules/columbia/glsl/strainfiberrenderer.geom", "modules/columbia/glsl/strainfiberrenderer.frag", "");
_shader = ShdrMgr.load("modules/columbia/glsl/strainfiberrenderer.vert", "modules/columbia/glsl/strainfiberrenderer.geom", "modules/columbia/glsl/strainfiberrenderer.frag", generateGlslHeader());
if (_shader != 0) {
_shader->setAttributeLocation(0, "in_Position");
_shader->setAttributeLocation(1, "in_TexCoord");
......
......@@ -161,23 +161,23 @@ namespace campvis {
StrainFiberTracker::StrainFiberTracker()
: AbstractProcessor()
, p_strainId("StrainId", "Input Strain Data", "input", DataNameProperty::READ, AbstractProcessor::VALID)
, p_outputID("OutputId", "Output Fiber Data", "output", DataNameProperty::WRITE, AbstractProcessor::VALID)
, p_strainId("StrainId", "Input Strain Data", "input", DataNameProperty::READ)
, p_outputID("OutputId", "Output Fiber Data", "output", DataNameProperty::WRITE)
, p_updateButton("UpdateButton", "Perform Tracking")
, p_seedDistance("SeedDistance", "Seed Distance", 4, 1, 16, 1, AbstractProcessor::VALID)
, p_numSteps("NumSteps", "Maximum Number of Steps", 256, 16, 1024, 1, AbstractProcessor::VALID)
, p_stepSize("StepSize", "Base Step Size", 1.f, .01f, 10.f, 0.01f, 2, AbstractProcessor::VALID)
, p_strainThreshold("StrainThreshold", "Local Strain Threshold", .5f, .1f, 1.f, 0.01f, 2, AbstractProcessor::VALID)
, p_maximumAngle("MaximumAngle", "Maxium Angle", 25.f, 0.f, 100.f, 0.1f, 2, AbstractProcessor::VALID)
, p_seedDistance("SeedDistance", "Seed Distance", 4, 1, 16, 1)
, p_numSteps("NumSteps", "Maximum Number of Steps", 256, 16, 1024, 1)
, p_stepSize("StepSize", "Base Step Size", 1.f, .01f, 10.f, 0.01f, 2)
, p_strainThreshold("StrainThreshold", "Local Strain Threshold", .5f, .1f, 1.f, 0.01f, 2)
, p_maximumAngle("MaximumAngle", "Maxium Angle", 25.f, 0.f, 100.f, 0.1f, 2)
{
addProperty(&p_strainId);
addProperty(&p_outputID);
addProperty(&p_updateButton);
addProperty(&p_seedDistance);
addProperty(&p_numSteps);
addProperty(&p_stepSize);
addProperty(&p_strainThreshold);
addProperty(&p_maximumAngle);
addProperty(p_strainId, VALID);
addProperty(p_outputID, VALID);
addProperty(p_updateButton);
addProperty(p_seedDistance, VALID);
addProperty(p_numSteps, VALID);
addProperty(p_stepSize, VALID);
addProperty(p_strainThreshold, VALID);
addProperty(p_maximumAngle, VALID);
}
......
......@@ -34,16 +34,16 @@ namespace campvis {
StrainRaycaster::StrainRaycaster(IVec2Property* viewportSizeProp)
: RaycastingProcessor(viewportSizeProp, "modules/columbia/glsl/strainraycaster.frag", true)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_enableShadowing("EnableShadowing", "Enable Hard Shadows", false, AbstractProcessor::INVALID_SHADER)
, p_enableShadowing("EnableShadowing", "Enable Hard Shadows", false)
, p_shadowIntensity("ShadowIntensity", "Shadow Intensity", .5f, .0f, 1.f)
, p_enableAdaptiveStepsize("EnableAdaptiveStepSize", "Enable Adaptive Step Size", true, AbstractProcessor::INVALID_SHADER)
, p_enableAdaptiveStepsize("EnableAdaptiveStepSize", "Enable Adaptive Step Size", true)
{
addDecorator(new ProcessorDecoratorShading());
addProperty(&p_targetImageID);
addProperty(&p_enableShadowing);
addProperty(&p_shadowIntensity);
addProperty(&p_enableAdaptiveStepsize);
addProperty(p_targetImageID);
addProperty(p_enableShadowing, INVALID_SHADER | INVALID_RESULT);
addProperty(p_shadowIntensity);
addProperty(p_enableAdaptiveStepsize, INVALID_SHADER | INVALID_RESULT);
decoratePropertyCollection(this);
}
......
......@@ -59,9 +59,9 @@ namespace campvis {
, _shader(nullptr)
, _devilTextureReader(nullptr)
{
addProperty(&p_url);
addProperty(&p_targetImageID);
addProperty(&p_importType);
addProperty(p_url);
addProperty(p_targetImageID);
addProperty(p_importType);
_devilTextureReader = new tgt::TextureReaderDevil();
}
......
......@@ -48,8 +48,8 @@ namespace campvis {
, p_inputImage("InputImage", "Input Image ID", "DevilImageWriter.input", DataNameProperty::READ)
, p_url("url", "Image URL", "")
{
addProperty(&p_inputImage);
addProperty(&p_url);
addProperty(p_inputImage);
addProperty(p_url);
}
DevilImageWriter::~DevilImageWriter() {
......
......@@ -46,10 +46,10 @@ namespace campvis {
this->_ext.push_back(".csv");
this->p_targetImageID.setValue("CsvdImageReader.output");
addProperty(&p_url);
addProperty(&p_targetImageID);
addProperty(&p_imageOffset);
addProperty(&p_voxelSize);
addProperty(p_url);
addProperty(p_targetImageID);
addProperty(p_imageOffset);
addProperty(p_voxelSize);
}
CsvdImageReader::~CsvdImageReader() {
......
......@@ -45,7 +45,7 @@ namespace campvis {
: AbstractProcessor()
, p_url("url", "Image URL", "")
{
addProperty(&p_url);
addProperty(p_url);
p_url.s_changed.connect(this, &GenericImageReader::onUrlPropertyChanged);
this->addReader(new CsvdImageReader());
......@@ -170,7 +170,7 @@ namespace campvis {
sp->setVisible(false);
}
this->addProperty(meta);
this->addProperty(*meta);
this->_readers.insert(std::pair<AbstractImageReader*, MetaProperty*>(reader, meta));
return 0;
}
......
......@@ -56,13 +56,13 @@ namespace campvis {
this->_ext.push_back(".ltf");
this->p_targetImageID.setValue("LtfImageReader.output");
addProperty(&p_url);
addProperty(&p_size);
addProperty(&p_numChannels);
addProperty(&p_baseType);
addProperty(&p_targetImageID);
addProperty(&p_imageOffset);
addProperty(&p_voxelSize);
addProperty(p_url);
addProperty(p_size);
addProperty(p_numChannels);
addProperty(p_baseType);
addProperty(p_targetImageID);
addProperty(p_imageOffset);
addProperty(p_voxelSize);
}
LtfImageReader::~LtfImageReader() {
......
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