]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuDrawAxisTree3D.h
af211982f14d3156d72a507219eacdac85d2e74a
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuDrawAxisTree3D.h
1 #ifndef __bbcreaMaracasVisuDrawAxisTree3D_h_INCLUDED__
2 #define __bbcreaMaracasVisuDrawAxisTree3D_h_INCLUDED__
3 #include "bbtkAtomicBlackBox.h"
4 #include "iostream"
5
6 #include <vtkProp3D.h>
7 #include <vtkRenderer.h>
8 #include "vtkImageData.h"
9 #include "vtkActor.h"
10 #include "vtkPolyData.h"
11 #include "vtkPolyDataMapper.h"
12 #include "vtkPoints.h"
13 #include "vtkCellArray.h"
14 #include "vtkProperty.h"
15
16 namespace bbcreaMaracasVisu
17 {
18
19 class /*BBTK_EXPORT*/ DrawAxisTree3D
20  :
21    public bbtk::AtomicBlackBox
22 {
23   BBTK_BLACK_BOX_INTERFACE(DrawAxisTree3D,bbtk::AtomicBlackBox);
24   BBTK_DECLARE_INPUT(Renderer   , vtkRenderer*);
25   BBTK_DECLARE_INPUT(lstIndexs  , std::vector<int>);
26   BBTK_DECLARE_INPUT(lstPointX  , std::vector<double>);
27   BBTK_DECLARE_INPUT(lstPointY  , std::vector<double>);
28   BBTK_DECLARE_INPUT(lstPointZ  , std::vector<double>);
29   BBTK_DECLARE_INPUT(lstRadio   , std::vector<double>);
30   BBTK_DECLARE_INPUT(ColourLaw  , int );
31   BBTK_DECLARE_INPUT(Colour     , std::vector<double>);
32   BBTK_DECLARE_INPUT(Transform  , vtkLinearTransform *);
33   BBTK_DECLARE_INPUT(Opacity    , double);
34   BBTK_DECLARE_INPUT(iAxis, int );
35   BBTK_DECLARE_OUTPUT(OutAxis,vtkProp3D *);
36   BBTK_PROCESS(Process);
37   void Process();
38
39 private:
40
41     int oldLstSize;
42         std::vector<vtkPolyData*>       vecVtkPolyData;
43         std::vector<vtkPolyDataMapper*> vecVtkPolyDataMaper;
44         std::vector<vtkActor*>          vecVtkActors;
45
46         void DrawOneAxis(int iGeneral,int numPoints, int iAxis);
47 };
48
49 BBTK_BEGIN_DESCRIBE_BLACK_BOX(DrawAxisTree3D,bbtk::AtomicBlackBox);
50 BBTK_NAME("DrawAxisTree3D");
51 BBTK_AUTHOR("InfoTeam CREATIS-LRMN");
52 BBTK_DESCRIPTION("Draw Axis Tree 3D");
53 BBTK_CATEGORY("actor");
54   BBTK_INPUT(DrawAxisTree3D,Renderer,"Renderer",vtkRenderer*,"");
55   BBTK_INPUT(DrawAxisTree3D,lstIndexs,"Indexs",std::vector<int>,"");
56   BBTK_INPUT(DrawAxisTree3D,lstPointX,"lstPointX",std::vector<double>,"");
57   BBTK_INPUT(DrawAxisTree3D,lstPointY,"lstPointY",std::vector<double>,"");
58   BBTK_INPUT(DrawAxisTree3D,lstPointZ,"lstPointZ",std::vector<double>,"");
59   BBTK_INPUT(DrawAxisTree3D,lstRadio,"lstRadio",std::vector<double>,"");
60   BBTK_INPUT(DrawAxisTree3D,Colour,"Colour",std::vector<double>,"");
61   BBTK_INPUT(DrawAxisTree3D,Opacity,"Opacity",double,"");
62   BBTK_INPUT(DrawAxisTree3D,ColourLaw,"ColorLaw 1(default) solid color, 2 color by segment, 3 color for each point",int,"");
63   BBTK_INPUT(DrawAxisTree3D,Transform,"vtkTransform", vtkLinearTransform *,"");
64   BBTK_INPUT(DrawAxisTree3D,iAxis,"iAxis",int,"");
65   BBTK_OUTPUT(DrawAxisTree3D,OutAxis,"Axis[iAxis]",vtkProp3D *,"");
66 BBTK_END_DESCRIBE_BLACK_BOX(DrawAxisTree3D);
67 }
68 // EO namespace bbcreaMaracasVisu
69
70 #endif // __bbcreaMaracasVisuDrawAxisTree3D_h_INCLUDED__
71