2 #ifndef __bbcreaMaracasVisuTransferFunctionView_h_INCLUDED__
3 #define __bbcreaMaracasVisuTransferFunctionView_h_INCLUDED__
4 #include "bbtkWxBlackBox.h"
6 #include "vtkImageData.h"
7 //#include "HistogramWidget.h"
8 #include "HistogramDialogComboBox.h"
10 #include "vtkPiecewiseFunction.h"
11 #include "vtkColorTransferFunction.h"
14 namespace bbcreaMaracasVisu
19 class /*BBTK_EXPORT*/ TransferFunctionView
21 public bbtk::WxBlackBox
23 BBTK_BLACK_BOX_INTERFACE(TransferFunctionView,bbtk::WxBlackBox);
24 BBTK_DECLARE_INPUT(In, vtkImageData*);
25 BBTK_DECLARE_OUTPUT(OpacityFunction, vtkPiecewiseFunction*);
26 BBTK_DECLARE_OUTPUT(ColorFunction, vtkColorTransferFunction*);
28 BBTK_DECLARE_OUTPUT(WindowLevel, double);
29 BBTK_DECLARE_OUTPUT(ColorLevel, double);
30 /*BBTK_DECLARE_OUTPUT(GreyLevel, std::vector<double> );
31 BBTK_DECLARE_OUTPUT(Value, std::vector<double> );
32 BBTK_DECLARE_OUTPUT(GreyLevelColors, std::vector<double>);
33 BBTK_DECLARE_OUTPUT(Red, std::vector<double>);
34 BBTK_DECLARE_OUTPUT(Green, std::vector<double>);
35 BBTK_DECLARE_OUTPUT(Blue, std::vector<double>);*/
37 BBTK_PROCESS(Process);
39 BBTK_CREATE_WIDGET(CreateWidget);
40 void CreateWidget(wxWindow* parent);
44 void onSliderChange();
47 //HistogramWidget *mwxwidget;
48 HistogramDialogComboBox *mwxwidget;
49 vtkImageData* _currentimg;
51 vtkPiecewiseFunction* _tfun;
52 vtkColorTransferFunction* _ctfun;
55 class HandlerTransferFunctionView : public wxEvtHandler
58 HandlerTransferFunctionView(TransferFunctionView* box);
59 ~HandlerTransferFunctionView();
61 void onColorChange(wxCommandEvent& event);
63 void onSliderChange(wxCommandEvent& event);
66 TransferFunctionView *_box;
69 BBTK_BEGIN_DESCRIBE_BLACK_BOX(TransferFunctionView,bbtk::WxBlackBox);
70 BBTK_NAME("TransferFunctionView");
71 BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
72 BBTK_DESCRIPTION("Transfer Function Window");
73 //BBTK_CATEGORY("__CategoryBlackBox__");
74 BBTK_INPUT(TransferFunctionView,In,"Input image",vtkImageData*,"");
75 BBTK_OUTPUT(TransferFunctionView,OpacityFunction,"Transfer function for the opacity", vtkPiecewiseFunction*,"");
76 BBTK_OUTPUT(TransferFunctionView,ColorFunction,"Transfer function for the color", vtkColorTransferFunction*,"");
77 BBTK_OUTPUT(TransferFunctionView,WindowLevel,"WidowLevel for the current window", double,"");
78 BBTK_OUTPUT(TransferFunctionView,ColorLevel,"ColorLevel for the current window", double,"");
79 /*BBTK_OUTPUT(TransferFunctionView,GreyLevel,"Greylevel related to the transparency",std::vector<double>,"");
80 BBTK_OUTPUT(TransferFunctionView,Value,"Value of the transparency in the transfer function",std::vector<double>,"");
81 BBTK_OUTPUT(TransferFunctionView,GreyLevelColors,"Grey level of the color in the transfer function",std::vector<double>,"");
82 BBTK_OUTPUT(TransferFunctionView,Red,"Red value according to the GreyLevelColors",std::vector<double>,"");
83 BBTK_OUTPUT(TransferFunctionView,Green,"Green value according to the GreyLevelColors",std::vector<double>,"");
84 BBTK_OUTPUT(TransferFunctionView,Blue,"Blue value according to the GreyLevelColors",std::vector<double>,"");*/
85 BBTK_END_DESCRIBE_BLACK_BOX(TransferFunctionView);
89 // EO namespace bbcreaMaracasVisu
91 #endif // __bbcreaMaracasVisuTransferFunctionView_h_INCLUDED__
92 #endif // _USE_WXWIDGETS_