]> Creatis software - creaMaracasVisu.git/commitdiff
Feature #1630 Added a default radio (1 everywhere) for Tube Filter.
authorClaire Mouton <Claire.Mouton@creatis.insa-lyon.fr>
Mon, 1 Oct 2012 12:03:28 +0000 (12:03 +0000)
committerClaire Mouton <Claire.Mouton@creatis.insa-lyon.fr>
Mon, 1 Oct 2012 12:03:28 +0000 (12:03 +0000)
bbtk/src/bbcreaMaracasVisuTubeFilter.cxx
bbtk/src/bbcreaMaracasVisuTubeFilter.h

index 3a284d1b4cfdc7d62363ddc5c1b4c0c77374931f..56f418faae8e9f7faa1dbc8e93d7fe94047229b4 100644 (file)
@@ -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<double> 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);
-       
-       
 }
        
 //===== 
index 993f10f8b74fc458749f77ec9e5aacf3800c5527..3b1a9247f4798d2397a6480c5459b056b02fd660 100644 (file)
@@ -58,7 +58,7 @@ class bbcreaMaracasVisu_EXPORT TubeFilter
        BBTK_DECLARE_INPUT(lstPointY,std::vector<double>);
        BBTK_DECLARE_INPUT(lstPointZ,std::vector<double>);
        BBTK_DECLARE_INPUT(lstRadio ,std::vector<double>);
-    BBTK_DECLARE_INPUT(Opacity,double);
+       BBTK_DECLARE_INPUT(Opacity,double);
        BBTK_DECLARE_INPUT(Colour   ,std::vector<double>);
        BBTK_DECLARE_INPUT(Transform, vtkLinearTransform *);
 
@@ -82,7 +82,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(TubeFilter,bbtk::AtomicBlackBox);
        BBTK_INPUT(TubeFilter,lstPointX,"lstPointX",std::vector<double>,"");
        BBTK_INPUT(TubeFilter,lstPointY,"lstPointY",std::vector<double>,"");
        BBTK_INPUT(TubeFilter,lstPointZ,"lstPointZ",std::vector<double>,"");
-       BBTK_INPUT(TubeFilter,lstRadio,"lstRadio",std::vector<double>,"");
+       BBTK_INPUT(TubeFilter,lstRadio,"lstRadio. Default value is 1 everywhere.",std::vector<double>,"");
        BBTK_INPUT(TubeFilter,Colour,"Colour",std::vector<double>,"");
        BBTK_INPUT(TubeFilter,Transform,"vtkTransform", vtkLinearTransform *,"");
        BBTK_INPUT(TubeFilter,Opacity,"Opacity",double,"");