HistogramDialogComboBoxItem Class Reference

#include <HistogramDialogComboBoxItem.h>

List of all members.

Public Member Functions

 HistogramDialogComboBoxItem ()
 HistogramDialogComboBoxItem (int bar_width, int bar_height)
 ~HistogramDialogComboBoxItem ()
void SetColors (std::vector< double > greyvect, std::vector< double > redvect, std::vector< double > greenvect, std::vector< double > bluevect)
void SetTransferFunction (std::vector< double > greyvect, std::vector< double > value)
wxBitmap GetBitmap ()
std::vector< double > getGreyVector ()
std::vector< double > getRedVector ()
std::vector< double > getGreenVector ()
std::vector< double > getBlueVector ()
std::vector< double > getGreyVectorTransfer ()
std::vector< double > getValueVector ()

Private Attributes

std::vector< double > _greyvect
std::vector< double > _redvect
std::vector< double > _greenvect
std::vector< double > _bluevect
std::vector< double > _greyvecttransfunct
std::vector< double > _value
wxColour colourParent
int _bar_width
int _bar_height
wxBitmap * colorBar_Bitmap

Detailed Description

Definition at line 18 of file HistogramDialogComboBoxItem.h.


Constructor & Destructor Documentation

HistogramDialogComboBoxItem::HistogramDialogComboBoxItem (  ) 

Definition at line 7 of file HistogramDialogComboBoxItem.cxx.

References _bar_height, _bar_width, and colorBar_Bitmap.

00008 {
00009 
00010         _bar_width = 30;
00011         _bar_height = 20;
00012         
00013 
00014         colorBar_Bitmap = new wxBitmap(_bar_width,      _bar_height);
00015 
00016 }

HistogramDialogComboBoxItem::HistogramDialogComboBoxItem ( int  bar_width,
int  bar_height 
)

Definition at line 17 of file HistogramDialogComboBoxItem.cxx.

References _bar_height, _bar_width, and colorBar_Bitmap.

00018 {
00019 
00020         _bar_width = bar_width;
00021         _bar_height = bar_height;
00022 
00023         //_maxgreyvalue = maxgreyvalue;
00024 
00025         colorBar_Bitmap = new wxBitmap(_bar_width,      _bar_height);
00026 
00027 }

HistogramDialogComboBoxItem::~HistogramDialogComboBoxItem (  ) 

Definition at line 28 of file HistogramDialogComboBoxItem.cxx.

00028                                                          {
00029         
00030         
00031 }


Member Function Documentation

wxBitmap HistogramDialogComboBoxItem::GetBitmap (  ) 

Definition at line 95 of file HistogramDialogComboBoxItem.cxx.

References colorBar_Bitmap.

Referenced by HistogramDialog::AddNewBitmapButton().

00095                                                {
00096         
00097         return *colorBar_Bitmap;
00098 }

Here is the caller graph for this function:

std::vector<double> HistogramDialogComboBoxItem::getBlueVector (  )  [inline]

Definition at line 35 of file HistogramDialogComboBoxItem.h.

References _bluevect.

Referenced by HistogramDialogComboBox::OnBitmapComboItemSelected(), HistogramDialog::OnEditColorsCombo(), and HistogramDialogComboBox::saveCurrentConfiguration().

00035 {return _bluevect;}

Here is the caller graph for this function:

std::vector<double> HistogramDialogComboBoxItem::getGreenVector (  )  [inline]

Definition at line 34 of file HistogramDialogComboBoxItem.h.

References _greenvect.

Referenced by HistogramDialogComboBox::OnBitmapComboItemSelected(), HistogramDialog::OnEditColorsCombo(), and HistogramDialogComboBox::saveCurrentConfiguration().

00034 {return _greenvect;}

Here is the caller graph for this function:

std::vector<double> HistogramDialogComboBoxItem::getGreyVector (  )  [inline]

Definition at line 32 of file HistogramDialogComboBoxItem.h.

References _greyvect.

Referenced by HistogramDialogComboBox::OnBitmapComboItemSelected(), HistogramDialog::OnEditColorsCombo(), and HistogramDialogComboBox::saveCurrentConfiguration().

00032 {return _greyvect;}

Here is the caller graph for this function:

std::vector<double> HistogramDialogComboBoxItem::getGreyVectorTransfer (  )  [inline]
std::vector<double> HistogramDialogComboBoxItem::getRedVector (  )  [inline]

Definition at line 33 of file HistogramDialogComboBoxItem.h.

References _redvect.

Referenced by HistogramDialogComboBox::OnBitmapComboItemSelected(), HistogramDialog::OnEditColorsCombo(), and HistogramDialogComboBox::saveCurrentConfiguration().

00033 {return _redvect;}

Here is the caller graph for this function:

std::vector<double> HistogramDialogComboBoxItem::getValueVector (  )  [inline]

Definition at line 38 of file HistogramDialogComboBoxItem.h.

References _value.

Referenced by HistogramDialogComboBox::OnBitmapComboItemSelected(), HistogramDialog::OnEditColorsCombo(), and HistogramDialogComboBox::saveCurrentConfiguration().

00038 {return _value;}

Here is the caller graph for this function:

void HistogramDialogComboBoxItem::SetColors ( std::vector< double >  greyvect,
std::vector< double >  redvect,
std::vector< double >  greenvect,
std::vector< double >  bluevect 
)

Definition at line 32 of file HistogramDialogComboBoxItem.cxx.

References _bar_height, _bar_width, _bluevect, _greenvect, _greyvect, _redvect, colorBar_Bitmap, and colourParent.

Referenced by HistogramDialogComboBox::OnLoadComboBoxData().

00032                                                                                                                                                          {
00033 
00034         _greyvect=greyvect;
00035         _redvect=redvect;
00036         _greenvect=greenvect;
00037         _bluevect=bluevect;
00038 
00039         wxMemoryDC temp_dc;
00040         temp_dc.SelectObject( *colorBar_Bitmap );               
00041         temp_dc.SetBrush(wxBrush( colourParent ,wxSOLID  ));
00042         temp_dc.SetPen(wxPen( colourParent,1,wxSOLID  ));
00043         
00044         temp_dc.DrawRectangle(0, 0, _bar_width, _bar_height);
00045         temp_dc.SetPen(wxPen( wxColour(167,165,191),1,wxSOLID  ));
00046         temp_dc.DrawRectangle(0, 0, _bar_width, _bar_height);   
00047 
00048         double initial_r, initial_g, initial_b; 
00049         double next_r, next_g, next_b;
00050         double initialgreyv=0, nextgreyv=0;
00051         
00052         for (int i =0; i < _redvect.size(); i++){
00053                 initialgreyv = nextgreyv;
00054                 initial_r = _redvect[i]*255.0;          
00055                 initial_g = _greenvect[i]*255.0;                
00056                 initial_b = _bluevect[i]*255.0;         
00057 
00058                 if(i < _redvect.size()-1){
00059                         nextgreyv = _greyvect[i+1];
00060                         next_r = _redvect[i+1]*255.0;
00061                         next_g = _greenvect[i+1]*255.0;
00062                         next_b = _bluevect[i+1]*255.0;            
00063                 }else{
00064                         nextgreyv = 1;  
00065                         next_r = initial_r;
00066                         next_g = initial_g;
00067                         next_b = initial_b;
00068                 }
00069 
00070                 int ini_pixelX=_bar_width*initialgreyv;
00071                 int end_pixelX=_bar_width*nextgreyv;            
00072 
00073                 double m_scope_r = (double)(next_r-initial_r)/(end_pixelX-ini_pixelX);
00074                 double m_scope_g = (double)(next_g-initial_g)/(end_pixelX-ini_pixelX);
00075                 double m_scope_b = (double)(next_b-initial_b)/(end_pixelX-ini_pixelX);
00076 
00077                 next_r = initial_r;
00078                 next_g = initial_g;
00079                 next_b = initial_b;
00080 
00081                 for (int Xi =ini_pixelX; Xi<= end_pixelX; Xi++)                                         
00082                 {
00083                         temp_dc.SetBrush(wxBrush( wxColour(next_r, next_g, next_b),wxSOLID  ));
00084                         temp_dc.SetPen(wxPen( wxColour(next_r, next_g, next_b),1,wxSOLID  ));
00085                 
00086                         temp_dc.DrawLine(Xi, 0, Xi, _bar_height);               
00087 
00088                         next_r = (int)(m_scope_r + next_r);
00089                         next_g = (int)(m_scope_g + next_g);
00090                         next_b = (int)(m_scope_b + next_b);                                                     
00091                 }
00092         }
00093 }

Here is the caller graph for this function:

void HistogramDialogComboBoxItem::SetTransferFunction ( std::vector< double >  greyvect,
std::vector< double >  value 
)

Definition at line 99 of file HistogramDialogComboBoxItem.cxx.

References _greyvecttransfunct, and _value.

Referenced by HistogramDialogComboBox::OnLoadComboBoxData().

00099                                                                                                         {
00100     _greyvecttransfunct = greyvect;
00101         _value=value;
00102 }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 56 of file HistogramDialogComboBoxItem.h.

Referenced by HistogramDialogComboBoxItem(), and SetColors().

Definition at line 55 of file HistogramDialogComboBoxItem.h.

Referenced by HistogramDialogComboBoxItem(), and SetColors().

std::vector<double> HistogramDialogComboBoxItem::_bluevect [private]

Definition at line 45 of file HistogramDialogComboBoxItem.h.

Referenced by getBlueVector(), and SetColors().

std::vector<double> HistogramDialogComboBoxItem::_greenvect [private]

Definition at line 44 of file HistogramDialogComboBoxItem.h.

Referenced by getGreenVector(), and SetColors().

std::vector<double> HistogramDialogComboBoxItem::_greyvect [private]

Definition at line 42 of file HistogramDialogComboBoxItem.h.

Referenced by getGreyVector(), and SetColors().

std::vector<double> HistogramDialogComboBoxItem::_greyvecttransfunct [private]

Definition at line 47 of file HistogramDialogComboBoxItem.h.

Referenced by getGreyVectorTransfer(), and SetTransferFunction().

std::vector<double> HistogramDialogComboBoxItem::_redvect [private]

Definition at line 43 of file HistogramDialogComboBoxItem.h.

Referenced by getRedVector(), and SetColors().

std::vector<double> HistogramDialogComboBoxItem::_value [private]

Definition at line 48 of file HistogramDialogComboBoxItem.h.

Referenced by getValueVector(), and SetTransferFunction().

Definition at line 58 of file HistogramDialogComboBoxItem.h.

Referenced by GetBitmap(), HistogramDialogComboBoxItem(), and SetColors().

Definition at line 53 of file HistogramDialogComboBoxItem.h.

Referenced by SetColors().


The documentation for this class was generated from the following files:

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1