]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuContourCrown.h
#3262 creaMaracasVisu Feature New Normal - Export LookupTable fron ColorLayerImageV...
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuContourCrown.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 __bbcreaMaracasVisuContourCrown_h_INCLUDED__
28 #define __bbcreaMaracasVisuContourCrown_h_INCLUDED__
29 #include "bbtkWxBlackBox.h"
30
31 #include <vtkImageData.h>
32
33 #include "Contour/ContourCrownWidget.h"
34
35 namespace bbcreaMaracasVisu
36 {
37
38 class /*BBTK_EXPORT*/ ContourCrown
39  : 
40    public bbtk::WxBlackBox
41 {
42   BBTK_BLACK_BOX_INTERFACE(ContourCrown,bbtk::WxBlackBox);
43     BBTK_DECLARE_INPUT(In, vtkImageData*);
44     BBTK_DECLARE_INPUT(wxVtkBaseView, wxVtkBaseView*);
45 //JSTG 26-02-08 -------------------------------------------------------
46     BBTK_DECLARE_INPUT(ControlPointsInX,std::vector<double>*);
47         BBTK_DECLARE_INPUT(ControlPointsInY,std::vector<double>*);
48         BBTK_DECLARE_INPUT(ControlPointsInZ,std::vector<double>*);
49 //---------------------------------------------------------------------
50         BBTK_DECLARE_OUTPUT(LstValue,std::vector<double>*);
51         BBTK_DECLARE_OUTPUT(LstValuePosX,std::vector<double>*);
52         BBTK_DECLARE_OUTPUT(LstValuePosY,std::vector<double>*);
53         BBTK_DECLARE_OUTPUT(LstValuePosZ,std::vector<double>*);
54         BBTK_DECLARE_OUTPUT(LstContourX,std::vector<double>*);
55         BBTK_DECLARE_OUTPUT(LstContourY,std::vector<double>*);
56         BBTK_DECLARE_OUTPUT(LstContourZ,std::vector<double>*);
57         BBTK_DECLARE_OUTPUT(LstContourCrlX,std::vector<double>*);
58         BBTK_DECLARE_OUTPUT(LstContourCrlY,std::vector<double>*);
59         BBTK_DECLARE_OUTPUT(LstContourCrlZ,std::vector<double>*);
60         BBTK_DECLARE_OUTPUT(ImageValueResult,vtkImageData*);
61         BBTK_DECLARE_OUTPUT(ImageMaskResult,vtkImageData*);
62   BBTK_PROCESS(Process);
63   void Process();
64   BBTK_CREATE_WIDGET(CreateWidget);
65   void CreateWidget(wxWindow*);
66
67 private:
68         bool                                    firsttime;
69         wxMaracasCoutourTool    *mwxwidget;
70         std::vector<double>             LstValue;
71         std::vector<double>             LstValuePosX;
72         std::vector<double>             LstValuePosY;
73         std::vector<double>             LstValuePosZ;
74         std::vector<double>             LstContourX;
75         std::vector<double>             LstContourY;
76         std::vector<double>             LstContourZ;
77         std::vector<double>             LstContourCrlX;
78         std::vector<double>             LstContourCrlY;
79         std::vector<double>             LstContourCrlZ;
80 };
81
82 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ContourCrown,bbtk::WxBlackBox);
83 BBTK_NAME("ContourCrown");
84 BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
85 BBTK_DESCRIPTION("Contour crown tool");
86     BBTK_CATEGORY("specific_appli");
87         BBTK_INPUT(ContourCrown,In,"Input Image", vtkImageData *,"" );
88         BBTK_INPUT(ContourCrown,wxVtkBaseView,"maracas visu wxVtkBaseView",wxVtkBaseView*,"");
89 //JSTG 26-02-08 ---------------------------------------------------------------------------------------------------------
90         BBTK_INPUT(ContourCrown,ControlPointsInX,"Control Points X Coords ",std::vector<double>*,"");
91         BBTK_INPUT(ContourCrown,ControlPointsInY,"Control Points Y Coords ",std::vector<double>*,"");
92         BBTK_INPUT(ContourCrown,ControlPointsInZ,"Control Points Z Coords ",std::vector<double>*,"");
93 //-----------------------------------------------------------------------------------------------------------------------
94         BBTK_OUTPUT(ContourCrown,LstValue          , "Pixel values"                                                             ,       std::vector<double>*,"");
95         BBTK_OUTPUT(ContourCrown,LstValuePosX  , "Positions X of the values"                                    ,       std::vector<double>*,"");
96         BBTK_OUTPUT(ContourCrown,LstValuePosY  , "Positions Y of the values"                                    ,       std::vector<double>*,"");
97         BBTK_OUTPUT(ContourCrown,LstValuePosZ  , "Positions Z of the values"                                    ,       std::vector<double>*,"");
98         BBTK_OUTPUT(ContourCrown,LstContourX   , "Positions X of the contours"                          ,       std::vector<double>*,"");
99         BBTK_OUTPUT(ContourCrown,LstContourY   , "Positions Y of the contours"                          ,       std::vector<double>*,"");
100         BBTK_OUTPUT(ContourCrown,LstContourZ   , "Positions Z of the contours"                          ,       std::vector<double>*,"");
101         BBTK_OUTPUT(ContourCrown,LstContourCrlX, "Positions X of the contour control points"    ,       std::vector<double>*,"");
102         BBTK_OUTPUT(ContourCrown,LstContourCrlY, "Positions Y of the contour control points"    ,       std::vector<double>*,"");
103         BBTK_OUTPUT(ContourCrown,LstContourCrlZ, "Positions Z of the contour control points"    ,       std::vector<double>*,"");
104         BBTK_OUTPUT(ContourCrown,ImageValueResult, "vtkImagedata with the values"       ,       vtkImageData *,"" );
105         BBTK_OUTPUT(ContourCrown,ImageMaskResult, "vtkImagedata with the mask"  ,       vtkImageData *,"" );
106 BBTK_END_DESCRIBE_BLACK_BOX(ContourCrown);
107 }
108 // EO namespace bbcreaMaracasVisu
109
110 #endif // __bbcreaMaracasVisuContourCrown_h_INCLUDED__
111 #endif // _USE_WXWIDGETS_
112