]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuDrawAxe3D.h
#2482 creaMaracasVisu Bug New High - ColorLayer refresh missing. The MPR is not...
[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(Opacity,double);
51   BBTK_DECLARE_INPUT(Transform, vtkLinearTransform *);
52   BBTK_DECLARE_OUTPUT(Out,vtkProp3D *);
53
54 //  BBTK_DECLARE_OUTPUT(Out,double);
55   BBTK_PROCESS(Process);
56   void Process();
57
58   private:
59     bool                firsttime;
60     vtkPolyData         *mallData;
61     vtkActor            *mvtkactor;
62     vtkPolyDataMapper   *polydatamapper;
63 };
64
65
66 BBTK_BEGIN_DESCRIBE_BLACK_BOX(DrawAxe3D,bbtk::AtomicBlackBox);
67 BBTK_NAME("DrawAxe3D");
68 BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
69 BBTK_DESCRIPTION("Draw a 3D axe in a vtk 3D Viewer");
70 BBTK_CATEGORY("actor");
71   BBTK_INPUT(DrawAxe3D,Renderer,"vtk Renderer 3D universe",vtkRenderer*,"");
72   BBTK_INPUT(DrawAxe3D,lstPointX,"list of point X",std::vector<double>,"");
73   BBTK_INPUT(DrawAxe3D,lstPointY,"list of point Y",std::vector<double>,"");
74   BBTK_INPUT(DrawAxe3D,lstPointZ,"list of point Z",std::vector<double>,"");
75   BBTK_INPUT(DrawAxe3D,Colour,"Color of the line R(0..1) G(0..1) B(0..1) ",std::vector<double>,"colour");
76   BBTK_INPUT(DrawAxe3D,Opacity,"Axe opacity property ",double,"intensity");
77   BBTK_INPUT(DrawAxe3D,Transform,"vtkTransform", vtkLinearTransform *,"");
78   BBTK_OUTPUT(DrawAxe3D,Out,"Actor",vtkProp3D*,"");
79 BBTK_END_DESCRIBE_BLACK_BOX(DrawAxe3D);
80 }
81 // EO namespace bbcreaMaracasVisu
82
83 #endif // __bbcreaMaracasVisuDrawAxe3D_h_INCLUDED__
84