]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuDrawAxisTree3D.h
#3262 creaMaracasVisu Feature New Normal - Export LookupTable fron ColorLayerImageV...
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuDrawAxisTree3D.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 #ifndef __bbcreaMaracasVisuDrawAxisTree3D_h_INCLUDED__
27 #define __bbcreaMaracasVisuDrawAxisTree3D_h_INCLUDED__
28 #include "bbtkAtomicBlackBox.h"
29 #include "iostream"
30
31 #include <vtkProp3D.h>
32 #include <vtkRenderer.h>
33 #include "vtkImageData.h"
34 #include "vtkActor.h"
35 #include "vtkPolyData.h"
36 #include "vtkPolyDataMapper.h"
37 #include "vtkPoints.h"
38 #include "vtkCellArray.h"
39 #include "vtkProperty.h"
40
41 namespace bbcreaMaracasVisu
42 {
43
44 class /*BBTK_EXPORT*/ DrawAxisTree3D
45  :
46    public bbtk::AtomicBlackBox
47 {
48   BBTK_BLACK_BOX_INTERFACE(DrawAxisTree3D,bbtk::AtomicBlackBox);
49   BBTK_DECLARE_INPUT(Renderer   , vtkRenderer*);
50   BBTK_DECLARE_INPUT(lstIndexs  , std::vector<int>);
51   BBTK_DECLARE_INPUT(lstPointX  , std::vector<double>);
52   BBTK_DECLARE_INPUT(lstPointY  , std::vector<double>);
53   BBTK_DECLARE_INPUT(lstPointZ  , std::vector<double>);
54   BBTK_DECLARE_INPUT(lstRadio   , std::vector<double>);
55   BBTK_DECLARE_INPUT(ColourLaw  , int );
56   BBTK_DECLARE_INPUT(Colour     , std::vector<double>);
57   BBTK_DECLARE_INPUT(Transform  , vtkLinearTransform *);
58   BBTK_DECLARE_INPUT(Opacity    , double);
59   BBTK_DECLARE_INPUT(LineWidth   , double);
60   BBTK_DECLARE_INPUT(iAxis, int );
61   BBTK_DECLARE_OUTPUT(OutAxis,vtkProp3D *);
62   BBTK_PROCESS(Process);
63   void Process();
64
65 private:
66
67     int oldLstSize;
68         std::vector<vtkPolyData*>       vecVtkPolyData;
69         std::vector<vtkPolyDataMapper*> vecVtkPolyDataMaper;
70         std::vector<vtkActor*>          vecVtkActors;
71
72         void DrawOneAxis(int iGeneral,int numPoints, int iAxis);
73 };
74
75 BBTK_BEGIN_DESCRIBE_BLACK_BOX(DrawAxisTree3D,bbtk::AtomicBlackBox);
76 BBTK_NAME("DrawAxisTree3D");
77 BBTK_AUTHOR("InfoTeam CREATIS-LRMN");
78 BBTK_DESCRIPTION("Draw Axis Tree 3D");
79 BBTK_CATEGORY("actor");
80   BBTK_INPUT(DrawAxisTree3D,Renderer,"Renderer",vtkRenderer*,"");
81   BBTK_INPUT(DrawAxisTree3D,lstIndexs,"Indexs",std::vector<int>,"");
82   BBTK_INPUT(DrawAxisTree3D,lstPointX,"lstPointX",std::vector<double>,"");
83   BBTK_INPUT(DrawAxisTree3D,lstPointY,"lstPointY",std::vector<double>,"");
84   BBTK_INPUT(DrawAxisTree3D,lstPointZ,"lstPointZ",std::vector<double>,"");
85   BBTK_INPUT(DrawAxisTree3D,lstRadio,"lstRadio",std::vector<double>,"");
86   BBTK_INPUT(DrawAxisTree3D,Colour,"Colour  R1 G1 B1 R2 G2 B2 ...  range[0..1]",std::vector<double>,"");
87   BBTK_INPUT(DrawAxisTree3D,ColourLaw,"ColorLaw 1(default) solid color, 2 color by segment (random if is necessary) , 3 color for each point",int,"");
88   BBTK_INPUT(DrawAxisTree3D,Transform,"vtkTransform", vtkLinearTransform *,"");
89   BBTK_INPUT(DrawAxisTree3D,Opacity,"Opacity",double,"");
90   BBTK_INPUT(DrawAxisTree3D,LineWidth,"LineWidth (default 0.5)",double,"");
91   BBTK_INPUT(DrawAxisTree3D,iAxis,"iAxis",int,"");
92   BBTK_OUTPUT(DrawAxisTree3D,OutAxis,"Axis[iAxis]",vtkProp3D *,"");
93 BBTK_END_DESCRIBE_BLACK_BOX(DrawAxisTree3D);
94 }
95 // EO namespace bbcreaMaracasVisu
96
97 #endif // __bbcreaMaracasVisuDrawAxisTree3D_h_INCLUDED__
98