From 5ef20de28d80f6a2e34321fa000cf02914029365 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 10 Mar 2016 15:58:41 +0100 Subject: [PATCH] 2886 BBTK Bug New Normal - Refresh vtk:VolumeRenderer box --- packages/vtk/src/bbvtkVolumeRenderer.cxx | 56 ++++++++++++------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/packages/vtk/src/bbvtkVolumeRenderer.cxx b/packages/vtk/src/bbvtkVolumeRenderer.cxx index dcf9f4c..a804e15 100644 --- a/packages/vtk/src/bbvtkVolumeRenderer.cxx +++ b/packages/vtk/src/bbvtkVolumeRenderer.cxx @@ -121,41 +121,43 @@ namespace bbvtk } //--------------------------------------------------------------------- - void VolumeRenderer::Process() - { - bool changed = false; - if ( bbGetInputStatus("In") != bbtk::UPTODATE ) - { - mMapper->SetInput( bbGetInputIn() ); - changed = true; - } - - if ( ( bbGetInputStatus("ColorFunction") != bbtk::UPTODATE ) && +void VolumeRenderer::Process() +{ + bool changed = false; + if ( bbGetInputStatus("In") != bbtk::UPTODATE ) + { + mMapper->SetInput( bbGetInputIn() ); + changed = true; + } + + if ( ( bbGetInputStatus("ColorFunction") != bbtk::UPTODATE ) && ( bbGetInputColorFunction() != 0 ) ) - { - mVolume->GetProperty()->SetColor( bbGetInputColorFunction() ); - changed = true; - } + { + mVolume->GetProperty()->SetColor( bbGetInputColorFunction() ); + changed = true; + } if ( ( bbGetInputStatus("ColorFunction1") != bbtk::UPTODATE ) && ( bbGetInputColorFunction1() != 0 ) ) - { - mVolume->GetProperty()->SetColor( bbGetInputColorFunction1() ); - changed = true; - } + { + mVolume->GetProperty()->SetColor( bbGetInputColorFunction1() ); + changed = true; + } if ( ( bbGetInputStatus("OpacityFunction") != bbtk::UPTODATE ) && ( bbGetInputOpacityFunction() != 0 ) ) - { - mVolume->GetProperty()->SetScalarOpacity(bbGetInputOpacityFunction()); - changed = true; - } - - if (changed) mMapper->Update(); + { + mVolume->GetProperty()->SetScalarOpacity(bbGetInputOpacityFunction()); + changed = true; + } + + if (changed) + { + mMapper->Update(); + } + bbSetOutputOut(mVolume); +} - bbSetOutputOut(mVolume); - - } }//namespace bbtk -- 2.47.1