sizerirmprop->Add(checkbox,wxFIXED_MINSIZE);
- wxBitmap bitmap(Color_xpm);
- _colorchoose = new wxBitmapButton(this, -1, bitmap,wxDefaultPosition,wxSize(30,30));
- Connect(_colorchoose->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onColorChange);
- sizerirmprop->Add(_colorchoose,wxFIXED_MINSIZE);
+ //wxBitmap bitmap(Color_xpm);
+ //_colorchoose = new wxBitmapButton(this, -1, bitmap,wxDefaultPosition,wxSize(30,30));
+ //Connect(_colorchoose->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onColorChange);
+
+ mwxwidget = new HistogramDialogComboBox(this);
+ mwxwidget->setImageData(img);
+ //mwxwidget->PushEventHandler(this);
+ Connect(mwxwidget->GetId(), wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onColorChange);
+ sizerirmprop->Add(mwxwidget,wxFIXED_MINSIZE);
this->SetSizer(sizerirmprop, true);
Connect(button3->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onUpdate); */
- mwxwidget = new HistogramDialog(this, _T("Color Transfer Function"));
- mwxwidget->initializeHistogram(img);
+
- mwxwidget->erasePointsTransferenceFunction();
+ /*mwxwidget->erasePointsTransferenceFunction();
double range[2];
img->GetScalarRange(range);
double max = range[1];
- /*
- adding the poinst of the transference function
- */
+
//X
mwxwidget->addPointToTransferenceFunction(max * 0/2,0.0);
mwxwidget->addPointToTransferenceFunction(max * 1/2,100.0);
mwxwidget->addColorPoint(max*1/4,(int)(1.0*255),(int)(0.0*255),(int)(0.0*255));
mwxwidget->addColorPoint(max*2/4,(int)(0.0*255),(int)(0.0*255),(int)(1.0*255));
mwxwidget->addColorPoint(max*3/4,(int)(0.0*255),(int)(1.0*255),(int)(0.0*255));
- mwxwidget->addColorPoint(max*4/4,(int)(0.0*255),(int)(0.0*255),(int)(0.2*255));
+ mwxwidget->addColorPoint(max*4/4,(int)(0.0*255),(int)(0.0*255),(int)(0.2*255)); */
/*wxBoxSizer* boxSizer0 = new wxBoxSizer(wxHORIZONTAL);
boxSizer0->Add(mwxwidget, 4, wxGROW);
_frame->Refresh();
_frame->Update();*/
- mwxwidget->SetFunctions(wxMaracasMultipleVolumeRendererView::getInstance()->GetTransferFunction(getPropId()),
- wxMaracasMultipleVolumeRendererView::getInstance()->GetColorFunction(getPropId()));
+ //mwxwidget->SetFunctions(wxMaracasMultipleVolumeRendererView::getInstance()->GetTransferFunction(getPropId()),
+ // wxMaracasMultipleVolumeRendererView::getInstance()->GetColorFunction(getPropId()));
mwxwidget->Refresh();
}
void wxMaracasMultipleVolumeRendererPanel::onOK(wxCommandEvent& event){
}
void wxMaracasMultipleVolumeRendererPanel::onColorChange(wxCommandEvent& event){
- if(mwxwidget->ShowModal()==wxID_OK){
+ //if(mwxwidget->ShowModal()==wxID_OK){
updateVolume();
- mwxwidget->Show(false);
- }
+ // mwxwidget->Show(false);
+ //}
}
void wxMaracasMultipleVolumeRendererPanel::onCheckBoxChange(wxCommandEvent& event){
wxMaracasMultipleVolumeRendererView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());