2 #ifndef __HistogramDialogComboBox__
3 #define __HistogramDialogComboBox__
6 // ----------------------------------------------------------------------------
7 // wx headers inclusion.
8 // For compilers that support precompilation, includes <wx/wx.h>.
9 // ----------------------------------------------------------------------------
18 #include "HistogramDialogComboBoxItem.h"
20 #include <wx/bmpcbox.h>
21 #include "vtkImageData.h"
24 #define FILENAME "/Data/colorsfunction.txt"
27 class HistogramDialogComboBox : public wxPanel
33 HistogramDialogComboBox(wxWindow* parent);
34 //HistogramDialogComboBox(int bar_width,int bar_height);
35 ~HistogramDialogComboBox();
37 void SetColors(std::vector<double> greyvect, std::vector<double> redvect, std::vector<double> greenvect, std::vector<double> bluevect);
40 std::vector<double> getGreyVector(){return _greyvect;}
41 std::vector<double> getRedVector(){return _redvect;}
42 std::vector<double> getGreenVector(){return _greenvect;}
43 std::vector<double> getBlueVector(){return _bluevect;}
45 void OnEditBitmapCombo(wxCommandEvent& event);
46 void OnBitmapComboItemSelected(wxCommandEvent& event);
48 void setImageData(vtkImageData* img);
51 ** Returns two vectors, the grey level of the point and its value, the value is between [0,1]
53 void GetValuesPointsFunction(std::vector<double>& greylevel,std::vector<double>& value);
56 ** Returns two vectors, the grey level of the point and its value, the red, green
57 ** and blue value is between [0,1]
59 void GetValuesColorPointsFunction(std::vector<double>& greylevel,
60 std::vector<double>& red,
61 std::vector<double>& green,
62 std::vector<double>& blue);
66 std::vector<double> _greyvect;
67 std::vector<double> _redvect;
68 std::vector<double> _greenvect;
69 std::vector<double> _bluevect;
70 std::vector<double> _greyvecttransfer;
71 std::vector<double> _value;
77 * Represents the color of the backGround. Default color is the parent color.
80 wxBitmapComboBox* _bitmapcombo;
81 std::vector<HistogramDialogComboBoxItem*> _bitmapsitems;
82 wxBitmap* colorBar_Bitmap;
83 wxSizer* _bitmapsizer;
85 wxSizer* getBitmapCombo();
86 wxBitmapComboBox* getBitmapComboElements();
87 void OnLoadComboBoxData(std::vector<HistogramDialogComboBoxItem*>& itembitmaps,std::string filename);
88 void saveCurrentConfiguration(std::vector<HistogramDialogComboBoxItem*>& itembitmaps,std::string filename);