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

Refactored DataNameProperty: Got rid of issueWrite() and connect(). Automatic...

Refactored DataNameProperty: Got rid of issueWrite() and connect(). Automatic invalidation of connected (shared) DataNameProperties is now delegated to AutoEvaluationPipeline.
ATTENTION: needs TBB 4.2 (not yet in repository, will be changed later)
parent 5c739225
......@@ -257,7 +257,6 @@ namespace campvis {
DISPATCH_ITK_FILTER(input, LaplacianSharpeningImageFilter, /* nothing here */);
}
data.addData(p_targetImageID.getValue(), id);
p_targetImageID.issueWrite();
}
else {
LDEBUG("No suitable input image found.");
......
......@@ -220,7 +220,6 @@ namespace campvis {
}
data.addData(p_targetImageID.getValue(), id);
p_targetImageID.issueWrite();
}
else {
LDEBUG("No suitable input image found.");
......
......@@ -74,8 +74,8 @@ namespace campvis {
//_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.connect(&_pgGenerator.p_sourceImageID);
_imageReader.p_targetImageID.connect(&_eepGenerator.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_pgGenerator.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_eepGenerator.p_sourceImageID);
_imageReader.s_validated.connect(this, &OpenCLPipeline::onProcessorValidated);
_clRaycaster._targetImageID.setValue("cl.output");
......@@ -90,10 +90,10 @@ namespace campvis {
_renderTargetID.setValue("cl.output");
_pgGenerator.p_geometryID.connect(&_eepGenerator.p_geometryID);
_pgGenerator.p_geometryID.addSharedProperty(&_eepGenerator.p_geometryID);
_eepGenerator.p_entryImageID.connect(&_clRaycaster._entryImageID);
_eepGenerator.p_exitImageID.connect(&_clRaycaster._exitImageID);
_eepGenerator.p_entryImageID.addSharedProperty(&_clRaycaster._entryImageID);
_eepGenerator.p_exitImageID.addSharedProperty(&_clRaycaster._exitImageID);
}
void OpenCLPipeline::deinit() {
......
......@@ -267,7 +267,6 @@ namespace campvis {
LGL_ERROR;
data.addData(_targetImageID.getValue(), rd);
_targetImageID.issueWrite();
}
else {
LERROR("Entry-/Exitpoints texture size does not match.");
......
......@@ -108,7 +108,6 @@ namespace campvis {
tbb::parallel_for(tbb::blocked_range<size_t>(0, input->getNumElements()), ApplyCentralDifferences(input, output));
data.addData(p_targetImageID.getValue(), id);
p_targetImageID.issueWrite();
}
else {
LDEBUG("No suitable input image found.");
......
......@@ -84,7 +84,6 @@ namespace campvis {
}
data.addData(p_targetImageID.getValue(), id);
p_targetImageID.issueWrite();
}
else {
LDEBUG("No suitable input image found.");
......
......@@ -194,8 +194,6 @@ namespace campvis {
data.addData("foo", imgTex);
data.addData(p_outputFH.getValue(), imgFh);
data.addData(p_outputFL.getValue(), imgFl);
p_outputFH.issueWrite();
p_outputFL.issueWrite();
}
else {
LDEBUG("No suitable intensities image found.");
......
......@@ -211,7 +211,6 @@ namespace campvis {
ImageData* output = new ImageData(input->getDimensionality(), tgt::svec3(input->getSize().x, input->getSize().y, 1), 1);
GenericImageRepresentationLocal<float, 1>* confidenceMap = GenericImageRepresentationLocal<float, 1>::create(output, outputValues);
data.addData(p_targetImageID.getValue(), output);
p_targetImageID.issueWrite();
validate(INVALID_RESULT);
}
......
......@@ -59,7 +59,7 @@ namespace campvis {
p_camera.addSharedProperty(&_renderer.p_camera);
_reader.p_url.setValue("C:/Users/SchuCh01/Documents/Data/Ultrasound/2012-12-12-Test/9l4sweep/content.xml");
_reader.p_targetImageID.connect(&_renderer.p_sourceImageID);
_reader.p_targetImageID.addSharedProperty(&_renderer.p_sourceImageID);
_renderer.s_boundingBoxChanged.connect(this, &UsCompounding::onBoundingBoxChanged);
_renderer.p_targetImageID.setValue("us.frame.output");
......
......@@ -66,7 +66,6 @@ namespace campvis {
TrackedUsFileIoData* file = new TrackedUsFileIoData(fio);
data.addData(p_targetImageID.getValue(), file);
p_targetImageID.issueWrite();
}
catch (std::exception& e) {
LERROR("Error : " << e.what());
......
......@@ -213,7 +213,6 @@ namespace campvis {
glPopAttrib();
data.addData(p_targetImageID.getValue(), new RenderData(_fbo));
p_targetImageID.issueWrite();
}
}
}
......
......@@ -93,11 +93,11 @@ namespace campvis {
//_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.connect(&_eepGenerator.p_sourceImageID);
_imageReader.p_targetImageID.connect(&_vmEepGenerator.p_sourceImageID);
_imageReader.p_targetImageID.connect(&_dvrVM.p_sourceImageID);
_imageReader.p_targetImageID.connect(&_dvrNormal.p_sourceImageID);
_imageReader.p_targetImageID.connect(&_pgGenerator.p_sourceImageID);
_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");
......@@ -112,7 +112,7 @@ namespace campvis {
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.connect(&_combine.p_mirrorRenderID);
_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);
......@@ -120,29 +120,29 @@ namespace campvis {
// 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.connect(static_cast<DataNameProperty*>(_vmEepGenerator.getProperty("maskID")));
_vmRenderer.p_renderTargetID.addSharedProperty(static_cast<DataNameProperty*>(_vmEepGenerator.getProperty("maskID")));
_renderTargetID.setValue("combine");
_pgGenerator.p_geometryID.connect(&_vmEepGenerator.p_geometryID);
_pgGenerator.p_geometryID.connect(&_eepGenerator.p_geometryID);
_vmgGenerator.p_mirrorID.connect(&_vmEepGenerator.p_mirrorID);
_vmgGenerator.p_mirrorID.connect(&_vmRenderer.p_geometryID);
_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.connect(&_dvrNormal.p_entryImageID);
_vmEepGenerator.p_entryImageID.connect(&_dvrVM.p_entryImageID);
_eepGenerator.p_entryImageID.addSharedProperty(&_dvrNormal.p_entryImageID);
_vmEepGenerator.p_entryImageID.addSharedProperty(&_dvrVM.p_entryImageID);
_eepGenerator.p_exitImageID.connect(&_dvrNormal.p_exitImageID);
_vmEepGenerator.p_exitImageID.connect(&_dvrVM.p_exitImageID);
_eepGenerator.p_exitImageID.addSharedProperty(&_dvrNormal.p_exitImageID);
_vmEepGenerator.p_exitImageID.addSharedProperty(&_dvrVM.p_exitImageID);
_dvrVM.p_targetImageID.connect(&_combine.p_mirrorImageID);
_dvrVM.p_targetImageID.addSharedProperty(&_combine.p_mirrorImageID);
_combine.p_targetImageID.setValue("combine");
_dvrNormal.p_targetImageID.connect(&_depthDarkening.p_inputImage);
_depthDarkening.p_outputImage.connect(&_combine.p_normalImageID);
_dvrNormal.p_targetImageID.addSharedProperty(&_depthDarkening.p_inputImage);
_depthDarkening.p_outputImage.addSharedProperty(&_combine.p_normalImageID);
}
void DVRVis::deinit() {
......
......@@ -102,31 +102,31 @@ namespace campvis {
// = CT Setup =====================================================================================
_ctReader.p_targetImageID.connect(&_ctProxy.p_sourceImageID);
_ctReader.p_targetImageID.connect(&_ctFullEEP.p_sourceImageID);
_ctReader.p_targetImageID.connect(&_ctClippedEEP.p_sourceImageID);
_ctReader.p_targetImageID.connect(&_ctDVR.p_sourceImageID);
_ctReader.p_targetImageID.connect(&_ctFullDRR.p_sourceImageID);
_ctReader.p_targetImageID.connect(&_ctClippedDRR.p_sourceImageID);
_ctReader.p_targetImageID.addSharedProperty(&_ctProxy.p_sourceImageID);
_ctReader.p_targetImageID.addSharedProperty(&_ctFullEEP.p_sourceImageID);
_ctReader.p_targetImageID.addSharedProperty(&_ctClippedEEP.p_sourceImageID);
_ctReader.p_targetImageID.addSharedProperty(&_ctDVR.p_sourceImageID);
_ctReader.p_targetImageID.addSharedProperty(&_ctFullDRR.p_sourceImageID);
_ctReader.p_targetImageID.addSharedProperty(&_ctClippedDRR.p_sourceImageID);
_ctReader.p_url.setValue("D:\\Medical Data\\XrayDepthPerception\\DataCowLeg\\Cowleg_CT_8007_003_5mm_STD_20110224\\Fantome_20110224_8007_003_6_1_ABD-_portalvens_X_S___5mm_STD.mhd");
_ctReader.p_targetImageID.setValue("ct.image");
_ctReader.s_validated.connect(this, &IxpvDemo::onProcessorValidated);
_ctProxy.p_geometryID.setValue("ct.proxy");
_ctProxy.p_geometryID.connect(&_ctFullEEP.p_geometryID);
_ctProxy.p_geometryID.connect(&_ctClippedEEP.p_geometryID);
_ctProxy.p_geometryID.addSharedProperty(&_ctFullEEP.p_geometryID);
_ctProxy.p_geometryID.addSharedProperty(&_ctClippedEEP.p_geometryID);
_ctFullEEP.p_entryImageID.setValue("ct.entry.full");
_ctFullEEP.p_entryImageID.connect(&_ctFullDRR.p_entryImageID);
_ctFullEEP.p_entryImageID.connect(&_ctDVR.p_entryImageID);
_ctFullEEP.p_entryImageID.addSharedProperty(&_ctFullDRR.p_entryImageID);
_ctFullEEP.p_entryImageID.addSharedProperty(&_ctDVR.p_entryImageID);
_ctFullEEP.p_exitImageID.setValue("ct.exit.full");
_ctFullEEP.p_exitImageID.connect(&_ctFullDRR.p_exitImageID);
_ctFullEEP.p_exitImageID.connect(&_ctDVR.p_exitImageID);
_ctFullEEP.p_exitImageID.addSharedProperty(&_ctFullDRR.p_exitImageID);
_ctFullEEP.p_exitImageID.addSharedProperty(&_ctDVR.p_exitImageID);
_ctClippedEEP.p_entryImageID.setValue("ct.entry.clipped");
_ctClippedEEP.p_entryImageID.connect(&_ctClippedDRR.p_entryImageID);
_ctClippedEEP.p_entryImageID.addSharedProperty(&_ctClippedDRR.p_entryImageID);
_ctClippedEEP.p_exitImageID.setValue("ct.exit.clipped");
_ctClippedEEP.p_exitImageID.connect(&_ctClippedDRR.p_exitImageID);
_ctClippedEEP.p_exitImageID.addSharedProperty(&_ctClippedDRR.p_exitImageID);
Geometry1DTransferFunction* tfDvr = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .08f));
// tf->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.5f, 1.f), tgt::col4(0, 0, 0, 0), tgt::col4(0, 0, 0, 180)));
......@@ -154,32 +154,32 @@ namespace campvis {
_usReader.s_validated.connect(this, &IxpvDemo::onProcessorValidated);
_usReader.p_url.setValue("D:\\Medical Data\\XrayDepthPerception\\DataCowLeg\\Ultrasound\\gaussianSmoothedUS_UChar.mhd");
_usReader.p_targetImageID.setValue("us.image");
_usReader.p_targetImageID.connect(&_usSliceRenderer.p_sourceImageID);
_usReader.p_targetImageID.addSharedProperty(&_usSliceRenderer.p_sourceImageID);
_usReader.p_imageOffset.setValue(tgt::vec3(-600.f, 80.f, -530.f));
_usReader.p_voxelSize.setValue(tgt::vec3(1.f, 1.f, 1.3f));
_usSliceRenderer.p_targetImageID.setValue("us.slice");
_usSliceRenderer.p_targetImageID.connect(&_ctClippedEEP.p_geometryImageId);
_usSliceRenderer.p_targetImageID.addSharedProperty(&_ctClippedEEP.p_geometryImageId);
_usSliceRenderer.p_sliceNumber.setValue(0);
// = Compositing Setup ============================================================================
_xrayReader.p_targetImageID.connect(&_compositor.p_firstImageId);
_ctFullDRR.p_targetImageID.connect(&_compositor.p_secondImageId);
_xrayReader.p_targetImageID.addSharedProperty(&_compositor.p_firstImageId);
_ctFullDRR.p_targetImageID.addSharedProperty(&_compositor.p_secondImageId);
_compositor.p_targetImageId.setValue("composed");
_compositor.p_compositingMethod.selectById("diff");
_ctDVR.p_targetImageID.connect(&_compositor2.p_firstImageId);
_usSliceRenderer.p_targetImageID.connect(&_compositor2.p_secondImageId);
_ctDVR.p_targetImageID.addSharedProperty(&_compositor2.p_firstImageId);
_usSliceRenderer.p_targetImageID.addSharedProperty(&_compositor2.p_secondImageId);
_compositor2.p_targetImageId.setValue("composed2");
_compositor2.p_compositingMethod.selectById("depth");
_xrayReader.p_targetImageID.connect(&_ixpvCompositor.p_xRayImageId);
_usSliceRenderer.p_targetImageID.connect(&_ixpvCompositor.p_3dSliceImageId);
_ctFullDRR.p_targetImageID.connect(&_ixpvCompositor.p_drrFullImageId);
_ctClippedDRR.p_targetImageID.connect(&_ixpvCompositor.p_drrClippedImageId);
_xrayReader.p_targetImageID.addSharedProperty(&_ixpvCompositor.p_xRayImageId);
_usSliceRenderer.p_targetImageID.addSharedProperty(&_ixpvCompositor.p_3dSliceImageId);
_ctFullDRR.p_targetImageID.addSharedProperty(&_ixpvCompositor.p_drrFullImageId);
_ctClippedDRR.p_targetImageID.addSharedProperty(&_ixpvCompositor.p_drrClippedImageId);
_ixpvCompositor.p_targetImageId.setValue("ixpv");
_renderTargetID.setValue("ixpv");
......
......@@ -61,9 +61,9 @@ namespace campvis {
_imageReader.p_url.setValue("D:\\Medical Data\\Dentalscan\\dental.mhd");
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.connect(&_gvg.p_sourceImageID);
_imageReader.p_targetImageID.connect(&_lhh.p_intensitiesId);
_imageReader.p_targetImageID.connect(&_sliceExtractor.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_gvg.p_sourceImageID);
_imageReader.p_targetImageID.addSharedProperty(&_lhh.p_intensitiesId);
_imageReader.p_targetImageID.addSharedProperty(&_sliceExtractor.p_sourceImageID);
_imageReader.s_validated.connect(this, &SliceVis::onProcessorValidated);
// _gvg._outputGradients.connect(&_lhh._inputGradients);
......
......@@ -67,7 +67,7 @@ namespace campvis {
_imageReader.p_url.setValue("D:\\Medical Data\\smallHeart.mhd");
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.connect(&_ve.p_inputVolume);
_imageReader.p_targetImageID.addSharedProperty(&_ve.p_inputVolume);
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.1f, .125f), tgt::col4(255, 0, 0, 32), tgt::col4(255, 0, 0, 32)));
......
......@@ -71,7 +71,7 @@ namespace campvis {
_imageReader.p_url.setValue("D:\\Medical Data\\smallHeart.mhd");
_imageReader.p_targetImageID.setValue("reader.output");
_imageReader.p_targetImageID.connect(&_vr.p_inputVolume);
_imageReader.p_targetImageID.addSharedProperty(&_vr.p_inputVolume);
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.1f, .125f), tgt::col4(255, 0, 0, 32), tgt::col4(255, 0, 0, 32)));
......
......@@ -147,7 +147,6 @@ namespace campvis {
LGL_ERROR;
data.addData(p_outputImage.getValue(), new RenderData(_fbo));
p_outputImage.issueWrite();
}
else {
LERROR("No suitable input image found.");
......
......@@ -70,7 +70,6 @@ namespace campvis {
LGL_ERROR;
data.addData(p_targetImageID.getValue(), new RenderData(_fbo));
p_targetImageID.issueWrite();
}
std::string DRRRaycaster::generateHeader() const {
......
......@@ -219,8 +219,6 @@ namespace campvis {
data.addData(p_entryImageID.getValue(), entrypoints);
data.addData(p_exitImageID.getValue(), exitpoints);
p_entryImageID.issueWrite();
p_exitImageID.issueWrite();
}
else {
LERROR("Input image must have dimensionality of 3.");
......
......@@ -115,7 +115,6 @@ namespace campvis {
LGL_ERROR;
data.addData(p_renderTargetID.getValue(), new RenderData(_fbo));
p_renderTargetID.issueWrite();
}
else {
LERROR("No suitable input geometry found.");
......
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