]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuShowNPoints.h
46ff3ec2424b6be3a5742cd281ed47155804a875
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuShowNPoints.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 #ifdef _USE_WXWIDGETS_
27 #ifndef __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
28 #define __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
29 #include "bbtkWxBlackBox.h"
30
31
32 #include "vtkImageData.h"
33
34 #include "WidgetShowNPoints.h"
35
36 namespace bbcreaMaracasVisu
37 {
38
39
40 //--------------------------------------------------------------------------
41 //--------------------------------------------------------------------------
42 //--------------------------------------------------------------------------
43 //--------------------------------------------------------------------------
44 //--------------------------------------------------------------------------
45
46 class ShowNPoints;
47
48 class WidgetShowNPointsBox : public WidgetShowNPoints
49 {
50 public:
51         WidgetShowNPointsBox( wxWindow *parent,  ShowNPoints *box, int type);
52         ~WidgetShowNPointsBox(); 
53         void UpdatePoints(wxCommandEvent &event);
54 private:
55         void                                            SetOutputBox();
56         ShowNPoints                                     *mbbShowNPoints;
57 };
58
59
60
61
62 class /*BBTK_EXPORT*/ ShowNPoints
63  : 
64    public bbtk::WxBlackBox
65 {
66   BBTK_BLACK_BOX_INTERFACE(ShowNPoints,bbtk::WxBlackBox);
67   BBTK_DECLARE_INPUT(In, std::vector<int> );
68   BBTK_DECLARE_INPUT(Renderer, vtkRenderer* );
69   BBTK_DECLARE_INPUT(Image, vtkImageData* );
70   BBTK_DECLARE_INPUT(Colour, std::vector<double> );
71   BBTK_DECLARE_INPUT(Opacity, double );
72   BBTK_DECLARE_INPUT(Radio, double );
73   BBTK_DECLARE_INPUT(InitLstPointsX, std::vector<int> );
74   BBTK_DECLARE_INPUT(InitLstPointsY, std::vector<int> );
75   BBTK_DECLARE_INPUT(InitLstPointsZ, std::vector<int> );
76   BBTK_DECLARE_INPUT(InitLstLabels, std::vector<std::string> );
77   BBTK_DECLARE_INPUT(Type, int );
78
79   BBTK_DECLARE_OUTPUT( lstPointsX, std::vector<int> );
80   BBTK_DECLARE_OUTPUT( lstPointsY, std::vector<int> );
81   BBTK_DECLARE_OUTPUT( lstPointsZ, std::vector<int> );
82   BBTK_DECLARE_OUTPUT( lstLabels,  std::vector<std::string> );
83   BBTK_DECLARE_OUTPUT( WidgetShowNPoints,  WidgetShowNPoints*);
84   BBTK_PROCESS(Process);
85   void Process();
86   BBTK_CREATE_WIDGET(CreateWidget);
87   void CreateWidget(wxWindow*);
88
89 private:
90         WidgetShowNPointsBox *mwxwidget; 
91 };
92
93 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints,bbtk::WxBlackBox);
94   BBTK_NAME("ShowNPoints");
95   BBTK_AUTHOR("Eduardo DAVILA");
96   BBTK_DESCRIPTION("widget that shows N moints in 3D (vtkActors)");
97   BBTK_CATEGORY("widgetVtk");
98
99   BBTK_INPUT(ShowNPoints,In,"One Point",std::vector<int>,"");
100   BBTK_INPUT(ShowNPoints,Renderer,"Renderer",vtkRenderer*,"");
101   BBTK_INPUT(ShowNPoints,Image,"vktkImageData",vtkImageData*,"");
102   BBTK_INPUT(ShowNPoints,Colour,"Colour of the actor",std::vector<double>,"colour");
103   BBTK_INPUT(ShowNPoints,Opacity,"Opacity of the actor 0..1 (default 1)",double,"");
104   BBTK_INPUT(ShowNPoints,Radio,"Radio of the spheres 1..50 (default 10)",double,"");
105   BBTK_INPUT(ShowNPoints,InitLstPointsX,"Initial lst of points X",std::vector<int>,"");
106   BBTK_INPUT(ShowNPoints,InitLstPointsY,"Initial lst of points Y",std::vector<int>,"");
107   BBTK_INPUT(ShowNPoints,InitLstPointsZ,"Initial lst of points Z",std::vector<int>,"");
108   BBTK_INPUT(ShowNPoints,InitLstLabels,"Initial lst of labels",std::vector<std::string>,"");
109   BBTK_INPUT(ShowNPoints,Type,"Type of the widget. 0(default): N-points, 1:Just one point",int,"");
110
111   BBTK_OUTPUT(ShowNPoints , lstPointsX , " list of points X ", std::vector<int> ,"");
112   BBTK_OUTPUT(ShowNPoints , lstPointsY , " list of points Y ", std::vector<int> ,"");
113   BBTK_OUTPUT(ShowNPoints , lstPointsZ , " list of points Z ", std::vector<int> ,"");
114   BBTK_OUTPUT(ShowNPoints , lstLabels , " list of labels ", std::vector<std::string> ,"");
115   BBTK_OUTPUT(ShowNPoints , WidgetShowNPoints , " WidgetShowNPoints ", WidgetShowNPoints* ,"");
116
117 BBTK_END_DESCRIBE_BLACK_BOX(ShowNPoints);
118 }
119 // EO namespace bbcreaMaracasVisu
120
121 #endif // __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
122 #endif // _USE_WXWIDGETS_