#ifndef __HistogramDialogComboBox__ #define __HistogramDialogComboBox__ // ---------------------------------------------------------------------------- // wx headers inclusion. // For compilers that support precompilation, includes . // ---------------------------------------------------------------------------- #ifdef __BORLANDC__ #pragma hdrstop #endif #include #include #include "HistogramDialogComboBoxItem.h" #include #include #include "vtkImageData.h" #define FILENAME "/Data/colorsfunction.txt" class HistogramDialogComboBox : public wxPanel { public: /* Constructor */ HistogramDialogComboBox(wxWindow* parent); //HistogramDialogComboBox(int bar_width,int bar_height); ~HistogramDialogComboBox(); void SetColors(std::vector greyvect, std::vector redvect, std::vector greenvect, std::vector bluevect); wxBitmap GetBitmap(); std::vector getGreyVector(){return _greyvect;} std::vector getRedVector(){return _redvect;} std::vector getGreenVector(){return _greenvect;} std::vector getBlueVector(){return _bluevect;} void OnEditBitmapCombo(wxCommandEvent& event); void OnBitmapComboItemSelected(wxCommandEvent& event); void setImageData(vtkImageData* img); /** ** Returns two vectors, the grey level of the point and its value, the value is between [0,1] **/ void GetValuesPointsFunction(std::vector& greylevel,std::vector& value); /** ** Returns two vectors, the grey level of the point and its value, the red, green ** and blue value is between [0,1] **/ void GetValuesColorPointsFunction(std::vector& greylevel, std::vector& red, std::vector& green, std::vector& blue); private: std::vector _greyvect; std::vector _redvect; std::vector _greenvect; std::vector _bluevect; std::vector _greyvecttransfer; std::vector _value; vtkImageData* _img; double _maxgreyvalue; int _currentitem; /* * Represents the color of the backGround. Default color is the parent color. */ wxBitmapComboBox* _bitmapcombo; std::vector _bitmapsitems; wxBitmap* colorBar_Bitmap; wxSizer* _bitmapsizer; wxSizer* getBitmapCombo(); wxBitmapComboBox* getBitmapComboElements(); void OnLoadComboBoxData(std::vector& itembitmaps,std::string filename); void saveCurrentConfiguration(std::vector& itembitmaps,std::string filename); }; #endif