]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuDrawAxe3D.h
a18b95615ca30bb3f10caf9666a0ddd741fed0df
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuDrawAxe3D.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 __bbcreaMaracasVisuDrawAxe3D_h_INCLUDED__
27 #define __bbcreaMaracasVisuDrawAxe3D_h_INCLUDED__
28 #include "bbtkAtomicBlackBox.h"
29 #include "iostream"
30
31
32 #include "vtkRenderer.h"
33 #include "vtkPolyData.h"
34 #include "vtkPolyDataMapper.h"
35 #include "vtkLinearTransform.h"
36
37 namespace bbcreaMaracasVisu
38 {
39
40 class /*BBTK_EXPORT*/ DrawAxe3D
41  : 
42    public bbtk::AtomicBlackBox
43 {
44   BBTK_BLACK_BOX_INTERFACE(DrawAxe3D,bbtk::AtomicBlackBox);
45   BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
46   BBTK_DECLARE_INPUT(lstPointX,std::vector<double>);
47   BBTK_DECLARE_INPUT(lstPointY,std::vector<double>);
48   BBTK_DECLARE_INPUT(lstPointZ,std::vector<double>);
49   BBTK_DECLARE_INPUT(Colour,std::vector<double>);
50   BBTK_DECLARE_INPUT(Transform, vtkLinearTransform *);
51   BBTK_DECLARE_OUTPUT(Out,vtkProp3D *);
52
53 //  BBTK_DECLARE_OUTPUT(Out,double);
54   BBTK_PROCESS(Process);
55   void Process();
56
57   private:
58     bool                firsttime;
59     vtkPolyData         *mallData;
60     vtkActor            *mvtkactor;
61     vtkPolyDataMapper   *polydatamapper;
62 };
63
64
65 BBTK_BEGIN_DESCRIBE_BLACK_BOX(DrawAxe3D,bbtk::AtomicBlackBox);
66 BBTK_NAME("DrawAxe3D");
67 BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
68 BBTK_DESCRIPTION("Draw a 3D axe in a vtk 3D Viewer");
69 BBTK_CATEGORY("actor");
70   BBTK_INPUT(DrawAxe3D,Renderer,"vtk Renderer 3D universe",vtkRenderer*,"");
71   BBTK_INPUT(DrawAxe3D,lstPointX,"list of point X",std::vector<double>,"");
72   BBTK_INPUT(DrawAxe3D,lstPointY,"list of point Y",std::vector<double>,"");
73   BBTK_INPUT(DrawAxe3D,lstPointZ,"list of point Z",std::vector<double>,"");
74   BBTK_INPUT(DrawAxe3D,Colour,"Color of the line R(0..1) G(0..1) B(0..1) ",std::vector<double>,"colour");
75   BBTK_INPUT(DrawAxe3D,Transform,"vtkTransform", vtkLinearTransform *,"");
76   BBTK_OUTPUT(DrawAxe3D,Out,"Actor",vtkProp3D*,"");
77 BBTK_END_DESCRIBE_BLACK_BOX(DrawAxe3D);
78 }
79 // EO namespace bbcreaMaracasVisu
80
81 #endif // __bbcreaMaracasVisuDrawAxe3D_h_INCLUDED__
82