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

* fixed VolumeExplorer/VolumeRenderer not correctly updating the proxy...

* fixed VolumeExplorer/VolumeRenderer not correctly updating the proxy geometry due to missing locks and thus skipped invalidations
* adjusted VolumeExplorerDemo image URL
parent 7e1f1e13
......@@ -59,11 +59,7 @@ namespace campvis {
_ve.p_outputImage.setValue("combine");
_renderTargetID.setValue("combine");
//_imageReader.p_url.setValue("D:\\hiwi\\CAMPVis Datasets\\smallHeart.mhd");
//_imageReader.p_targetImageID.setValue("reader.output");
//_imageReader.p_targetImageID.addSharedProperty(&_ve.p_inputVolume);
_imageReader.setURL("D:\\hiwi\\CAMPVis Datasets\\smallHeart.mhd");
_imageReader.setURL(CAMPVIS_SOURCE_DIR "/modules/vis/sampledata/smallHeart.mhd");
_imageReader.setTargetImageId("reader.output");
_imageReader.setTargetImageIdSharedProperty(&_ve.p_inputVolume);
......
......@@ -121,20 +121,28 @@ namespace campvis {
void VolumeExplorer::process(DataContainer& data) {
// launch sub-renderers if necessary
if (getInvalidationLevel() & VR_INVALID) {
_raycaster.lockProcessor();
_raycaster.process(data);
_raycaster.unlockProcessor();
}
if (getInvalidationLevel() & SLICES_INVALID) {
_sliceExtractor.p_sliceOrientation.selectById("x");
_sliceExtractor.p_targetImageID.setValue(p_outputImage.getValue() + ".xSlice");
_sliceExtractor.lockProcessor();
_sliceExtractor.process(data);
_sliceExtractor.unlockProcessor();
_sliceExtractor.p_sliceOrientation.selectById("y");
_sliceExtractor.p_targetImageID.setValue(p_outputImage.getValue() + ".ySlice");
_sliceExtractor.lockProcessor();
_sliceExtractor.process(data);
_sliceExtractor.unlockProcessor();
_sliceExtractor.p_sliceOrientation.selectById("z");
_sliceExtractor.p_targetImageID.setValue(p_outputImage.getValue() + ".zSlice");
_sliceExtractor.lockProcessor();
_sliceExtractor.process(data);
_sliceExtractor.unlockProcessor();
}
// compose rendering
......
......@@ -118,16 +118,19 @@ namespace campvis {
void VolumeRenderer::process(DataContainer& data) {
if (getInvalidationLevel() & PG_INVALID) {
_pgGenerator.lockProcessor();
_pgGenerator.process(data);
_eepGenerator.process(data);
_raycaster.process(data);
_pgGenerator.unlockProcessor();
}
else if (getInvalidationLevel() & EEP_INVALID) {
if (getInvalidationLevel() & EEP_INVALID) {
_eepGenerator.lockProcessor();
_eepGenerator.process(data);
_raycaster.process(data);
_eepGenerator.unlockProcessor();
}
else if (getInvalidationLevel() & RAYCASTER_INVALID) {
if (getInvalidationLevel() & RAYCASTER_INVALID) {
_raycaster.lockProcessor();
_raycaster.process(data);
_raycaster.unlockProcessor();
}
validate(INVALID_RESULT | PG_INVALID | EEP_INVALID | RAYCASTER_INVALID);
......@@ -135,10 +138,10 @@ namespace campvis {
void VolumeRenderer::onProcessorInvalidated(AbstractProcessor* processor) {
if (processor == &_pgGenerator) {
invalidate(PG_INVALID);
invalidate(PG_INVALID | EEP_INVALID | RAYCASTER_INVALID);
}
else if (processor == &_eepGenerator) {
invalidate(EEP_INVALID);
invalidate(EEP_INVALID | RAYCASTER_INVALID);
}
else if (processor == &_raycaster) {
invalidate(RAYCASTER_INVALID);
......
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