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