]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuImageBrowserReader._h_
#3262 creaMaracasVisu Feature New Normal - Export LookupTable fron ColorLayerImageV...
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuImageBrowserReader._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 __bbmaracasvisuImageBrowserReader_h_INCLUDED__
28 #define __bbmaracasvisuImageBrowserReader_h_INCLUDED__
29 #include "bbtkWxBlackBox.h"
30
31 #include "wxMaracasImageBrowser02.h"
32
33
34 namespace bbmaracasvisu
35 {
36
37
38 //--------------------------------------------------------------------
39 //--------------------------------------------------------------------
40 //--------------------------------------------------------------------
41
42   class ImageBrowserReader;
43   //------------------------------------------------------------------------------------------------------------------------------------
44   // Event handling auxiliar class
45   //------------------------------------------------------------------------------------------------------------------------------------
46   class wxMaracasImageBrowser02_EvtHandler : wxEvtHandler
47   {
48   public:
49           //--------------------------------------------------------------------------------------------------------------------------------
50           // Constructors ans destructors
51           //--------------------------------------------------------------------------------------------------------------------------------
52                 wxMaracasImageBrowser02_EvtHandler(ImageBrowserReader *bbParent,wxMaracasImageBrowser02 * wxmaracasimagebrowser02);
53                 ~wxMaracasImageBrowser02_EvtHandler();          
54
55           //--------------------------------------------------------------------------------------------------------------------------------
56           // Min-Max Barrange received events
57           //--------------------------------------------------------------------------------------------------------------------------------
58                 void OnCutImage(wxCommandEvent& event);
59   private:
60           //--------------------------------------------------------------------------------------------------------------------------------
61           // Attributes
62           //--------------------------------------------------------------------------------------------------------------------------------
63           ImageBrowserReader            * mbbtkImageBrowserReader;
64           wxMaracasImageBrowser02       * mmaracasimagebrowser02;
65   };
66
67
68 //--------------------------------------------------------------------
69 //--------------------------------------------------------------------
70 //--------------------------------------------------------------------
71
72
73
74
75 class /*BBTK_EXPORT*/ ImageBrowserReader
76  : 
77    public bbtk::WxBlackBox
78 {
79   BBTK_BLACK_BOX_INTERFACE(ImageBrowserReader,bbtk::WxBlackBox);
80 //==================================================================
81 /// User callback called in the box contructor
82 virtual void bbUserConstructor();
83 /// User callback called in the box copy constructor
84 virtual void bbUserCopyConstructor();
85 /// User callback called in the box destructor
86 virtual void bbUserDestructor();
87 //==================================================================
88   BBTK_DECLARE_INPUT(LstFileName,std::vector <std::string>);
89   BBTK_DECLARE_INPUT(Type,int);
90   BBTK_DECLARE_OUTPUT(Out,vtkImageData *);
91
92   BBTK_PROCESS(Process);
93   void Process();
94   BBTK_CREATE_WIDGET(CreateWidget);
95   void CreateWidget();
96
97   void DefineImageOutput();
98
99 private:
100         marParameters                                           *marparameters;
101         marFilesBase                                            *marfilesbase;
102         wxMaracasImageBrowser02                         *wxmaracasimagebrowser02;
103         wxMaracasImageBrowser02_EvtHandler      *wxmaracasimagebrowser02_eventHandler;
104 };
105
106 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageBrowserReader,bbtk::WxBlackBox);
107 BBTK_NAME("ImageBrowserReader");
108 BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
109 BBTK_DESCRIPTION("Read a DICOM/RAW image and select the VOI");
110 BBTK_CATEGORY("read/write");
111   BBTK_INPUT(ImageBrowserReader,LstFileName,"List of files names", std::vector <std::string> ,"");
112   BBTK_INPUT(ImageBrowserReader,Type,"Type of image (default -999) -999=Unkown -1=lst-ILPD  0=Maracas-Raw  100=Maracas-Dicom  200=Maracas-lstRaw 300=Maracas-lstAsciiRaw",int,"");
113   BBTK_OUTPUT(ImageBrowserReader,Out,"Output Image",vtkImageData*,"");
114 BBTK_END_DESCRIBE_BLACK_BOX(ImageBrowserReader);
115 }
116 // EO namespace bbmaracasvisu
117
118 #endif // __bbmaracasvisuImageBrowserReader_h_INCLUDED__
119 #endif // _USE_WXWIDGETS_
120