1 #include "HistogramDialog.h"
4 #include "OpenImage.xpm"
10 #include "creaSystem.h"
14 // IMPLEMENT_CLASS(HistogramDialog, wxDialog)
24 //-------------------------
26 //-------------------------
27 HistogramDialog::HistogramDialog(wxWindow *parent,wxString title,vtkImageData* imageData,bool extracontrols)
28 :wxDialog(parent,-1,title,wxDefaultPosition,wxDefaultSize,wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE ,_T("dialogBox"))
31 initializeHistogramDialog(extracontrols);
32 initializeHistogram(imageData);
36 HistogramDialog::HistogramDialog(wxWindow *parent,wxString title,bool extracontrols)
37 :wxDialog(parent,-1,title,wxDefaultPosition,wxDefaultSize,wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE ,_T("dialogBox")){
39 initializeHistogramDialog(extracontrols);
41 HistogramDialog::~HistogramDialog(){
45 void HistogramDialog::initializeHistogramDialog(bool extracontrols){
46 _currentcolorselectedbitmap = -1;
49 _panextracontrols=NULL;
52 SetBackgroundColour(wxColour(255,255,255));
56 //wxvtkmpr3Dview=NULL;
57 //wxvtkclipping3Dview=NULL;
63 histogramW=new HistogramWidget(this, -1);
68 wxBitmap bitmap0(Ok_xpm);
69 okBtn = new wxBitmapButton(this, wxID_OK, bitmap0,wxDefaultPosition,wxDefaultSize);
71 wxBitmap bitmap1(Cancel_xpm);
72 cancelBtn = new wxBitmapButton(this, wxID_CANCEL, bitmap1,wxDefaultPosition,wxDefaultSize);
74 //saveDataBtn = new wxButton(this,ID_SAVE,_T("Save"));
75 //loadDataBtn = new wxButton(this,ID_LOAD,_T("Load"));
76 //refreshBtn = new wxButton(this,ID_REFRESH,_T("Refresh"));
78 //Connect(saveDataBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &HistogramDialog::OnSaveData );
79 //Connect(loadDataBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &HistogramDialog::OnLoadData );
80 //Connect(refreshBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &HistogramDialog::OnRefreshBtn );
87 wxBoxSizer * upper_box = new wxBoxSizer( wxHORIZONTAL );
88 //Including components for plotter control
90 upper_box->Add( histogramW, 4, wxGROW);
91 upper_box->Add( getControls(extracontrols),wxSizerFlags().Center() );
94 wxBoxSizer *bottomBox = new wxBoxSizer( wxHORIZONTAL );
95 bottomBox->Add( okBtn, wxSizerFlags().Center());
96 bottomBox->AddSpacer(40);
97 //bottomBox->Add( saveDataBtn,wxSizerFlags().Center() );
98 //bottomBox->AddSpacer(40);
99 //bottomBox->Add( loadDataBtn,wxSizerFlags().Center() );
100 //bottomBox->AddSpacer(40);
101 //bottomBox->Add( refreshBtn,wxSizerFlags().Center() );
102 //bottomBox->AddSpacer(40);
103 bottomBox->Add( cancelBtn,wxSizerFlags().Center() );
106 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
107 sizer->Add(upper_box,1,wxEXPAND);
108 sizer->Add(bottomBox,0,wxCENTER);
109 SetAutoLayout( TRUE );
111 SetBestSize(wxSize(600,600));
113 wxPanel* HistogramDialog::getPanExtraControls(){
114 wxBoxSizer* sizer0 = new wxBoxSizer(wxVERTICAL);
115 _panextracontrols = new wxPanel(this);
117 _panextracontrols->SetSizer(sizer0);
118 _panextracontrols->SetAutoLayout(true);
120 return _panextracontrols;
123 ** Set to true in the constructor
125 void HistogramDialog::setInfoPanExtraControls(std::vector<HistogramDialogComboBoxItem*> comboitems){
126 _comboitems = comboitems;
127 if(_panextracontrols!=NULL){
128 _panextracontrols->Show(false);
129 for(int i=0; i < comboitems.size();i++){
131 wxBitmap bitmap = comboitems[i]->GetBitmap();
134 _panextracontrols->GetSizer()->Add(getBitmapButtonDelete(bitmap),wxSizerFlags().Center());
135 _panextracontrols->GetSizer()->AddSpacer(5);
139 wxButton* button = new wxButton(_panextracontrols,wxID_ANY);
140 button->SetToolTip(wxString("Add the current color to the list of predefined",wxConvUTF8));
141 button->SetLabel(wxString(_T("Add")));
142 Connect(button->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&HistogramDialog::OnEditColorsCombo);
143 _panextracontrols->GetSizer()->Add(button);
144 _panextracontrols->Layout();
145 _panextracontrols->Refresh();
146 _panextracontrols->Show(true);
152 wxSizer* HistogramDialog::getBitmapButtonDelete(wxBitmap bitmap){
153 //wxCheckBox* checkbox = new wxCheckBox(_panextracontrols,wxID_ANY,_T(""));
154 wxBitmap bitmap0(Delete_xpm);
155 wxBitmapButton* deletebutton = new wxBitmapButton(_panextracontrols,wxID_ANY,bitmap0,wxDefaultPosition,wxSize(20,20));
156 deletebutton->SetToolTip(wxString("Delete the color from the list",wxConvUTF8));
157 Connect(deletebutton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&HistogramDialog::OnDeleteColor);
158 _deletebuttonsvector.push_back(deletebutton);
160 //wxBitmap bitmap0(OpenImage_xpm);
161 wxBitmapButton* button = new wxBitmapButton(_panextracontrols,wxID_ANY,bitmap,wxDefaultPosition,wxSize(30,30));
162 button->SetToolTip(wxString("Load the current color configuration.",wxConvUTF8));
163 bitmapbuttonsvect.push_back(button);
164 Connect(button->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&HistogramDialog::OnEditColorsCombo);
167 s.Printf(_T("%d"),i);*/
169 //button->SetBitmapLabel(comboitems[i]->GetBitmap());
170 // wxStaticBitmap* button = new wxStaticBitmap(_panextracontrols,i,comboitems[i]->GetBitmap(),wxDefaultPosition,wxSize(30,30));
171 wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
172 sizer->Add(button,wxSizerFlags().Center());
174 sizer->Add(deletebutton,wxSizerFlags().Center());
177 void HistogramDialog::OnDeleteColor(wxCommandEvent& event){
178 for(int i = 0; i < _deletebuttonsvector.size();i++){
179 if(event.GetId()==_deletebuttonsvector[i]->GetId()){
180 _currentcolorselectedbitmap = -1;
181 //this->eraseColorPoints();
182 //this->erasePointsTransferenceFunction();
183 HistogramDialogComboBoxItem* temp;
184 temp = _comboitems[i];
185 _deletebuttonsvector[i]->Hide();
186 bitmapbuttonsvect[i]->Hide();
189 _panextracontrols->GetSizer()->Remove(i*2);
191 _panextracontrols->GetSizer()->Remove(i*2);
192 for(int k = i; k < _comboitems.size()-1;k++){
193 _comboitems[k] = _comboitems[k+1];
194 _deletebuttonsvector[k] = _deletebuttonsvector[k+1];
195 bitmapbuttonsvect[k] = bitmapbuttonsvect[k+1];
197 _comboitems.pop_back();
198 _deletebuttonsvector.pop_back();
199 bitmapbuttonsvect.pop_back();
202 _panextracontrols->Layout();
204 void HistogramDialog::OnEditColorsCombo(wxCommandEvent& event){
205 bool loadconfig = false;
206 UpdateCurrentComboElement();
207 for(int i = 0; i < bitmapbuttonsvect.size();i++){
208 if(event.GetId()==bitmapbuttonsvect[i]->GetId()){
209 if(i<_comboitems.size()){
210 _currentcolorselectedbitmap = i;
212 HistogramDialogComboBoxItem* currentconfig = _comboitems[i];
213 std::vector<double> greyvect = currentconfig->getGreyVector();
214 std::vector<double> _redvect = currentconfig->getRedVector();
215 std::vector<double> _greenvect = currentconfig->getGreenVector();
216 std::vector<double> _bluevect= currentconfig->getBlueVector();
217 this->eraseColorPoints();
218 this->erasePointsTransferenceFunction();
219 for(int i = 0; i < currentconfig->getGreyVector().size();i++){
220 double greyv = currentconfig->getGreyVector()[i];
221 double red = currentconfig->getRedVector()[i];
222 double green = currentconfig->getGreenVector()[i];
223 double blue = currentconfig->getBlueVector()[i];
225 this->addColorPoint(greyv*_maxgreyvalue, red*255.0, green*255.0, blue*255.0);
227 for(int i = 0; i < currentconfig->getGreyVectorTransfer().size();i++){
228 double greyv = currentconfig->getGreyVectorTransfer()[i];
229 double value = currentconfig->getValueVector()[i];
230 std::cout<<"void HistogramDialog::OnEditColorsCombo(wxCommandEvent& event){"<<greyv<<" "<<value<<std::endl;
231 this->addPointToTransferenceFunction(greyv*_maxgreyvalue, value*100);
237 AddNewBitmapButton();
240 _panextracontrols->Layout();
244 void HistogramDialog::UpdateCurrentComboElement(){
245 if(_currentcolorselectedbitmap >= 0 && _currentcolorselectedbitmap < _comboitems.size()){
246 setCurrentColorConfigurationIntoButton();
249 void HistogramDialog::AddNewBitmapButton(){
250 this->eraseColorPoints();
251 this->erasePointsTransferenceFunction();
252 HistogramDialogComboBoxItem* boxitem = new HistogramDialogComboBoxItem();
253 wxBitmap bitmap = boxitem->GetBitmap();
254 wxSizer* sizer = getBitmapButtonDelete(bitmap);
255 _panextracontrols->GetSizer()->Insert(_comboitems.size()*2,sizer,wxSizerFlags().Center());
256 _panextracontrols->GetSizer()->InsertSpacer(_comboitems.size()*2+1,5);
257 _comboitems.push_back(boxitem);
258 _currentcolorselectedbitmap = _comboitems.size()-1;
260 void HistogramDialog::setCurrentColorConfigurationIntoButton(){
262 std::vector<double> greylevel;
263 std::vector<double> red;
264 std::vector<double> green;
265 std::vector<double> blue;
266 std::vector<double> red0;
267 std::vector<double> green0;
268 std::vector<double> blue0;
269 GetValuesColorPointsFunction(greylevel,red,green,blue);
271 for(int i = 0;i< greylevel.size();i++){
272 greylevel[i] = greylevel[i]/_maxgreyvalue;
273 /*std::cout<<"HistogramDialog::setCurrentColorConfigurationIntoButton(){red"<<red[i]<<std::endl;
274 std::cout<<"HistogramDialog::setCurrentColorConfigurationIntoButton(){green"<<green[i]<<std::endl;
275 std::cout<<"HistogramDialog::setCurrentColorConfigurationIntoButton(){blue"<<blue[i]<<std::endl;*/
276 red0.push_back(red[i]);
277 green0.push_back(green[i]);
278 blue0.push_back(blue[i]);
279 /*std::cout<<"HistogramDialog::setCurrentColorConfigurationIntoButton(){red"<<red0[i]<<std::endl;
280 std::cout<<"HistogramDialog::setCurrentColorConfigurationIntoButton(){green"<<green0[i]<<std::endl;
281 std::cout<<"HistogramDialog::setCurrentColorConfigurationIntoButton(){blue"<<blue0[i]<<std::endl;*/
284 std::vector<double> greylevel1;
285 std::vector<double> value;
286 this->GetValuesPointsFunction(greylevel1,value);
288 for(int i = 0;i< greylevel1.size();i++){
289 greylevel1[i] = greylevel1[i]/_maxgreyvalue;
291 std::cout<<"void HistogramDialog::setCurrentColorConfigurationIntoButton(){"<<greylevel1[i]<<std::endl;
292 std::cout<<"void HistogramDialog::setCurrentColorConfigurationIntoButton(){"<<value[i]<<std::endl;
294 if(_currentcolorselectedbitmap >= 0 && _currentcolorselectedbitmap < _comboitems.size()){
295 _comboitems[_currentcolorselectedbitmap]->SetColors(greylevel,red0,green0,blue0);
296 _comboitems[_currentcolorselectedbitmap]->SetTransferFunction(greylevel1,value);
297 bitmapbuttonsvect[_currentcolorselectedbitmap]->SetBitmapLabel(_comboitems[_currentcolorselectedbitmap]->GetBitmap());
301 wxSizer* HistogramDialog::getControls(bool extracontrols){
303 wxSizer* sizer = new wxBoxSizer(wxVERTICAL);
305 wxBitmap bitmap0(OpenImage_xpm);
306 wxBitmapButton* opendata = new wxBitmapButton(this, -1, bitmap0,wxDefaultPosition,wxSize(30,30));
307 Connect(opendata->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&HistogramDialog::OnLoadData);
308 sizer->Add(opendata,wxSizerFlags().Center());
313 wxBitmap bitmap1(Save_xpm);
314 wxBitmapButton* savedata = new wxBitmapButton(this, -1, bitmap1,wxDefaultPosition,wxSize(30,30));
315 Connect(savedata->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&HistogramDialog::OnSaveData);
316 sizer->Add(savedata,wxSizerFlags().Center());
320 sizer->Add(getPanExtraControls(),wxSizerFlags().Center());
322 //sizer->Add(getBitmapCombo(),wxSizerFlags().Center());
331 //-----------------------
333 //-----------------------
335 void HistogramDialog::OnSaveData(wxCommandEvent& event)
337 wxString nameF=wxFileSelector(_T("Save Data"), _T(" "),_T(""),_T(""),_T("*.*"),wxSAVE, NULL, -1, -1);//wxFileSelector(_T("Save Data"),wxSAVE);
339 if(nameF.CompareTo( _T("/0") )>0)
340 file.open( (const char*)(nameF.mb_str()) );
344 file << "<histogram Data>" << std::endl;
347 file << " <histogramPoints>" << std::endl;
348 int histogramS=histogramW->getHistogramSize();
352 file << " <HistogramPoint>" << std::endl;
353 file << " <greyValue>" << i << "</greyValue>" <<std::endl;
354 file << " <number>" << histogramW->getHistogramPoint(i) << "</number>"<<std::endl;
355 file << " </HistogramPoint>" << std::endl;
358 file << " </histogramPoints>" << std::endl;
360 //points transference Function
361 file << " <TransferenceFunction>"<< std::endl;
362 int tfPointS=histogramW->getSizeTransferenceFunction();
368 histogramW->getTransferenceFunctionPoint(i,gv,in);
369 file << " <Transferencepoint>" << std::endl;
370 file << " <greyValue>" << gv << "</greyValue>" <<std::endl;
371 file << " <intensity>" << in << "</intensity> "<<std::endl;
372 file << " </Transferencepoint>" << std::endl;
375 file << " </TransferenceFunction>"<< std::endl;
377 file << " <Colors>"<< std::endl;
378 int ctfPointS=histogramW->getSizeBarColor();
385 histogramW->getDataBarColorPoint(i,gv,red,green,blue);
386 file << " <greyValueRGBpoint>" << std::endl;
387 file << " <RGBgreyValue>" << gv << "</RGBgreyValue>" <<std::endl;
388 file << " <red>" << red << "</red>" <<std::endl;
389 file << " <green>" << green << "</green>" <<std::endl;
390 file << " <blue>" << blue << "</blue>" <<std::endl;
391 file << " </greyValueRGBpoint>" << std::endl;
395 file << " </Colors>"<< std::endl;
396 file << "</histogram Data>" << std::endl;
401 void HistogramDialog::OnLoadData(wxCommandEvent& event)
403 wxString nameF=wxFileSelector(_T("Load Data") );
406 if(nameF.CompareTo( _T("/0") )>0)
407 file.open( (const char*) (nameF.mb_str()) );
409 bool histogramReading=false,/*histogramPoints=false,histogramPoint=false,*/tf=false,ctf=false,tfp=false,ctfp=false; // JPRx
410 int gv=-1,in=-1,red=-1,gr=-1,bl=-1/*,nPoints=-1*/; // JPRx
414 erasePointsTransferenceFunction();
418 //std::getline(file,line);
423 std::getline(file,line);
424 //int a=line.find("histogram Data");
425 if( (int)(line.find("histogram Data"))!=-1)
427 histogramReading=true;
431 else if(line.find("histogramPoints")!=0 && histogramReading)
433 histogramPoints=true;
435 else if(line.find("histogramPoint")!=0 && histogramReading && histogramPoints)
439 else if(line.find("greyValue")!=0 && histogramReading && histogramPoints)
441 int pos1=line.find(">");
442 int pos2=line.find("<",pos+1);
443 std::string x=line.substr(pos1+1,pos2-1);
446 else if(line.find("number")!=0 && histogramReading && histogramPoints)
448 int pos1=line.find(">");
449 int pos2=line.find("<",pos+1);
450 std::string x=line.substr(pos1+1,pos2-1);
452 //add to the histogram
453 //histogramW->addPointToTransferenceFunction(gc,in);
456 else if( (int)(line.find("TransferenceFunction"))!=-1 && histogramReading)
460 else if( (int)(line.find("<Transferencepoint>"))!=-1 && histogramReading && tf)
464 else if( (int)(line.find("greyValue"))!=-1 && histogramReading && tf && tfp)
466 int pos1=line.find(">");
467 int pos2=line.find("<",pos1+1);
468 std::string x=line.substr(pos1+1,pos2-pos1-1);
472 else if( (int)(line.find("intensity"))!=-1 && histogramReading && tf && tfp)
474 int pos1=line.find(">");
475 int pos2=line.find("<",pos1+1);
476 std::string x=line.substr(pos1+1,pos2-pos1-1);
478 histogramW->addPointToTransferenceFunction(gv,in);
482 else if( (int)(line.find("Colors"))!=-1 && histogramReading)
487 else if( (int)(line.find("greyValueRGBpoint"))!=-1 && histogramReading && ctf )
492 else if( (int)(line.find("RGBgreyValue"))!=-1 && histogramReading && ctf && ctfp)
494 int pos1=line.find(">");
495 int pos2=line.find("<",pos1+1);
496 std::string x=line.substr(pos1+1,pos2-pos1-1);
500 else if( (int)(line.find("red"))!=-1 && histogramReading && ctf && ctfp)
502 int pos1=line.find(">");
503 int pos2=line.find("<",pos1+1);
504 std::string x=line.substr(pos1+1,pos2-pos1-1);
508 else if( (int)(line.find("green"))!=-1 && histogramReading && ctf && ctfp)
510 int pos1=line.find(">");
511 int pos2=line.find("<",pos1+1);
512 std::string x=line.substr(pos1+1,pos2-pos1-1);
515 else if( (int)(line.find("blue"))!=-1 && histogramReading && ctf && ctfp)
517 int pos1=line.find(">");
518 int pos2=line.find("<",pos1+1);
519 std::string x=line.substr(pos1+1,pos2-pos1-1);
521 histogramW->addColorPoint(gv,red,gr,bl);
529 histogramW->updatePlotter();
535 void HistogramDialog::OnRefreshBtn(wxCommandEvent &event)
541 // -- TransferenceFunction --
542 int nPointsTF=getSizeTransferenceFunction();
547 int nTFPoints=getSizeTransferenceFunction();
551 getTransferenceFunctionPoint(i,xi,yi);
552 _tfun->AddPoint( xi , yi/100.0 );
558 int nPointsCTF=getSizeBarColor();
561 _ctfun->RemoveAllPoints();
563 int nCTFpoints=getSizeBarColor();
567 getDataBarColorPoint(i,xi,r,g,b);
568 _ctfun->AddRGBPoint(xi,r/255.0,g/255.0,b/255.0 );
576 NOTE I NEED THE UPDATE
578 //if it was call from the clipping ctnrl panel
579 //if(wxvtkclipping3Dview!=NULL)
581 // wxvtkclipping3Dview->Refresh();
584 //else if(wxvtkmpr3Dview!=NULL)
586 // wxvtkmpr3Dview->Refresh();
592 //-----------------------
594 //-----------------------
597 get number of points of the transference function
599 int HistogramDialog::getSizeTransferenceFunction()
601 return histogramW->getSizeTransferenceFunction();
605 get number of points of the barColor
607 int HistogramDialog::getSizeBarColor()
609 return histogramW->getSizeBarColor();
612 get a point of the transference function
614 void HistogramDialog::getTransferenceFunctionPoint(int index,int& x,int& y)
616 histogramW->getTransferenceFunctionPoint(index,x,y);
619 get a color int the bqr color
621 void HistogramDialog::getDataBarColorPoint(int index,int&x, int& red,int& green,int& blue)
623 histogramW->getDataBarColorPoint(index,x,red,green,blue);
626 get a point of the Histogram
629 int HistogramDialog::getHistogramPoint(int gValue)
631 return histogramW->getHistogramPoint(gValue);
634 //--------------------
636 //---------------------
638 Get the porcentage of the positions of
639 the min,max and actual in the bar range
641 float HistogramDialog::getMaxShowedPorcentage()
643 return histogramW->getMaxShowedPorcentage();
645 float HistogramDialog::getMinShowedPorcentage()
647 return histogramW->getMinShowedPorcentage();
649 float HistogramDialog::getActualShowedPorcentage()
651 return histogramW->getActualShowedPorcentage();
653 //---------------------------------------
654 // setting data in transferences function
656 //----------------------------------------
657 bool HistogramDialog::addPointToTransferenceFunction(double x, double y)
659 return histogramW->addPointToTransferenceFunction(x,y);
661 bool HistogramDialog::addColorPoint(double x,int red,int green, int blue)
663 return histogramW->addColorPoint(x,red,green,blue);
665 //------------------------
667 //------------------------
670 Erase all the points that are in the transference function
672 void HistogramDialog::erasePointsTransferenceFunction()
674 histogramW->erasePointsTransferenceFunction();
677 Erase the color points in the plotter
679 void HistogramDialog::eraseColorPoints()
681 histogramW->eraseColorPoints();
684 //-------------------
685 // Getter and setters
686 //-------------------
688 void HistogramDialog::setCTF(vtkColorTransferFunction *cf)
693 void HistogramDialog:: setTF(vtkPiecewiseFunction *tf)
698 bool HistogramDialog::getRefreshed()
703 void HistogramDialog::setVolumeMapper(vtkVolumeRayCastMapper* volMapper)
705 volumeMapper=volMapper;
707 void HistogramDialog::setVolume(vtkVolume* vol)
711 //void HistogramDialog::setMPR3Dview(wxVtkMPR3DView *wxvtkmpr3Dview1)
713 // wxvtkmpr3Dview=wxvtkmpr3Dview1;
715 //void HistogramDialog::setClipping3DView(wxVtkClipping3DView *wxvtkclipping3Dview1)
717 // wxvtkclipping3Dview=wxvtkclipping3Dview1;
721 void HistogramDialog::setTransferenceFunctionHasPoints(bool hasPoints)
723 histogramW->setTransferenceFunctionHasPoints(hasPoints);
725 void HistogramDialog::setTransferenceFunctionHasColor(bool hasColorPoints)
727 histogramW->setTransferenceFunctionHasColor(hasColorPoints);
730 //--------------------
731 // plotter Information
732 //---------------------
733 void HistogramDialog::updatePlotter()
735 histogramW->updatePlotter();
740 ** Initialize the histogram
742 void HistogramDialog::initializeHistogram(vtkImageData* img){
743 _maxgreyvalue = img->GetScalarRange()[1];
744 histogramW->initializeHistogram(img);
747 ** Returns two vectors, the grey level of the point and its value, the value is between [0,1]
749 void HistogramDialog::GetValuesPointsFunction(std::vector<double>& greylevel,std::vector<double>& value){
751 histogramW->GetValuesPointsFunction(greylevel, value);
755 ** Returns two vectors, the grey level of the point and its value, the red, green
756 ** and blue value is between [0,1]
758 void HistogramDialog::GetValuesColorPointsFunction(std::vector<double>& greylevel,
759 std::vector<double>& red,
760 std::vector<double>& green,
761 std::vector<double>& blue)
763 histogramW->GetValuesColorPointsFunction(greylevel, red, green, blue);
766 void HistogramDialog::SetFunctions(vtkPiecewiseFunction* _opac, vtkColorTransferFunction* _color){