X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbmaracasvisuTransferFunctionView.h;h=bcd1a09e348676de01513ce2fccb004fa9edad5c;hb=f010d4e7f1754243c513cc659372169c42560d5f;hp=ef3fd0351e22aade539d8fc5b5592b7b0b4e4663;hpb=f70f07396065237d1d4fabea4e9524ad4d9c7d13;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuTransferFunctionView.h b/bbtk/src/bbmaracasvisuTransferFunctionView.h index ef3fd03..bcd1a09 100644 --- a/bbtk/src/bbmaracasvisuTransferFunctionView.h +++ b/bbtk/src/bbmaracasvisuTransferFunctionView.h @@ -9,10 +9,13 @@ #include "vtkPiecewiseFunction.h" #include "vtkColorTransferFunction.h" +#include namespace bbcreaMaracasVisu { + + class /*BBTK_EXPORT*/ TransferFunctionView : public bbtk::WxBlackBox @@ -21,6 +24,9 @@ class /*BBTK_EXPORT*/ TransferFunctionView BBTK_DECLARE_INPUT(In, vtkImageData*); BBTK_DECLARE_OUTPUT(OpacityFunction, vtkPiecewiseFunction*); BBTK_DECLARE_OUTPUT(ColorFunction, vtkColorTransferFunction*); + + BBTK_DECLARE_OUTPUT(WindowLevel, double); + BBTK_DECLARE_OUTPUT(ColorLevel, double); /*BBTK_DECLARE_OUTPUT(GreyLevel, std::vector ); BBTK_DECLARE_OUTPUT(Value, std::vector ); BBTK_DECLARE_OUTPUT(GreyLevelColors, std::vector); @@ -31,7 +37,11 @@ class /*BBTK_EXPORT*/ TransferFunctionView BBTK_PROCESS(Process); void Process(); BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(wxWindow* parent); + void CreateWidget(wxWindow* parent); + + void onColorChange(); + + void onSliderChange(); private: //HistogramWidget *mwxwidget; @@ -42,6 +52,20 @@ class /*BBTK_EXPORT*/ TransferFunctionView vtkColorTransferFunction* _ctfun; }; +class HandlerTransferFunctionView : public wxEvtHandler +{ + public: + HandlerTransferFunctionView(TransferFunctionView* box); + ~HandlerTransferFunctionView(); + + void onColorChange(wxCommandEvent& event); + + void onSliderChange(wxCommandEvent& event); + + private: + TransferFunctionView *_box; +}; + BBTK_BEGIN_DESCRIBE_BLACK_BOX(TransferFunctionView,bbtk::WxBlackBox); BBTK_NAME("TransferFunctionView"); BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr"); @@ -50,6 +74,8 @@ BBTK_DESCRIPTION("Transfer Function Window"); BBTK_INPUT(TransferFunctionView,In,"Input image",vtkImageData*,""); BBTK_OUTPUT(TransferFunctionView,OpacityFunction,"Transfer function for the opacity", vtkPiecewiseFunction*,""); BBTK_OUTPUT(TransferFunctionView,ColorFunction,"Transfer function for the color", vtkColorTransferFunction*,""); + BBTK_OUTPUT(TransferFunctionView,WindowLevel,"WidowLevel for the current window", double,""); + BBTK_OUTPUT(TransferFunctionView,ColorLevel,"ColorLevel for the current window", double,""); /*BBTK_OUTPUT(TransferFunctionView,GreyLevel,"Greylevel related to the transparency",std::vector,""); BBTK_OUTPUT(TransferFunctionView,Value,"Value of the transparency in the transfer function",std::vector,""); BBTK_OUTPUT(TransferFunctionView,GreyLevelColors,"Grey level of the color in the transfer function",std::vector,""); @@ -58,6 +84,8 @@ BBTK_DESCRIPTION("Transfer Function Window"); BBTK_OUTPUT(TransferFunctionView,Blue,"Blue value according to the GreyLevelColors",std::vector,"");*/ BBTK_END_DESCRIBE_BLACK_BOX(TransferFunctionView); } + + // EO namespace bbcreaMaracasVisu #endif // __bbcreaMaracasVisuTransferFunctionView_h_INCLUDED__