]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuShowNPoints.h
#3525 ShowNPoints Actual Visu collection option
[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<double>       );
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<double>       );
74   BBTK_DECLARE_INPUT(InitLstPointsY     , std::vector<double>       );
75   BBTK_DECLARE_INPUT(InitLstPointsZ     , std::vector<double>       );
76   BBTK_DECLARE_INPUT(InitLstLabels      , std::vector<std::string>  );
77   BBTK_DECLARE_INPUT(InitLstIndexs      , std::vector<int>          );
78   BBTK_DECLARE_INPUT(Type, int );
79
80   BBTK_DECLARE_OUTPUT( lstPointsX       , std::vector<double>       );
81   BBTK_DECLARE_OUTPUT( lstPointsY       , std::vector<double>       );
82   BBTK_DECLARE_OUTPUT( lstPointsZ       , std::vector<double>       );
83   BBTK_DECLARE_OUTPUT( lstLabels        , std::vector<std::string>  );
84   BBTK_DECLARE_OUTPUT( lstIndexs        , std::vector<int>          );
85   BBTK_DECLARE_OUTPUT( lstSelectedIndexs, std::vector<int>          );
86   BBTK_DECLARE_OUTPUT( WidgetShowNPoints, WidgetShowNPoints*        );
87   BBTK_PROCESS(Process);
88   void Process();
89   BBTK_CREATE_WIDGET(CreateWidget);
90   void CreateWidget(wxWindow*);
91   double backOpacity;
92     
93 private:
94     bool                    firsttime;
95         WidgetShowNPointsBox    *mwxwidget;
96 };
97
98 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints,bbtk::WxBlackBox);
99   BBTK_NAME("ShowNPoints");
100   BBTK_AUTHOR("Eduardo DAVILA");
101   BBTK_DESCRIPTION("widget that shows N moints in 3D (vtkActors)");
102   BBTK_CATEGORY("widgetVtk");
103
104   BBTK_INPUT(ShowNPoints,In,"One Point",std::vector<double>,"");
105   BBTK_INPUT(ShowNPoints,Renderer,"Renderer",vtkRenderer*,"");
106   BBTK_INPUT(ShowNPoints,Image,"vktkImageData",vtkImageData*,"");
107   BBTK_INPUT(ShowNPoints,Colour,"Colour of the actor",std::vector<double>,"colour");
108   BBTK_INPUT(ShowNPoints,Opacity,"Opacity of the actor 0..1 (default 1)",double,"");
109   BBTK_INPUT(ShowNPoints,Radio,"Radio of the spheres 1..50 (default 10)",double,"");
110   BBTK_INPUT(ShowNPoints,InitLstPointsX,"Initial lst of points X",std::vector<double>,"");
111   BBTK_INPUT(ShowNPoints,InitLstPointsY,"Initial lst of points Y",std::vector<double>,"");
112   BBTK_INPUT(ShowNPoints,InitLstPointsZ,"Initial lst of points Z",std::vector<double>,"");
113   BBTK_INPUT(ShowNPoints,InitLstLabels,"Initial lst of labels",std::vector<std::string>,"");
114   BBTK_INPUT(ShowNPoints,InitLstIndexs,"Initial lst of indexs sizes",std::vector<int>,"");
115   BBTK_INPUT(ShowNPoints,Type,"Type of the widget. 0(default): N-points, 1:Just one point, 2:Add/DeleteAll points, 3:As 0 with out save/load option, 4 Multiple NPoints",int,"");
116
117   BBTK_OUTPUT(ShowNPoints , lstPointsX          , " list of points X "      , std::vector<double> ,""       );
118   BBTK_OUTPUT(ShowNPoints , lstPointsY          , " list of points Y "      , std::vector<double> ,""       );
119   BBTK_OUTPUT(ShowNPoints , lstPointsZ          , " list of points Z "      , std::vector<double> ,""       );
120   BBTK_OUTPUT(ShowNPoints , lstLabels           , " list of labels "        , std::vector<std::string> ,""  );
121   BBTK_OUTPUT(ShowNPoints , lstIndexs           , " list of index sizes "   , std::vector<int> ,""          );
122   BBTK_OUTPUT(ShowNPoints , lstSelectedIndexs   , " list of points Z "      , std::vector<int> ,""          );
123   BBTK_OUTPUT(ShowNPoints , WidgetShowNPoints   , " WidgetShowNPoints "     , WidgetShowNPoints* ,""        );
124
125 BBTK_END_DESCRIBE_BLACK_BOX(ShowNPoints);
126 }
127 // EO namespace bbcreaMaracasVisu
128
129 #endif // __bbcreaMaracasVisuShowNPoints_h_INCLUDED__
130 #endif // _USE_WXWIDGETS_