]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuDrawAxisTree3D.h
4553148bc008744335f04329025365bd5c3785f5
[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
17
18 namespace bbcreaMaracasVisu
19 {
20
21 class /*BBTK_EXPORT*/ DrawAxisTree3D
22  : 
23    public bbtk::AtomicBlackBox
24 {
25   BBTK_BLACK_BOX_INTERFACE(DrawAxisTree3D,bbtk::AtomicBlackBox);
26 //==================================================================
27 /// User callback called in the box contructor
28 virtual void bbUserConstructor();
29 /// User callback called in the box copy constructor
30 virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
31 /// User callback called in the box destructor
32 virtual void bbUserDestructor();
33 //==================================================================
34   BBTK_DECLARE_INPUT(Renderer ,vtkRenderer*);
35   BBTK_DECLARE_INPUT(lstIndexs,std::vector<int>);
36   BBTK_DECLARE_INPUT(lstPointX,std::vector<double>);
37   BBTK_DECLARE_INPUT(lstPointY,std::vector<double>);
38   BBTK_DECLARE_INPUT(lstPointZ,std::vector<double>);
39   BBTK_DECLARE_INPUT(lstRadio ,std::vector<double>);
40   BBTK_DECLARE_INPUT(Colour   ,std::vector<double>);
41   BBTK_DECLARE_INPUT(Transform, vtkLinearTransform *);
42   BBTK_DECLARE_INPUT(iAxis, int );
43   BBTK_DECLARE_OUTPUT(OutAxis,vtkProp3D *);
44   BBTK_PROCESS(Process);
45   void Process();
46
47 private:
48
49         std::vector<vtkPolyData*>               vecVtkPolyData;
50         std::vector<vtkPolyDataMapper*> vecVtkPolyDataMaper;
51         std::vector<vtkActor*>                  vecVtkActors;
52
53         void DrawOneAxis(int iGeneral,int numPoints, int iAxis);
54 };
55
56 BBTK_BEGIN_DESCRIBE_BLACK_BOX(DrawAxisTree3D,bbtk::AtomicBlackBox);
57 BBTK_NAME("DrawAxisTree3D");
58 BBTK_AUTHOR("InfoTeam CREATIS-LRMN");
59 BBTK_DESCRIPTION("Draw Axis Tree 3D");
60 BBTK_CATEGORY("__CATEGORY__");
61 BBTK_INPUT(DrawAxisTree3D,Renderer,"Renderer",vtkRenderer*,"");
62 BBTK_INPUT(DrawAxisTree3D,lstIndexs,"Indexs",std::vector<int>,"");
63 BBTK_INPUT(DrawAxisTree3D,lstPointX,"lstPointX",std::vector<double>,"");
64 BBTK_INPUT(DrawAxisTree3D,lstPointY,"lstPointY",std::vector<double>,"");
65 BBTK_INPUT(DrawAxisTree3D,lstPointZ,"lstPointZ",std::vector<double>,"");
66 BBTK_INPUT(DrawAxisTree3D,lstRadio,"lstRadio",std::vector<double>,"");
67 BBTK_INPUT(DrawAxisTree3D,Colour,"Colour",std::vector<double>,"");
68 BBTK_INPUT(DrawAxisTree3D,Transform,"vtkTransform", vtkLinearTransform *,"");
69 BBTK_INPUT(DrawAxisTree3D,iAxis,"iAxis",int,"");
70 BBTK_OUTPUT(DrawAxisTree3D,OutAxis,"Axis[iAxis]",vtkProp3D *,"");
71 BBTK_END_DESCRIBE_BLACK_BOX(DrawAxisTree3D);
72 }
73 // EO namespace bbcreaMaracasVisu
74
75 #endif // __bbcreaMaracasVisuDrawAxisTree3D_h_INCLUDED__
76