HistogramDialogComboBox Class Reference

#include <HistogramDialogComboBox.h>

List of all members.

Public Member Functions

 HistogramDialogComboBox (wxWindow *parent)
 ~HistogramDialogComboBox ()
void SetColors (std::vector< double > greyvect, std::vector< double > redvect, std::vector< double > greenvect, std::vector< double > bluevect)
wxBitmap GetBitmap ()
std::vector< double > getGreyVector ()
std::vector< double > getRedVector ()
std::vector< double > getGreenVector ()
std::vector< double > getBlueVector ()
void OnEditBitmapCombo (wxCommandEvent &event)
void OnBitmapComboItemSelected (wxCommandEvent &event)
void OnColorLevelChanged (wxCommandEvent &event)
void OnWindowLevelChanged (wxCommandEvent &event)
void setImageData (vtkImageData *img)
void GetValuesPointsFunction (std::vector< double > &greylevel, std::vector< double > &value)
void GetValuesColorPointsFunction (std::vector< double > &greylevel, std::vector< double > &red, std::vector< double > &green, std::vector< double > &blue)
double GetWindowLevel ()
double GetColorLevel ()

Private Member Functions

wxSizer * getBitmapCombo ()
wxSizer * getSlidersWlCo ()
wxBitmapComboBox * getBitmapComboElements ()
void OnLoadComboBoxData (std::vector< HistogramDialogComboBoxItem * > &itembitmaps, std::string filename)
void saveCurrentConfiguration (std::vector< HistogramDialogComboBoxItem * > &itembitmaps, std::string filename)
void setSlidersValue ()

Private Attributes

std::vector< double > _greyvect
std::vector< double > _redvect
std::vector< double > _greenvect
std::vector< double > _bluevect
std::vector< double > _greyvecttransfer
std::vector< double > _value
vtkImageData * _img
double _maxgreyvalue
int _currentitem
wxBitmapComboBox * _bitmapcombo
wxSlider * _slidercolor
wxSlider * _sliderwindowlevel
std::vector
< HistogramDialogComboBoxItem * > 
_bitmapsitems
wxBitmap * colorBar_Bitmap
wxSizer * _bitmapsizer

Detailed Description

Definition at line 30 of file HistogramDialogComboBox.h.


Constructor & Destructor Documentation

HistogramDialogComboBox::HistogramDialogComboBox ( wxWindow *  parent  ) 

Definition at line 11 of file HistogramDialogComboBox.cxx.

References _bitmapcombo, _bitmapsizer, _currentitem, _img, _maxgreyvalue, _slidercolor, _sliderwindowlevel, colorBar_Bitmap, and getBitmapCombo().

00012 : wxPanel(parent)
00013 {
00014         _img                    = NULL; 
00015         _bitmapcombo            = NULL;
00016         _slidercolor            = NULL;
00017         _sliderwindowlevel      = NULL; 
00018         colorBar_Bitmap         = NULL;
00019         _bitmapsizer            = NULL;
00020 
00021         this->SetSizer(getBitmapCombo());
00022         _img                    = NULL;
00023         _currentitem            = -1;
00024         _maxgreyvalue           = 0;
00025 printf("EED HistogramDialogComboBox\n");        
00026 #ifdef LINUX
00027         std::string currentpath = crea::System::GetExecutablePath();
00028         currentpath.append("/data/");
00029         crea::System::createDirectory(currentpath.c_str());
00030 #endif
00031 }

Here is the call graph for this function:

HistogramDialogComboBox::~HistogramDialogComboBox (  ) 

Definition at line 33 of file HistogramDialogComboBox.cxx.

00034 {       
00035 }


Member Function Documentation

wxBitmap HistogramDialogComboBox::GetBitmap (  ) 

Referenced by getBitmapComboElements().

Here is the caller graph for this function:

wxSizer * HistogramDialogComboBox::getBitmapCombo (  )  [private]

Definition at line 45 of file HistogramDialogComboBox.cxx.

References _bitmapcombo, _bitmapsizer, getBitmapComboElements(), getSlidersWlCo(), and OnEditBitmapCombo().

Referenced by HistogramDialogComboBox().

00046 {
00047         //_bitmapsizer = new wxBoxSizer(wxVERTICAL);
00048         _bitmapsizer = new wxBoxSizer(wxVERTICAL);
00049 
00050         wxBoxSizer* comboeditsizer = new wxBoxSizer(wxHORIZONTAL);
00051         _bitmapcombo = getBitmapComboElements();
00052 
00053         wxBitmap bitmap1(Edit_xpm);
00054         wxBitmapButton* edit = new wxBitmapButton(this, -1, bitmap1,wxDefaultPosition,wxSize(30,30));   
00055         Connect(edit->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&HistogramDialogComboBox::OnEditBitmapCombo);                       
00056         
00057         comboeditsizer->Add(_bitmapcombo,wxSizerFlags().Center().FixedMinSize());
00058         comboeditsizer->Add(edit,wxSizerFlags().Center());
00059 
00060         _bitmapsizer->Add(comboeditsizer,wxSizerFlags().FixedMinSize().Center());
00061         _bitmapsizer->AddSpacer(5);
00062         _bitmapsizer->Add(getSlidersWlCo(),wxSizerFlags().Expand().Center());
00063 
00064         return _bitmapsizer;
00065 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxBitmapComboBox * HistogramDialogComboBox::getBitmapComboElements (  )  [private]

Definition at line 237 of file HistogramDialogComboBox.cxx.

References _bitmapsitems, FILENAME, GetBitmap(), OnBitmapComboItemSelected(), and OnLoadComboBoxData().

Referenced by getBitmapCombo(), and OnEditBitmapCombo().

00238 {
00239         std::string currentpath = "";
00240 #ifdef WIN32
00241         currentpath = crea::System::GetDllAppPath("bbcreaMaracasVisu"); 
00242 #endif
00243 #ifdef LINUX
00244         currentpath = crea::System::GetExecutablePath();
00245         currentpath.append("/data/");
00246 #endif
00247         currentpath.append(FILENAME);
00248         
00249         std::cout<<"current file name " <<currentpath<<std::endl;
00250 
00251         std::vector<HistogramDialogComboBoxItem*> bitmapsitems;
00252         OnLoadComboBoxData(bitmapsitems, currentpath);  
00253         _bitmapsitems = bitmapsitems;
00254         wxString* choices;
00255         choices = new wxString[bitmapsitems.size()];
00256         for(int i = 0; i < bitmapsitems.size();i++)
00257         {
00258                 choices[i] = _T("");
00259         }
00260         wxBitmapComboBox* bitmapcombo = new wxBitmapComboBox(this, -1, _T(""), wxDefaultPosition, wxDefaultSize, bitmapsitems.size(),choices);
00261         bitmapcombo->SetSize(65,30);
00262 
00263         Connect(bitmapcombo->GetId(), wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction)&HistogramDialogComboBox::OnBitmapComboItemSelected);                     
00264 
00265         for(int i = 0; i < bitmapsitems.size(); i++)
00266         {
00267         bitmapcombo->SetItemBitmap(i, bitmapsitems[i]->GetBitmap());
00268         }
00269         return  bitmapcombo;
00270 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 46 of file HistogramDialogComboBox.h.

References _bluevect.

00046 {return _bluevect;}

double HistogramDialogComboBox::GetColorLevel (  ) 

Definition at line 91 of file HistogramDialogComboBox.cxx.

References _slidercolor.

00092 {
00093    double val(0.0);
00094    if(_slidercolor != NULL)
00095       val = _slidercolor->GetValue();
00096    return val; // JPR   
00097 }

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

Definition at line 45 of file HistogramDialogComboBox.h.

References _greenvect.

00045 {return _greenvect;}

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

Definition at line 43 of file HistogramDialogComboBox.h.

References _greyvect.

00043 {return _greyvect;}

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

Definition at line 44 of file HistogramDialogComboBox.h.

References _redvect.

00044 {return _redvect;}

wxSizer * HistogramDialogComboBox::getSlidersWlCo (  )  [private]

Definition at line 67 of file HistogramDialogComboBox.cxx.

References _slidercolor, _sliderwindowlevel, OnColorLevelChanged(), and OnWindowLevelChanged().

Referenced by getBitmapCombo().

00068 {
00069         wxBoxSizer* sizersliders = new wxBoxSizer(wxVERTICAL);
00070 
00071         _slidercolor = new wxSlider(this, -1,1,0,1,wxDefaultPosition,wxDefaultSize,wxSL_LABELS);
00072         _sliderwindowlevel = new wxSlider(this, -1,1,0,1,wxDefaultPosition,wxDefaultSize,wxSL_LABELS);
00073 
00074         sizersliders->Add(_slidercolor,wxSizerFlags().Expand().Center());
00075         sizersliders->Add(_sliderwindowlevel,wxSizerFlags().Expand().Center());
00076 
00077         Connect(_slidercolor->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&HistogramDialogComboBox::OnColorLevelChanged);
00078         Connect(_sliderwindowlevel->GetId(), wxEVT_SCROLL_THUMBTRACK, (wxObjectEventFunction)&HistogramDialogComboBox::OnWindowLevelChanged);
00079 
00080         return sizersliders;
00081 }

Here is the call graph for this function:

Here is the caller graph for this function:

void HistogramDialogComboBox::GetValuesColorPointsFunction ( std::vector< double > &  greylevel,
std::vector< double > &  red,
std::vector< double > &  green,
std::vector< double > &  blue 
)

Returns two vectors, the grey level of the point and its value, the red, green and blue value is between [0,1]

Definition at line 414 of file HistogramDialogComboBox.cxx.

References _bluevect, _greenvect, _greyvect, _maxgreyvalue, and _redvect.

Referenced by wxMaracasMultipleVolumeRendererPanel::updateVolume().

00418 {       
00419         for(int i = 0; i < _greyvect.size();i++) {              
00420                 greylevel.push_back(_greyvect[i]*_maxgreyvalue);
00421                 red.push_back(_redvect[i]);
00422                 green.push_back(_greenvect[i]);
00423                 blue.push_back(_bluevect[i]);           
00424         }
00425 }

Here is the caller graph for this function:

void HistogramDialogComboBox::GetValuesPointsFunction ( std::vector< double > &  greylevel,
std::vector< double > &  value 
)

Returns two vectors, the grey level of the point and its value, the value is between [0,1]

Definition at line 402 of file HistogramDialogComboBox.cxx.

References _greyvecttransfer, _maxgreyvalue, and _value.

Referenced by wxMaracasMultipleVolumeRendererPanel::updateVolume().

00403 {       
00404         for(int i = 0; i < _greyvecttransfer.size();i++) {              
00405                 greylevel.push_back(_greyvecttransfer[i]*_maxgreyvalue);
00406                 value.push_back(_value[i]);     
00407         }
00408 }

Here is the caller graph for this function:

double HistogramDialogComboBox::GetWindowLevel (  ) 

Definition at line 83 of file HistogramDialogComboBox.cxx.

References _sliderwindowlevel.

00084 {
00085    double val(0.0);
00086    if(_sliderwindowlevel != NULL)
00087       val= _sliderwindowlevel->GetValue();      
00088    return val; // JPR
00089 }

void HistogramDialogComboBox::OnBitmapComboItemSelected ( wxCommandEvent &  event  ) 

Definition at line 272 of file HistogramDialogComboBox.cxx.

References _bitmapcombo, _bitmapsitems, _bluevect, _currentitem, _greenvect, _greyvect, _greyvecttransfer, _redvect, _value, HistogramDialogComboBoxItem::getBlueVector(), HistogramDialogComboBoxItem::getGreenVector(), HistogramDialogComboBoxItem::getGreyVector(), HistogramDialogComboBoxItem::getGreyVectorTransfer(), HistogramDialogComboBoxItem::getRedVector(), and HistogramDialogComboBoxItem::getValueVector().

Referenced by getBitmapComboElements().

00273 {               
00274         if(_bitmapcombo!=NULL)
00275         {
00276                 _currentitem = event.GetInt();
00277                 if(_bitmapsitems.size()>_currentitem)
00278                 {
00279                         HistogramDialogComboBoxItem* currentconfig = _bitmapsitems[_currentitem];
00280                         _greyvect = currentconfig->getGreyVector();
00281                         _redvect = currentconfig->getRedVector();
00282                         _greenvect = currentconfig->getGreenVector();
00283                         _bluevect= currentconfig->getBlueVector();
00284                         _greyvecttransfer = currentconfig->getGreyVectorTransfer();
00285                         _value  = currentconfig->getValueVector();
00286                         wxCommandEvent newevent(wxEVT_COMMAND_COMBOBOX_SELECTED,this->GetId());
00287             ProcessEvent(newevent);
00288                 }       
00289         }
00290 }

Here is the call graph for this function:

Here is the caller graph for this function:

void HistogramDialogComboBox::OnColorLevelChanged ( wxCommandEvent &  event  ) 

Definition at line 99 of file HistogramDialogComboBox.cxx.

References _slidercolor.

Referenced by getSlidersWlCo().

00100 {
00101    _slidercolor->GetValue();
00102    wxCommandEvent newevent(wxEVT_SCROLL_THUMBTRACK,this->GetId());
00103    ProcessEvent(newevent);
00104 }

Here is the caller graph for this function:

void HistogramDialogComboBox::OnEditBitmapCombo ( wxCommandEvent &  event  ) 

Definition at line 134 of file HistogramDialogComboBox.cxx.

References _bitmapcombo, _bitmapsitems, _bitmapsizer, _img, FILENAME, getBitmapComboElements(), HistogramDialog::getComboBoxItems(), HistogramDialog::initializeHistogram(), saveCurrentConfiguration(), HistogramDialog::setInfoPanExtraControls(), and HistogramDialog::UpdateCurrentComboElement().

Referenced by getBitmapCombo().

00135 {
00136         if(_img!=NULL)
00137         {
00138                 bool createaddandremovecontrols = true;
00139                 HistogramDialog* dialog = new HistogramDialog(this,_T("Color Configuration"),createaddandremovecontrols);
00140                 dialog->initializeHistogram(_img);              
00141                 dialog->setInfoPanExtraControls(_bitmapsitems);
00142 
00143                 if(dialog->ShowModal()==wxID_OK)
00144                 {
00145                         dialog->UpdateCurrentComboElement();
00146                         _bitmapsitems = dialog->getComboBoxItems();
00147                         
00148                         //std::string currentpath = crea::System::GetDllAppPath("bbcreaMaracasVisu"); // JPR
00149                         std::string dllLastName;
00150                         std::string currentpath;
00151                         #ifdef WIN32
00152                         dllLastName = "bbcreaMaracasVisu";
00153                         currentpath = crea::System::GetDllAppPath(dllLastName);
00154                         #endif
00155                         #ifdef LINUX
00156                         currentpath = crea::System::GetExecutablePath();
00157                         currentpath.append("/data/");
00158                         #endif
00159                         currentpath.append(FILENAME);
00160 
00161                         std::vector<double> redvect,greenvect,bluevect;
00162                         std::vector<double> greyvect;
00163 
00164                         saveCurrentConfiguration(_bitmapsitems, currentpath);
00165                         wxBitmapComboBox* tempbitmapcombo = _bitmapcombo;
00166                         for(int i = 0; i < _bitmapsitems.size();i++){
00167                                 delete _bitmapsitems[i];
00168                         }
00169                         _bitmapsitems.clear();
00170                         _bitmapcombo = getBitmapComboElements();
00171                         if(_bitmapsizer->Replace(tempbitmapcombo,_bitmapcombo)){                
00172                                 
00173                                 tempbitmapcombo->Destroy();
00174                         }
00175                         this->Layout();
00176                 }       
00177                 dialog->Destroy();
00178         }
00179 }

Here is the call graph for this function:

Here is the caller graph for this function:

void HistogramDialogComboBox::OnLoadComboBoxData ( std::vector< HistogramDialogComboBoxItem * > &  itembitmaps,
std::string  filename 
) [private]

Definition at line 292 of file HistogramDialogComboBox.cxx.

References HistogramDialogComboBoxItem::SetColors(), and HistogramDialogComboBoxItem::SetTransferFunction().

Referenced by getBitmapComboElements().

00293 {       
00294         std::vector<double> redvect, greenvect, bluevect;
00295         std::vector<double> greyvect, greyvecttransfunct, value;
00296 
00297         redvect.clear(); 
00298         greenvect.clear(); 
00299         bluevect.clear();
00300         greyvect.clear(); 
00301         greyvecttransfunct.clear(); 
00302         value.clear();
00303 
00304         std::ifstream file;     
00305         file.open(  (const char*) (filename.c_str()) ); 
00306         double gv=-1,gvtransfer=-1,intensity=-1,red=-1,gr=-1,bl=-1;
00307         int in=-1;
00308 
00309         //std::cout<<filename<<std::endl;
00310         itembitmaps.clear();
00311         if(file.is_open())
00312         {       
00313                 bool add = false;
00314                 HistogramDialogComboBoxItem* item=NULL;
00315                 while(!file.eof())
00316                 {
00317                         std::string line;
00318                         std::getline(file,line);
00319                         //std::cout<<line<<std::endl;
00320             if( (int)(line.find("<ComboBoxItem>")!=-1))
00321                 {
00322                         item = new HistogramDialogComboBoxItem();
00323                 }else if((int)(line.find("<greyValue>"))!=-1) {
00324                         int pos1=line.find(">");
00325                         int pos2=line.find("<",pos1+1);
00326                         std::string x=line.substr(pos1+1,pos2-pos1-1);
00327                         gvtransfer=atof(x.c_str());                             
00328                         greyvecttransfunct.push_back(gvtransfer);
00329                 }else if((int)(line.find("<intensity>"))!=-1) {
00330                         int pos1=line.find(">");
00331                         int pos2=line.find("<",pos1+1);
00332                         std::string x=line.substr(pos1+1,pos2-pos1-1);
00333                         intensity=atof(x.c_str());                                      
00334                         value.push_back(intensity);
00335                 }
00336                 else if( (int)(line.find("<RGBgreyValue>"))!=-1)
00337                 {
00338                         int pos1=line.find(">");
00339                         int pos2=line.find("<",pos1+1);
00340                         std::string x=line.substr(pos1+1,pos2-pos1-1);
00341                         gv=atof(x.c_str());                             
00342                         greyvect.push_back(gv);                         
00343                 }
00344                 else if( (int)(line.find("<red>"))!=-1)
00345                 {
00346                         int pos1=line.find(">");
00347                         int pos2=line.find("<",pos1+1);
00348                         std::string x=line.substr(pos1+1,pos2-pos1-1);
00349                         red=atof(x.c_str());
00350                         redvect.push_back(red);                         
00351                 }
00352                 else if( (int)(line.find("<green>"))!=-1)
00353                 {
00354                         int pos1=line.find(">");
00355                         int pos2=line.find("<",pos1+1);
00356                         std::string x=line.substr(pos1+1,pos2-pos1-1);
00357                         gr=atof(x.c_str());
00358                         greenvect.push_back(gr);
00359                 }
00360                 else if( (int)(line.find("<blue>"))!=-1 )
00361                 {
00362                         int pos1=line.find(">");
00363                         int pos2=line.find("<",pos1+1);
00364                         std::string x=line.substr(pos1+1,pos2-pos1-1);
00365                         bl=atof(x.c_str());     
00366                         bluevect.push_back(bl);
00367                                 
00368                 }else if( (int)(line.find("</ComboBoxItem>"))!=-1 ) {
00369 
00370                         item->SetColors(greyvect,redvect,greenvect,bluevect);
00371                         item->SetTransferFunction(greyvecttransfunct,value);
00372                         /*for(int i = 0; i < greyvecttransfunct.size();i++){
00373                                         std::cout<<"HistogramDialogComboBox::OnLoadComboBoxData("<<greyvecttransfunct[i]<<std::endl;
00374                                         std::cout<<value[i]<<std::endl;
00375                         }
00376                         for(int i = 0; i < greyvect.size();i++){
00377                                         std::cout<<"HistogramDialogComboBox::OnLoadComboBoxData("<<greyvect[i]<<std::endl;
00378                                         std::cout<<redvect[i]<<std::endl;
00379                                         std::cout<<greenvect[i]<<std::endl;
00380                                         std::cout<<bluevect[i]<<std::endl;
00381                         }*/
00382                                 
00383                         itembitmaps.push_back(item);
00384 
00385                         greyvecttransfunct.clear();
00386                         value.clear();
00387                         greyvect.clear();
00388                         redvect.clear();
00389                         greenvect.clear();
00390                         bluevect.clear();
00391                 }
00392                 line.clear();
00393         }
00394         file.close();                   
00395         //std::cout<<itembitmaps.size()<<std::endl;
00396      }          
00397 }

Here is the call graph for this function:

Here is the caller graph for this function:

void HistogramDialogComboBox::OnWindowLevelChanged ( wxCommandEvent &  event  ) 

Definition at line 106 of file HistogramDialogComboBox.cxx.

References _sliderwindowlevel.

Referenced by getSlidersWlCo().

00107 {
00108    _sliderwindowlevel->GetValue();
00109    wxCommandEvent newevent(wxEVT_SCROLL_THUMBTRACK,this->GetId());
00110    ProcessEvent(newevent);
00111 }

Here is the caller graph for this function:

void HistogramDialogComboBox::saveCurrentConfiguration ( std::vector< HistogramDialogComboBoxItem * > &  itembitmaps,
std::string  filename 
) [private]

Definition at line 181 of file HistogramDialogComboBox.cxx.

References HistogramDialogComboBoxItem::getBlueVector(), HistogramDialogComboBoxItem::getGreenVector(), HistogramDialogComboBoxItem::getGreyVector(), HistogramDialogComboBoxItem::getGreyVectorTransfer(), HistogramDialogComboBoxItem::getRedVector(), and HistogramDialogComboBoxItem::getValueVector().

Referenced by OnEditBitmapCombo().

00182 {
00183         std::ofstream file;     
00184         file.open(  (const char*) (filename.c_str()) ); 
00185         double gv=-1,red=-1,gr=-1,bl=-1;
00186         int in=-1;
00187 
00188         if(file.is_open())
00189         {
00190                 file << "<ComboBoxData>" << std::endl;
00191                 for(int i = 0; i < itembitmaps.size();i++)
00192                 {
00193                         HistogramDialogComboBoxItem* item = itembitmaps[i];
00194                         std::vector<double> vecttransfer = item->getGreyVectorTransfer();
00195                         std::vector<double> value = item->getValueVector();
00196 
00197                         file << " <ComboBoxItem>"<< std::endl;
00198                         for(int j = 0; j < vecttransfer.size();j++)
00199                         {
00200                                 if(j==0){
00201                                         file << " <TransferenceFunction>"<< std::endl;
00202                                 }
00203                                 file << "               <Transferencepoint>" << std::endl;                              
00204                                 file << "                       <greyValue>" << vecttransfer[j] << "</greyValue>" <<std::endl;                          
00205                                 file << "                       <intensity>" << value[j] << "</intensity> "<<std::endl;
00206                                 file << "               </Transferencepoint>" << std::endl;
00207                                 if(j==vecttransfer.size()-1){
00208                     file << " </TransferenceFunction>"<< std::endl;
00209                                 }
00210                         }
00211                         std::vector<double> greyv = item->getGreyVector();
00212                         std::vector<double> red = item->getRedVector();
00213                         std::vector<double> green = item->getGreenVector();
00214                         std::vector<double> blue = item->getBlueVector();
00215                         for(int j = 0; j < greyv.size();j++)
00216                         {                                                       
00217                                 if(j==0){
00218                                         file << "       <Colors>" << std::endl;
00219                                 }
00220                                 file << "               <greyValueRGBpoint>" << std::endl;
00221                                 file << "                       <RGBgreyValue>" << greyv[j] << "</RGBgreyValue>" <<std::endl;
00222                                 file << "                       <red>" << red[j] << "</red>" <<std::endl;
00223                                 file << "                       <green>" << green[j] << "</green>" <<std::endl;
00224                                 file << "                       <blue>" << blue[j] << "</blue>" <<std::endl;
00225                                 file << "               </greyValueRGBpoint>" << std::endl;     
00226                                 if(j==greyv.size()-1){
00227                                         file << "       </Colors>" << std::endl;
00228                                 }
00229                         }
00230                         file << "       </ComboBoxItem>"<< std::endl;           
00231                 }
00232                 file << "</ComboBoxData>" << std::endl; 
00233         }
00234         file.close();
00235 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 37 of file HistogramDialogComboBox.cxx.

References _bluevect, _greenvect, _greyvect, and _redvect.

00038 {
00039         _greyvect       = greyvect;
00040         _redvect        = redvect;
00041         _greenvect      = greenvect;
00042         _bluevect       = bluevect;     
00043 }

void HistogramDialogComboBox::setImageData ( vtkImageData *  img  ) 

Definition at line 113 of file HistogramDialogComboBox.cxx.

References _img, _maxgreyvalue, and setSlidersValue().

Referenced by wxMaracasMultipleVolumeRendererPanel::createControls().

00114 {
00115    _maxgreyvalue = img->GetScalarRange()[1];
00116    _img = img;
00117    setSlidersValue();
00118 }

Here is the call graph for this function:

Here is the caller graph for this function:

void HistogramDialogComboBox::setSlidersValue (  )  [private]

Definition at line 120 of file HistogramDialogComboBox.cxx.

References _img, _slidercolor, and _sliderwindowlevel.

Referenced by setImageData().

00121 {
00122         if(_img!=NULL){
00123                 if(_slidercolor!=NULL){
00124                         _slidercolor->SetRange(_img->GetScalarRange()[0],_img->GetScalarRange()[1]);
00125                         _slidercolor->SetValue((_img->GetScalarRange()[0]+_img->GetScalarRange()[1])/2);
00126                 }
00127                 if(_sliderwindowlevel!=NULL){
00128                         _sliderwindowlevel->SetRange(_img->GetScalarRange()[0],_img->GetScalarRange()[1]);
00129                         _sliderwindowlevel->SetValue((_img->GetScalarRange()[0]+_img->GetScalarRange()[1])/2);
00130                 }
00131         }
00132 }

Here is the caller graph for this function:


Member Data Documentation

wxBitmapComboBox* HistogramDialogComboBox::_bitmapcombo [private]
std::vector<double> HistogramDialogComboBox::_bluevect [private]

Definition at line 83 of file HistogramDialogComboBox.h.

Referenced by HistogramDialogComboBox(), and OnBitmapComboItemSelected().

std::vector<double> HistogramDialogComboBox::_greenvect [private]
std::vector<double> HistogramDialogComboBox::_greyvect [private]
std::vector<double> HistogramDialogComboBox::_greyvecttransfer [private]

Definition at line 79 of file HistogramDialogComboBox.h.

Referenced by GetValuesPointsFunction(), and OnBitmapComboItemSelected().

vtkImageData* HistogramDialogComboBox::_img [private]
std::vector<double> HistogramDialogComboBox::_redvect [private]
std::vector<double> HistogramDialogComboBox::_value [private]

Definition at line 80 of file HistogramDialogComboBox.h.

Referenced by GetValuesPointsFunction(), and OnBitmapComboItemSelected().

Definition at line 93 of file HistogramDialogComboBox.h.

Referenced by HistogramDialogComboBox().


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

Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1