]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuTransferFunctionView.h
ef3fd0351e22aade539d8fc5b5592b7b0b4e4663
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuTransferFunctionView.h
1 #ifdef _USE_WXWIDGETS_
2 #ifndef __bbcreaMaracasVisuTransferFunctionView_h_INCLUDED__
3 #define __bbcreaMaracasVisuTransferFunctionView_h_INCLUDED__
4 #include "bbtkWxBlackBox.h"
5
6 #include "vtkImageData.h"
7 //#include "HistogramWidget.h"
8 #include "HistogramDialogComboBox.h"
9
10 #include "vtkPiecewiseFunction.h"
11 #include "vtkColorTransferFunction.h"
12
13 namespace bbcreaMaracasVisu
14 {
15
16 class /*BBTK_EXPORT*/ TransferFunctionView
17  : 
18    public bbtk::WxBlackBox
19 {
20   BBTK_BLACK_BOX_INTERFACE(TransferFunctionView,bbtk::WxBlackBox);
21         BBTK_DECLARE_INPUT(In, vtkImageData*);
22         BBTK_DECLARE_OUTPUT(OpacityFunction, vtkPiecewiseFunction*);
23         BBTK_DECLARE_OUTPUT(ColorFunction, vtkColorTransferFunction*);
24         /*BBTK_DECLARE_OUTPUT(GreyLevel, std::vector<double> );
25         BBTK_DECLARE_OUTPUT(Value, std::vector<double> );
26         BBTK_DECLARE_OUTPUT(GreyLevelColors, std::vector<double>);
27         BBTK_DECLARE_OUTPUT(Red, std::vector<double>);
28         BBTK_DECLARE_OUTPUT(Green, std::vector<double>);
29         BBTK_DECLARE_OUTPUT(Blue, std::vector<double>);*/
30
31   BBTK_PROCESS(Process);
32   void Process();
33   BBTK_CREATE_WIDGET(CreateWidget);
34   void CreateWidget(wxWindow* parent);
35
36   private:
37         //HistogramWidget *mwxwidget;
38           HistogramDialogComboBox *mwxwidget;
39         vtkImageData* _currentimg;
40         
41         vtkPiecewiseFunction* _tfun;
42         vtkColorTransferFunction* _ctfun;
43 };
44
45 BBTK_BEGIN_DESCRIBE_BLACK_BOX(TransferFunctionView,bbtk::WxBlackBox);
46 BBTK_NAME("TransferFunctionView");
47 BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
48 BBTK_DESCRIPTION("Transfer Function Window");
49 //BBTK_CATEGORY("__CategoryBlackBox__");
50   BBTK_INPUT(TransferFunctionView,In,"Input image",vtkImageData*,"");
51         BBTK_OUTPUT(TransferFunctionView,OpacityFunction,"Transfer function for the opacity", vtkPiecewiseFunction*,"");
52         BBTK_OUTPUT(TransferFunctionView,ColorFunction,"Transfer function for the color", vtkColorTransferFunction*,"");  
53   /*BBTK_OUTPUT(TransferFunctionView,GreyLevel,"Greylevel related to the transparency",std::vector<double>,"");
54   BBTK_OUTPUT(TransferFunctionView,Value,"Value of the transparency in the transfer function",std::vector<double>,"");
55   BBTK_OUTPUT(TransferFunctionView,GreyLevelColors,"Grey level of the color in the transfer function",std::vector<double>,"");
56   BBTK_OUTPUT(TransferFunctionView,Red,"Red value according to the GreyLevelColors",std::vector<double>,"");
57   BBTK_OUTPUT(TransferFunctionView,Green,"Green value according to the GreyLevelColors",std::vector<double>,"");
58   BBTK_OUTPUT(TransferFunctionView,Blue,"Blue value according to the GreyLevelColors",std::vector<double>,"");*/
59 BBTK_END_DESCRIBE_BLACK_BOX(TransferFunctionView);
60 }
61 // EO namespace bbcreaMaracasVisu
62
63 #endif // __bbcreaMaracasVisuTransferFunctionView_h_INCLUDED__
64 #endif // _USE_WXWIDGETS_
65