]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbcreaMaracasVisuTubeFilter.h
e69a630626310c8885524a9f031716eab6877d34
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuTubeFilter.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 //=====
27 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
28 //=====
29 #ifndef __bbcreaMaracasVisuTubeFilter_h_INCLUDED__
30 #define __bbcreaMaracasVisuTubeFilter_h_INCLUDED__
31 #include "bbcreaMaracasVisu_EXPORT.h"
32 #include "bbtkAtomicBlackBox.h"
33 #include "iostream"
34
35 #include <vtkProp3D.h>
36 #include <vtkRenderer.h>
37 #include <vtkTransform.h>
38 #include <vtkActor.h>
39 #include <vtkLinearTransform.h>
40 #include <vtkSmartPointer.h>
41
42 namespace bbcreaMaracasVisu
43 {
44
45         class MaracasTubeFilter
46         {
47         public:
48                 MaracasTubeFilter();
49                 ~MaracasTubeFilter();
50
51                 void SetvtkRenderer( vtkRenderer *render);
52                 void SetlstPoints( std::vector<double> lstPointX , std::vector<double> lstPointY , std::vector<double> lstPointZ );
53                 void SetlstRadius( std::vector<double> lstRadius  );
54                 void SetlstColour( std::vector<double> lstColour  );
55                 void SetOpacity(double opacity);
56                 void SetTransform( vtkLinearTransform* transform  );
57                 vtkActor *GetActor();
58                 void Run();
59
60                 vtkRenderer *renderer;
61                 vtkSmartPointer<vtkActor> actor;
62
63                 double opacity;
64                 vtkLinearTransform *transform;
65                 std::vector<double> lstPointX;
66                 std::vector<double> lstPointY;
67                 std::vector<double> lstPointZ;
68                 std::vector<double> lstRadius;
69                 std::vector<double> lstColour;
70
71         };
72
73 class bbcreaMaracasVisu_EXPORT TubeFilter
74  :
75    public bbtk::AtomicBlackBox
76 {
77   BBTK_BLACK_BOX_INTERFACE(TubeFilter,bbtk::AtomicBlackBox);
78 //=====
79 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
80 //=====
81         BBTK_DECLARE_INPUT(Renderer ,vtkRenderer*);
82         BBTK_DECLARE_INPUT(lstPointX,std::vector<double>);
83         BBTK_DECLARE_INPUT(lstPointY,std::vector<double>);
84         BBTK_DECLARE_INPUT(lstPointZ,std::vector<double>);
85         BBTK_DECLARE_INPUT(lstRadio ,std::vector<double>);
86         BBTK_DECLARE_INPUT(Opacity,double);
87         BBTK_DECLARE_INPUT(Colour   ,std::vector<double>);
88         BBTK_DECLARE_INPUT(Transform, vtkLinearTransform *);
89
90         BBTK_DECLARE_OUTPUT(OutAxis,vtkProp3D *);
91   BBTK_PROCESS(Process);
92   void Process();
93
94         MaracasTubeFilter *tubefilter;
95
96 //=====
97 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
98 //=====
99 };
100
101 BBTK_BEGIN_DESCRIBE_BLACK_BOX(TubeFilter,bbtk::AtomicBlackBox);
102     BBTK_NAME("TubeFilter");
103     BBTK_AUTHOR("Info-Dev");
104     BBTK_DESCRIPTION("vtk Tube Filter");
105         BBTK_CATEGORY("actor");
106         BBTK_INPUT(TubeFilter,Renderer,"Renderer",vtkRenderer*,"");
107         BBTK_INPUT(TubeFilter,lstPointX,"lstPointX",std::vector<double>,"");
108         BBTK_INPUT(TubeFilter,lstPointY,"lstPointY",std::vector<double>,"");
109         BBTK_INPUT(TubeFilter,lstPointZ,"lstPointZ",std::vector<double>,"");
110         BBTK_INPUT(TubeFilter,lstRadio,"lstRadio. Default value is 1 everywhere.",std::vector<double>,"");
111         BBTK_INPUT(TubeFilter,Colour,"Colour",std::vector<double>,"");
112         BBTK_INPUT(TubeFilter,Transform,"vtkTransform", vtkLinearTransform *,"");
113         BBTK_INPUT(TubeFilter,Opacity,"Opacity",double,"");
114         BBTK_OUTPUT(TubeFilter,OutAxis,"Tube Actor",vtkProp3D *,"");
115 BBTK_END_DESCRIBE_BLACK_BOX(TubeFilter);
116 //=====
117 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
118 //=====
119 }
120 // EO namespace bbcreaMaracasVisu
121
122 #endif // __bbcreaMaracasVisuTubeFilter_h_INCLUDED__
123