From: Claire Mouton Date: Mon, 1 Oct 2012 12:03:28 +0000 (+0000) Subject: Feature #1630 Added a default radio (1 everywhere) for Tube Filter. X-Git-Tag: v1.0.4~1 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=76e2ec73c0cbddf9c9d55af7e36bc2a6a67f6fb8;p=creaMaracasVisu.git Feature #1630 Added a default radio (1 everywhere) for Tube Filter. --- diff --git a/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx b/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx index 3a284d1..56f418f 100644 --- a/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx +++ b/bbtk/src/bbcreaMaracasVisuTubeFilter.cxx @@ -218,6 +218,14 @@ void TubeFilter::Process() tubefilter = new MaracasTubeFilter(); tubefilter->SetvtkRenderer( bbGetInputRenderer() ); tubefilter->SetlstPoints( bbGetInputlstPointX(), bbGetInputlstPointY(), bbGetInputlstPointZ() ); + + // Sets the default value for radius to 1 everywhere, if the radius input vevctor is empty. + if (bbGetInputlstRadio().size() == 0) + { + std::vector radio; + radio.resize(bbGetInputlstPointX().size(), 1.); + bbSetInputlstRadio(radio); + } tubefilter->SetlstRadius( bbGetInputlstRadio() ); tubefilter->SetOpacity( bbGetInputOpacity() ); tubefilter->SetTransform( bbGetInputTransform() ); @@ -243,8 +251,6 @@ void TubeFilter::bbUserSetDefaultValues() colour.push_back(0.0); colour.push_back(0.0); bbSetInputColour(colour); - - } //===== diff --git a/bbtk/src/bbcreaMaracasVisuTubeFilter.h b/bbtk/src/bbcreaMaracasVisuTubeFilter.h index 993f10f..3b1a924 100644 --- a/bbtk/src/bbcreaMaracasVisuTubeFilter.h +++ b/bbtk/src/bbcreaMaracasVisuTubeFilter.h @@ -58,7 +58,7 @@ class bbcreaMaracasVisu_EXPORT TubeFilter BBTK_DECLARE_INPUT(lstPointY,std::vector); BBTK_DECLARE_INPUT(lstPointZ,std::vector); BBTK_DECLARE_INPUT(lstRadio ,std::vector); - BBTK_DECLARE_INPUT(Opacity,double); + BBTK_DECLARE_INPUT(Opacity,double); BBTK_DECLARE_INPUT(Colour ,std::vector); BBTK_DECLARE_INPUT(Transform, vtkLinearTransform *); @@ -82,7 +82,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(TubeFilter,bbtk::AtomicBlackBox); BBTK_INPUT(TubeFilter,lstPointX,"lstPointX",std::vector,""); BBTK_INPUT(TubeFilter,lstPointY,"lstPointY",std::vector,""); BBTK_INPUT(TubeFilter,lstPointZ,"lstPointZ",std::vector,""); - BBTK_INPUT(TubeFilter,lstRadio,"lstRadio",std::vector,""); + BBTK_INPUT(TubeFilter,lstRadio,"lstRadio. Default value is 1 everywhere.",std::vector,""); BBTK_INPUT(TubeFilter,Colour,"Colour",std::vector,""); BBTK_INPUT(TubeFilter,Transform,"vtkTransform", vtkLinearTransform *,""); BBTK_INPUT(TubeFilter,Opacity,"Opacity",double,"");