From: Eduardo DAVILA Date: Thu, 10 Mar 2016 14:58:41 +0000 (+0100) Subject: 2886 BBTK Bug New Normal - Refresh vtk:VolumeRenderer box X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5ef20de28d80f6a2e34321fa000cf02914029365;p=bbtk.git 2886 BBTK Bug New Normal - Refresh vtk:VolumeRenderer box --- 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