BBTK_BLACK_BOX_IMPLEMENTATION(RenderingViewer,bbtk::WxBlackBox);
void RenderingViewer::Process()
{
-
wxMaracasRendererView* view = (wxMaracasRendererView*)bbGetOutputWidget();
vtkImageData* _img1 = bbGetInputIn1();
vtkImageData* _img2 = bbGetInputIn2();
vtkImageData* _img3 = bbGetInputIn3();
vtkImageData* _img4 = bbGetInputIn4();
vtkRenderer* renderer = bbGetInputRenderer();
+ //vtkRenderer* rendererSA = bbGetInputRendererSA();
+ //vtkRenderer* rendererSB = bbGetInputRendererSB();
+ //vtkRenderer* rendererSC = bbGetInputRendererSC();
- if(view!=NULL)
+ if(view != NULL)
{
- if(renderer!=NULL&&_currentrenderer != renderer)
+ if(renderer != NULL && _currentrenderer != renderer)
{
- view->setRenderer(renderer);
+ view->setRenderer(renderer/*, rendererSA, rendererSB, rendererSC*/);
_currentrenderer = renderer;
+ //_currentrendererSA = rendererSA;
+ //_currentrendererSB = rendererSB;
+ //_currentrendererSC = rendererSC;
}
- if(_currentrenderer!=NULL)
+ if(_currentrenderer!=NULL /*&& _currentrendererSA!=NULL && _currentrendererSB!=NULL && _currentrendererSC!=NULL*/)
{
if(_img1 !=NULL)
{
if(_img2 !=NULL)
{
((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addVolume(_img2, "INPUT 2");
+ ((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addSurface1(_img2, "INPUT 2");
+ ((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addSurface2(_img2, "INPUT 2");
+ ((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addSurface3(_img2, "INPUT 2");
}
if(_img3 !=NULL)
{
((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addVolume(_img3, "INPUT 3");
+ ((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addSurface1(_img3, "INPUT 3");
+ ((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addSurface2(_img3, "INPUT 3");
+ ((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addSurface3(_img3, "INPUT 3");
}
if(_img4 !=NULL)
{
((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addVolume(_img4, "INPUT 4");
+ ((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addSurface1(_img4, "INPUT 4");
+ ((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addSurface2(_img4, "INPUT 4");
+ ((wxMaracasRenderTabbedPanel*)view->getTabbedPanel())->addSurface3(_img4, "INPUT 4");
}
}
}
BBTK_BLACK_BOX_INTERFACE(RenderingViewer,bbtk::WxBlackBox);
//BBTK_DECLARE_INPUT(Title,std::string);
BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
+ //BBTK_DECLARE_INPUT(RendererSA,vtkRenderer*);
+ //BBTK_DECLARE_INPUT(RendererSB,vtkRenderer*);
+ //BBTK_DECLARE_INPUT(RendererSC,vtkRenderer*);
BBTK_DECLARE_INPUT(In1,vtkImageData*);
BBTK_DECLARE_INPUT(In2,vtkImageData*);
BBTK_DECLARE_INPUT(In3,vtkImageData*);
BBTK_DESCRIPTION("Complex box which gathers VolumeRendering and SurfaceRendering funtionalities");
BBTK_CATEGORY("__CategoryBlackBox__");
//BBTK_INPUT(RenderingViewer,Title,"Title prepended to the text",std::string,"");
-BBTK_INPUT(RenderingViewer,Renderer,"Renderer to show image" ,vtkRenderer*, "");
+BBTK_INPUT(RenderingViewer,Renderer,"Renderer to show volume rendering image" ,vtkRenderer*, "");
+//BBTK_INPUT(RenderingViewer,RendererSA,"Renderer to show surface rendering image" ,vtkRenderer*, "");
+//BBTK_INPUT(RenderingViewer,RendererSB,"Renderer to show surface rendering image" ,vtkRenderer*, "");
+//BBTK_INPUT(RenderingViewer,RendererSC,"Renderer to show surface rendering image" ,vtkRenderer*, "");
BBTK_INPUT(RenderingViewer,In1,"Input image to the Rendering",vtkImageData*,"");
BBTK_INPUT(RenderingViewer,In2,"Input image to the Rendering",vtkImageData*,"");
BBTK_INPUT(RenderingViewer,In3,"Input image to the Rendering",vtkImageData*,"");
Program: wxMaracas
Module: $RCSfile: wxMaracasMultipleVolumeRendererManager.cxx,v $
Language: C++
- Date: $Date: 2009/07/20 10:06:12 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2009/10/30 20:06:07 $
+ Version: $Revision: 1.4 $
Copyright: (c) 2002, 2003
License:
/**
** Adds a prop3D to the manager and returns the identifier
**/
-int wxMaracasMultipleVolumeRendererManager::addVolume(vtkImageData* vol, std::string dataname) throw(char*){
+int wxMaracasMultipleVolumeRendererManager::addVolume(vtkImageData* vol, std::string dataname) throw(char*){
checkInvariant();
if(vol != NULL){
wxMaracasMultipleVolumeRendererManagerData* data = new wxMaracasMultipleVolumeRendererManagerData(vol, dataname);
Program: wxMaracas
Module: $RCSfile: wxMaracasMultipleVolumeRendererManager.h,v $
Language: C++
- Date: $Date: 2009/07/20 10:06:12 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2009/10/30 20:06:07 $
+ Version: $Revision: 1.4 $
Copyright: (c) 2002, 2003
License:
std::vector<double> blue);
/**
- ** Given an id search the data in the vector
+ ** Given an id search the data in the vector
**/
wxMaracasMultipleVolumeRendererManagerData* getViewData(int id)throw(char*);
/**
#include <wx/colordlg.h>
#include "wxMaracasMultipleVolumeRendererView.h"
+#include "wxMaracasRendererView.h"
#include <OpenImage.xpm>
+#include <Add.xpm>
#include "Color.xpm"
//#include <vtkImageCast.h>
/**
** Implementation of viewProp3D
**/
-wxMaracasMultipleVolumeRendererPanel::wxMaracasMultipleVolumeRendererPanel(wxWindow* parent,int propid, vtkImageData* img)
+/**
+** Class constructor
+**/
+wxMaracasMultipleVolumeRendererPanel::wxMaracasMultipleVolumeRendererPanel(wxWindow* parent,int propid, vtkImageData* img, bool _isComplexBox)
: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize)
{
_propid = propid;
+ isComplexBox = _isComplexBox;
createControls(img);
}
+/**
+** Class destructor
+**/
wxMaracasMultipleVolumeRendererPanel::~wxMaracasMultipleVolumeRendererPanel(){
- //wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
- wxMaracasMultipleVolumeRendererView::getInstance()->deleteVolume(_propid);
+
+ //if(isComplexBox)
+ //((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->deleteVolume(_propid);
+ //else
+ //wxMaracasMultipleVolumeRendererView::getInstance()->deleteVolume(_propid);
delete mwxwidget;
}
+/**
+** Sets panel elements
+**/
void wxMaracasMultipleVolumeRendererPanel::createControls(vtkImageData* img){
- wxFlexGridSizer* sizerirmprop = new wxFlexGridSizer(1,1,1);
-
- wxString choices[2];
- choices[0] = wxString(_T("On"));
- choices[1] = wxString(_T("Off"));
- checkbox = new wxCheckBox(this,-1,wxString(_T("Show Actor")));
- Connect(checkbox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onCheckBoxChange);
- checkbox->SetValue(true);
-
- sizerirmprop->Add(checkbox,wxFIXED_MINSIZE);
+ wxFlexGridSizer* sizerirmprop = new wxFlexGridSizer(3);
+ if(!isComplexBox)
+ {
+ //wxString choices[2];
+ //choices[0] = wxString(_T("On"));
+ //choices[1] = wxString(_T("Off"));
+ wxStaticText* label = new wxStaticText(this, -1, wxString(_T("")));
+ wxStaticText* label2 = new wxStaticText(this, -1, wxString(_T("")));
+ checkbox = new wxCheckBox(this,-1,wxString(_T("Show Actor")));
+ Connect(checkbox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onCheckBoxChange);
+ checkbox->SetValue(true);
+
+ sizerirmprop->Add(checkbox,wxFIXED_MINSIZE);
+ sizerirmprop->Add(label,wxFIXED_MINSIZE);
+ sizerirmprop->Add(label2,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);
Connect(mwxwidget->GetId(), wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onColorChange);
sizerirmprop->Add(mwxwidget,wxFIXED_MINSIZE);
+ wxBitmap bitmap0(Add_xpm);
+ _viewimage = new wxBitmapButton(this, -1, bitmap0, wxDefaultPosition, wxSize(30,30));
+ Connect(_viewimage->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onViewImage);
+ sizerirmprop->Add(_viewimage,wxFIXED_MINSIZE);
+
+ wxBitmap bitmap1(OpenImage_xpm);
+ wxBitmapButton* _openParameters = new wxBitmapButton(this, -1, bitmap1, wxDefaultPosition, wxSize(30,30));
+ Connect(_openParameters->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onOpenParameters);
+ sizerirmprop->Add(_openParameters,wxFIXED_MINSIZE);
//std::string iconsdir = wxMaracasMultipleVolumeRendererView::getInstance()->getPath();
//iconsdir+="/data/Icons/Add.xmp";
//wxBitmap* bitmap = new wxBitmap(wxString(iconsdir.c_str(),wxConvUTF8), wxBITMAP_TYPE_XPM);
- wxBitmap bitmap(OpenImage_xpm);
- _viewimage = new wxBitmapButton(this, -1, bitmap, wxDefaultPosition, wxSize(30,30));
- Connect(_viewimage->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasMultipleVolumeRendererPanel::onViewImage);
- sizerirmprop->Add(_viewimage,wxFIXED_MINSIZE);
this->SetSizer(sizerirmprop, true);
this->SetAutoLayout( true );
-
//_frame = new wxFrame(this, 10, _T("Configure Transfer Functions"));
/*wxButton* button1 = new wxButton(_frame,20,_T("OK"));
// wxMaracasMultipleVolumeRendererView::getInstance()->GetColorFunction(getPropId()));
mwxwidget->Refresh();
}
+
+/**
+**
+**/
void wxMaracasMultipleVolumeRendererPanel::onOK(wxCommandEvent& event){
updateVolume();
//_frame->Show(false);
}
+
+/**
+**
+**/
void wxMaracasMultipleVolumeRendererPanel::onCancel(wxCommandEvent& event){
//_frame->Show(false);
}
+
+/**
+**
+**/
void wxMaracasMultipleVolumeRendererPanel::onUpdate(wxCommandEvent& event){
updateVolume();
}
+
+/**
+**
+**/
void wxMaracasMultipleVolumeRendererPanel::updateVolume(){
std::vector<double> greylevelcolors;
std::vector<double> red;
mwxwidget->GetValuesColorPointsFunction(greylevelcolors, red, green, blue);
mwxwidget->GetValuesPointsFunction(greylevel, values);
-
- wxMaracasMultipleVolumeRendererView::getInstance()->SetValuesColorPointsFunction(this->_propid, greylevelcolors, red, green, blue);
- wxMaracasMultipleVolumeRendererView::getInstance()->SetValuesPointsFunction(this->_propid, greylevel, values);
-
+ if(this->isComplexBox)
+ {
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->SetValuesColorPointsFunction(this->_propid,greylevelcolors, red, green, blue);
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->SetValuesPointsFunction(this->_propid, greylevel, values);
+ }
+ else
+ {
+ wxMaracasMultipleVolumeRendererView::getInstance()->SetValuesColorPointsFunction(this->_propid, greylevelcolors, red, green, blue);
+ wxMaracasMultipleVolumeRendererView::getInstance()->SetValuesPointsFunction(this->_propid, greylevel, values);
+ }
}
+
+/**
+** Updates the volume visualization
+**/
void wxMaracasMultipleVolumeRendererPanel::onColorChange(wxCommandEvent& event){
//if(mwxwidget->ShowModal()==wxID_OK){
//}
}
+/**
+**
+**/
void wxMaracasMultipleVolumeRendererPanel::onViewImage(wxCommandEvent& event){
}
+
+/**
+**
+**/
+void wxMaracasMultipleVolumeRendererPanel::onOpenParameters(wxCommandEvent& event){
+ dialog = new wxMaracasRenderImageManagementPanel(this);
+ dialog->SetSize(400,580);
+ dialog->Show();
+}
+
+/**
+**
+**/
void wxMaracasMultipleVolumeRendererPanel::onCheckBoxChange(wxCommandEvent& event){
- wxMaracasMultipleVolumeRendererView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
+ if(this->isComplexBox)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorV(this->getPropId(), checkbox->GetValue());
+ else
+ wxMaracasMultipleVolumeRendererView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
}
+/**
+** Gets the propId
+**/
int wxMaracasMultipleVolumeRendererPanel::getPropId(){
return _propid;
+}
+
+/**
+** Carolina Perez: Recently added method
+**/
+HistogramDialogComboBox* wxMaracasMultipleVolumeRendererPanel::getMwxwidget()
+{
+ return mwxwidget;
}
\ No newline at end of file
#include <wx/wx.h>
#include "HistogramDialogComboBox.h"
+#include "wxMaracasRenderImageManagementPanel.h"
class wxMaracasMultipleVolumeRendererPanel : public wxPanel{
public:
- wxMaracasMultipleVolumeRendererPanel(wxWindow* parent, int propid, vtkImageData* img);
+ wxMaracasMultipleVolumeRendererPanel(wxWindow* parent, int propid, vtkImageData* img, bool _isComplexBox);
~wxMaracasMultipleVolumeRendererPanel();
- void createControls(vtkImageData* img);
+ void createControls(vtkImageData* img);
void onCheckBoxChange(wxCommandEvent& event);
void onColorChange(wxCommandEvent& event);
void onOK(wxCommandEvent& event);
void onCancel(wxCommandEvent& event);
void onUpdate(wxCommandEvent& event);
void onViewImage(wxCommandEvent& event);
+ void onOpenParameters(wxCommandEvent& event);
void updateVolume();
int getPropId();
-
+ HistogramDialogComboBox* getMwxwidget();
+
private:
wxCheckBox* checkbox;
wxBitmapButton* _viewimage;
bool first;
HistogramDialogComboBox* mwxwidget;
+ wxMaracasRenderImageManagementPanel* dialog;
//wxFrame* _frame;
+
+ //-- added for complex box --//
+ bool isComplexBox;
};
#endif /*wxMaracasMultipleVolumeRendererPanel_H_*/
Program: wxMaracas
Module: $RCSfile: wxMaracasMultipleVolumeRendererView.cxx,v $
Language: C++
- Date: $Date: 2009/10/16 17:01:42 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/10/30 20:06:07 $
+ Version: $Revision: 1.5 $
Copyright: (c) 2002, 2003
License:
try{
int id = volmanager->addVolume(img,dataname);
if(id!=-1){
- wxMaracasMultipleVolumeRendererPanel* controlpan = new wxMaracasMultipleVolumeRendererPanel(this, id,img);
+ wxMaracasMultipleVolumeRendererPanel* controlpan = new wxMaracasMultipleVolumeRendererPanel(this, id,img, false);
addVolumeViewPanel(controlpan, dataname);
controlpan->updateVolume();
}
}
}
-void wxMaracasMultipleVolumeRendererView::deleteVolume(int volid){
- //volmanager->deleteActor(volid);
+void wxMaracasMultipleVolumeRendererView::deleteVolume(int volid)
+{
+ volmanager->deleteActor(volid);
}
void wxMaracasMultipleVolumeRendererView::SetValuesColorPointsFunction(int volid, std::vector<double> greylevelcolors,std::vector<double> red,std::vector<double> green,std::vector<double> blue){
- //volmanager->setVolumeColor(volid, greylevelcolors, red, green, blue);
+ volmanager->setVolumeColor(volid, greylevelcolors, red, green, blue);
}
void wxMaracasMultipleVolumeRendererView::SetValuesPointsFunction(int volid, std::vector<double> greylevel, std::vector<double> values){
- //volmanager->setVolumeOpacity(volid, greylevel, values);
+ volmanager->setVolumeOpacity(volid, greylevel, values);
}
vtkPiecewiseFunction* wxMaracasMultipleVolumeRendererView::GetTransferFunction(int volumeid){
#include "wxMaracasRenderTabbedPanel.h"
+#include "HistogramDialogComboBox.h"
#include <wx/colordlg.h>
#include <OpenImage.xpm>
/**
**
**/
-wxMaracasRenderTabbedPanel::wxMaracasRenderTabbedPanel(wxWindow* parent, wxMaracasMultipleVolumeRendererManager* _volmanager, wxMaracasSurfaceRenderingManager* _surrendmanager1, wxMaracasSurfaceRenderingManager* _surrendmanager2,
- wxMaracasSurfaceRenderingManager* _surrendmanager3, wxString filename, wxString dataname)
+wxMaracasRenderTabbedPanel::wxMaracasRenderTabbedPanel(wxWindow* parent/*, wxMaracasMultipleVolumeRendererManager* _volmanager, wxMaracasSurfaceRenderingManager* _surrendmanager1, wxMaracasSurfaceRenderingManager* _surrendmanager2,
+ wxMaracasSurfaceRenderingManager* _surrendmanager3, wxString pathfile, wxString filename*/)
: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize)
{
//_propid = propid;
- volmanager = _volmanager;
- surrendmanager1 = _surrendmanager1;
- surrendmanager2 = _surrendmanager2;
- surrendmanager3 = _surrendmanager3;
+ volmanager = new wxMaracasMultipleVolumeRendererManager();
+ surrendmanager1 = new wxMaracasSurfaceRenderingManager();
+ surrendmanager2 = new wxMaracasSurfaceRenderingManager();
+ surrendmanager3 = new wxMaracasSurfaceRenderingManager();
- createControls(filename, dataname);
}
/**
**
**/
-void wxMaracasRenderTabbedPanel::createControls(wxString filename, wxString dataname)
+void wxMaracasRenderTabbedPanel::createControls(wxString pathfile, wxString filename)
{
//wxPanel* up = new wxPanel(this, wxID_ANY);
- wxFlexGridSizer* sizerrenderprop = new wxFlexGridSizer(2,3,1);
+ wxFlexGridSizer* sizerrenderprop = new wxFlexGridSizer(1);
- wxString choices[2];
- choices[0] = wxString(_T("On"));
- choices[1] = wxString(_T("Off"));
+ //wxString choices[2];
+ //choices[0] = wxString(_T("On"));
+ //choices[1] = wxString(_T("Off"));
+ wxFlexGridSizer* sizercheck = new wxFlexGridSizer(2);
checkboxVol = new wxCheckBox(this,-1,wxString(_T("Volume Rendering")));
Connect(checkboxVol->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasRenderTabbedPanel::onCheckBoxVChange);
checkboxVol->SetValue(true);
-
- sizerrenderprop->Add(checkboxVol, wxFIXED_MINSIZE);
+ sizercheck->Add(checkboxVol, wxFIXED_MINSIZE);
//wxString choices[2];
//choices[0] = wxString(_T("On"));
Connect(checkboxSA->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasRenderTabbedPanel::onCheckBoxSAChange);
checkboxSA->SetValue(true);
- sizerrenderprop->Add(checkboxSA, wxFIXED_MINSIZE);
+ sizercheck->Add(checkboxSA, wxFIXED_MINSIZE);
//wxString choices[2];
//choices[0] = wxString(_T("On"));
Connect(checkboxSB->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasRenderTabbedPanel::onCheckBoxSBChange);
checkboxSB->SetValue(true);
- sizerrenderprop->Add(checkboxSB, wxFIXED_MINSIZE);
+ sizercheck->Add(checkboxSB, wxFIXED_MINSIZE);
//wxString choices[2];
//choices[0] = wxString(_T("On"));
Connect(checkboxSC->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasRenderTabbedPanel::onCheckBoxSCChange);
checkboxSC->SetValue(true);
- sizerrenderprop->Add(checkboxSC, wxFIXED_MINSIZE);
-
+ sizercheck->Add(checkboxSC, wxFIXED_MINSIZE);
+ sizerrenderprop->Add(sizercheck, wxFIXED_MINSIZE);
//up->SetSizer(sizerup, true);
//up->SetAutoLayout( true );
wxtabs = new wxNotebook(this, -1);
- std::string s = std::string(filename.mb_str());
+ std::string s = std::string(pathfile.mb_str());
vtkImageData* img1 = volmanager->getImageData(s);
vtkImageData* img2 = surrendmanager1->getImageData(s);
vtkImageData* img3 = surrendmanager2->getImageData(s);
vtkImageData* img4 = surrendmanager3->getImageData(s);
if(img1!=NULL)
{
- s = std::string(dataname.mb_str());
- wxMaracasMultipleVolumeRendererPanel* controlpan1 = addVolume(img1, s);
- wxMaracasSurfaceRenderingPanel* controlpan2 = addSurface1(img2, s);
- wxMaracasSurfaceRenderingPanel* controlpan3 = addSurface2(img3, s);
- wxMaracasSurfaceRenderingPanel* controlpan4 = addSurface3(img4, s);
-
- wxtabs->AddPage(controlpan1, _T("Volume Rendering"), true);
- wxtabs->AddPage(controlpan2, _T("Surf Rend A"));
- wxtabs->AddPage(controlpan3, _T("Surf Rend B"));
- wxtabs->AddPage(controlpan4, _T("Surf Rend C"));
-
+
+ s = std::string(filename.mb_str());
+ addVolume(img1, s);
+ addSurface1(img2, s);
+ addSurface2(img3, s);
+ addSurface3(img4, s);
wxtabs->Refresh();
}
//wxFlexGridSizer* sizerrenderprop = new wxFlexGridSizer(2,1,5);
//sizerrenderprop->Add(up, wxFIXED_MINSIZE);
+
sizerrenderprop->Add(wxtabs, wxFIXED_MINSIZE);
this->SetSizer(sizerrenderprop, true);
wxMaracasRenderTabbedPanel::~wxMaracasRenderTabbedPanel()
{
- //wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
+ //wxMaracasRenderTabbedPanel::getInstance()->addRemoveActorV(_propid, false);
+ //wxMaracasRenderTabbedPanel::getInstance()->addRemoveActorSA(_propid, false);
+ //wxMaracasRenderTabbedPanel::getInstance()->addRemoveActorSB(_propid, false);
+ //wxMaracasRenderTabbedPanel::getInstance()->addRemoveActorSC(_propid, false);
//wxMaracasRenderTabbedPanel::getInstance()->deleteVolume(_propid);
- delete wxtabs;
- //delete surview1;
- //delete surview2;
- //delete surview3;
+ delete wxtabs;
+}
+
+void wxMaracasRenderTabbedPanel::setRenderer(vtkRenderer* renderer)
+{
+ volmanager->setRenderer(renderer);
+ surrendmanager1->setRenderer(renderer);
+ surrendmanager2->setRenderer(renderer);
+ surrendmanager3->setRenderer(renderer);
}
/*
*
*/
-wxMaracasMultipleVolumeRendererPanel* wxMaracasRenderTabbedPanel::addVolume(vtkImageData* img, std::string dataname)
+void wxMaracasRenderTabbedPanel::addVolume(vtkImageData* img, std::string dataname)
{
-
try
{
- int id = volmanager->addVolume(img, dataname);
- if(id!=-1)
+ int _propidV = volmanager->addVolume(img, dataname);
+ if(_propidV!=-1)
{
- wxMaracasMultipleVolumeRendererPanel* controlpan = new wxMaracasMultipleVolumeRendererPanel(wxtabs, id,img);
- //controlpan->updateVolume();
-
- return controlpan;
+ controlpanV = new wxMaracasMultipleVolumeRendererPanel(wxtabs, _propidV, img, true);
+ wxtabs->AddPage(controlpanV, _T("Volume Rendering"), true);
+ updateVolume();
}
}
catch(char* str)
}
}
-wxMaracasSurfaceRenderingPanel* wxMaracasRenderTabbedPanel::addSurface1(vtkImageData* img, std::string dataname)
+void wxMaracasRenderTabbedPanel::addSurface1(vtkImageData* img, std::string dataname)
{
try
{
- int id = surrendmanager1->addPropMHD(img, dataname);
+ int _propidSA = surrendmanager1->addPropMHD(img, dataname);
- if(id!=-1)
+ if(_propidSA!=-1)
{
- wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3DMHD(wxtabs, id);
- //int maxiso = surrendmanager1->getMaxIsoValue(id);
- //((wxMaracasSurfaceRenderingProp3DMHD*)controlpan)->createControls(maxiso);
-
- return controlpan;
+ controlpanSA = new wxMaracasSurfaceRenderingProp3DMHD(wxtabs, _propidSA, true, 1);
+ int maxiso = surrendmanager1->getMaxIsoValue(_propidSA);
+ ((wxMaracasSurfaceRenderingProp3DMHD*)controlpanSA)->createControls(maxiso);
+ wxtabs->AddPage(controlpanSA, _T("Surf Rendering A"));
}
}
catch(char* str)
}
}
-wxMaracasSurfaceRenderingPanel* wxMaracasRenderTabbedPanel::addSurface2(vtkImageData* img, std::string dataname)
+void wxMaracasRenderTabbedPanel::addSurface2(vtkImageData* img, std::string dataname)
{
try
{
- int id = surrendmanager2->addPropMHD(img, dataname);
- if(id!=-1)
+ int _propidSB = surrendmanager2->addPropMHD(img, dataname);
+ if(_propidSB!=-1)
{
- wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3DMHD(wxtabs, id);
- //int maxiso = surrendmanager2->getMaxIsoValue(id);
- //((wxMaracasSurfaceRenderingProp3DMHD*)controlpan)->createControls(maxiso);
+ controlpanSB = new wxMaracasSurfaceRenderingProp3DMHD(wxtabs, _propidSB, true, 2);
+ int maxiso = surrendmanager2->getMaxIsoValue(_propidSB);
+ ((wxMaracasSurfaceRenderingProp3DMHD*)controlpanSB)->createControls(maxiso);
+ wxtabs->AddPage(controlpanSB, _T("Surf Rendering B"));
- return controlpan;
}
}
catch(char* str)
}
}
-wxMaracasSurfaceRenderingPanel* wxMaracasRenderTabbedPanel::addSurface3(vtkImageData* img, std::string dataname)
+void wxMaracasRenderTabbedPanel::addSurface3(vtkImageData* img, std::string dataname)
{
try
{
- int id = surrendmanager3->addPropMHD(img, dataname);
- if(id!=-1)
+ _propidSC = surrendmanager3->addPropMHD(img, dataname);
+
+ if(_propidSC!=-1)
{
- wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3DMHD(wxtabs, id);
- //int maxiso = surrendmanager3->getMaxIsoValue(id);
- //((wxMaracasSurfaceRenderingProp3DMHD*)controlpan)->createControls(maxiso);
-
- return controlpan;
+ controlpanSC = new wxMaracasSurfaceRenderingProp3DMHD(wxtabs, _propidSC, true, 3);
+ int maxiso = surrendmanager3->getMaxIsoValue(_propidSC);
+ ((wxMaracasSurfaceRenderingProp3DMHD*)controlpanSC)->createControls(maxiso);
+ wxtabs->AddPage(controlpanSC, _T("Surf Rendering C"));
}
}
catch(char* str)
}
}
-void wxMaracasRenderTabbedPanel::onOK(wxCommandEvent& event)
+/**
+** Deletes complete volume
+**/
+void wxMaracasRenderTabbedPanel::deleteVolume(int volid)
+{
+ volmanager->deleteActor(volid);
+ surrendmanager1->deleteActor(volid);
+ surrendmanager2->deleteActor(volid);
+ surrendmanager3->deleteActor(volid);
+}
+
+/**
+** Adds or removes volume rendering actor with given ID
+**/
+void wxMaracasRenderTabbedPanel::addRemoveActorV(int id, bool addremove)
+{
+ volmanager->addRemoveActor(id, addremove);
+}
+
+/**
+** Adds or removes surface rendering actor with given ID
+**/
+void wxMaracasRenderTabbedPanel::addRemoveActorSA(int id, bool addremove)
+{
+ surrendmanager1->addRemoveActor(id, addremove);
+}
+
+/**
+** Adds or removes surface rendering actor with given ID
+**/
+void wxMaracasRenderTabbedPanel::addRemoveActorSB(int id, bool addremove)
+{
+ surrendmanager2->addRemoveActor(id, addremove);
+}
+
+/**
+** Adds or removes surface rendering actor with given ID
+**/
+void wxMaracasRenderTabbedPanel::addRemoveActorSC(int id, bool addremove)
+{
+ surrendmanager3->addRemoveActor(id, addremove);
+}
+
+/**
+** Sets color points values for the given volume rendering identified by parameter: volumeid
+**/
+void wxMaracasRenderTabbedPanel::SetValuesColorPointsFunction(int volid, std::vector<double> greylevelcolors,std::vector<double> red,std::vector<double> green,std::vector<double> blue)
+{
+ volmanager->setVolumeColor(volid, greylevelcolors, red, green, blue);
+}
+
+/**
+** Sets points values for the given volume rendering identified by parameter: volumeid
+**/
+void wxMaracasRenderTabbedPanel::SetValuesPointsFunction(int volid, std::vector<double> greylevel, std::vector<double> values)
+{
+ volmanager->setVolumeOpacity(volid, greylevel, values);
+}
+
+/**
+** Returns transfer function for the given volume rendering identified by parameter: volumeid
+**/
+vtkPiecewiseFunction* wxMaracasRenderTabbedPanel::GetTransferFunction(int volumeid)
+{
+ return volmanager->GetTransferFunction(volumeid);
+}
+
+/**
+** Returns color function for the given volume rendering identified by parameter: volumeid
+**/
+vtkColorTransferFunction* wxMaracasRenderTabbedPanel::GetColorFunction(int volumeid)
+{
+ return volmanager->GetColorFunction(volumeid);
+}
+
+/**
+** Changes color function by the given value for the given volume rendering identified by parameter: volumeid
+**/
+void wxMaracasRenderTabbedPanel::changeOpacityA(int _propid, int value)
{
- updateVolume();
- //_frame->Show(false);
+ surrendmanager1->changeOpacity(_propid,value);
}
-void wxMaracasRenderTabbedPanel::onCancel(wxCommandEvent& event)
+/**
+** Changes isoValue by the given value for the given surface rendering image identified by parameter: propid
+**/
+void wxMaracasRenderTabbedPanel::changeIsoValueA(int propid, double value)
{
- //_frame->Show(false);
+ surrendmanager1->changeIsoValue(propid, value);
}
+/**
+** Changes color for the given surface rendering image identified by parameter: propid
+**/
+void wxMaracasRenderTabbedPanel::changeColorA(int propid, double red, double green, double blue)
+{
+ try
+ {
+ surrendmanager1->changeColor(propid, red, green, blue);
+ }
+ catch(char* str)
+ {
+ wxString s( str,wxConvUTF8 );
+ wxMessageDialog* diag = new wxMessageDialog(this, s, s, wxICON_ERROR);
+ diag->ShowModal();
+ delete diag;
+ }
+}
+
+/**
+** Changes color function by the given value for the given volume rendering identified by parameter: volumeid
+**/
+void wxMaracasRenderTabbedPanel::changeOpacityB(int _propid, int value)
+{
+ surrendmanager2->changeOpacity(_propid,value);
+}
+
+/**
+** Changes isoValue by the given value for the given surface rendering image identified by parameter: propid
+**/
+void wxMaracasRenderTabbedPanel::changeIsoValueB(int propid, double value)
+{
+ surrendmanager2->changeIsoValue(propid, value);
+}
+
+/**
+** Changes color for the given surface rendering image identified by parameter: propid
+**/
+void wxMaracasRenderTabbedPanel::changeColorB(int propid, double red, double green, double blue)
+{
+ try
+ {
+ surrendmanager2->changeColor(propid, red, green, blue);
+ }
+ catch(char* str)
+ {
+ wxString s( str,wxConvUTF8 );
+ wxMessageDialog* diag = new wxMessageDialog(this, s, s, wxICON_ERROR);
+ diag->ShowModal();
+ delete diag;
+ }
+}
+
+/**
+** Changes color function by the given value for the given volume rendering identified by parameter: volumeid
+**/
+void wxMaracasRenderTabbedPanel::changeOpacityC(int _propid, int value)
+{
+ surrendmanager3->changeOpacity(_propid,value);
+}
+
+/**
+** Changes isoValue by the given value for the given surface rendering image identified by parameter: propid
+**/
+void wxMaracasRenderTabbedPanel::changeIsoValueC(int propid, double value)
+{
+ surrendmanager3->changeIsoValue(propid, value);
+}
+
+/**
+** Changes color for the given surface rendering image identified by parameter: propid
+**/
+void wxMaracasRenderTabbedPanel::changeColorC(int propid, double red, double green, double blue)
+{
+ try
+ {
+ surrendmanager3->changeColor(propid, red, green, blue);
+ }
+ catch(char* str)
+ {
+ wxString s( str,wxConvUTF8 );
+ wxMessageDialog* diag = new wxMessageDialog(this, s, s, wxICON_ERROR);
+ diag->ShowModal();
+ delete diag;
+ }
+}
+
+/**
+**
+**/
void wxMaracasRenderTabbedPanel::onUpdate(wxCommandEvent& event)
{
updateVolume();
}
+/**
+**
+**/
void wxMaracasRenderTabbedPanel::updateVolume()
{
- //std::vector<double> greylevelcolors;
- //std::vector<double> red;
- //std::vector<double> green;
- //std::vector<double> blue;
+ /*Temporarily disabled*/
+
+ std::vector<double> greylevelcolors;
+ std::vector<double> red;
+ std::vector<double> green;
+ std::vector<double> blue;
- //std::vector<double> greylevel;
- //std::vector<double> values;
+ std::vector<double> greylevel;
+ std::vector<double> values;
- //mwxwidget->GetValuesColorPointsFunction(greylevelcolors, red, green, blue);
- //mwxwidget->GetValuesPointsFunction(greylevel, values);
+ HistogramDialogComboBox* histo = controlpanV->getMwxwidget();
+ histo->GetValuesColorPointsFunction(greylevelcolors, red, green, blue);
+ histo->GetValuesPointsFunction(greylevel, values);
+ volmanager->setVolumeColor(controlpanV->getPropId(), greylevelcolors, red, green, blue);
+ volmanager->setVolumeOpacity(controlpanV->getPropId(), greylevel, values);
//wxMaracasMultipleVolumeRendererView::getInstance()->SetValuesColorPointsFunction(this->_propid, greylevelcolors, red, green, blue);
//wxMaracasMultipleVolumeRendererView::getInstance()->SetValuesPointsFunction(this->_propid, greylevel, values);
}
+/**
+**
+**/
void wxMaracasRenderTabbedPanel::onColorChange(wxCommandEvent& event)
{
+ /*Temporarily disabled*/
//if(mwxwidget->ShowModal()==wxID_OK){
//updateVolume();
/**
**
**/
-void wxMaracasRenderTabbedPanel::onViewImage(wxCommandEvent& event){
+void wxMaracasRenderTabbedPanel::onViewImage(wxCommandEvent& event)
+{
}
/**
-**
+** Method called when VolumeRendering checkbox status changes: Either shows or hides VolumeRendering image
**/
void wxMaracasRenderTabbedPanel::onCheckBoxVChange(wxCommandEvent& event)
{
- //wxMaracasMultipleVolumeRendererView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
+ volmanager->addRemoveActor(this->getPropIdV(), checkboxVol->GetValue());
}
/**
-**
+** Method called when SurfaceRendering A checkbox status changes: Either shows or hides SurfaceRendering image
**/
void wxMaracasRenderTabbedPanel::onCheckBoxSAChange(wxCommandEvent& event)
{
- //wxMaracasMultipleVolumeRendererView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
+ surrendmanager1->addRemoveActor(this->getPropIdSA(), checkboxSA->GetValue());
}
/**
-**
+** Method called when SurfaceRendering B checkbox status changes: Either shows or hides SurfaceRendering B image
**/
void wxMaracasRenderTabbedPanel::onCheckBoxSBChange(wxCommandEvent& event)
{
- //wxMaracasMultipleVolumeRendererView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
+ surrendmanager2->addRemoveActor(this->getPropIdSB(), checkboxSB->GetValue());
}
/**
-**
+** Method called when SurfaceRendering C checkbox status changes: Either shows or hides SurfaceRendering C image
**/
void wxMaracasRenderTabbedPanel::onCheckBoxSCChange(wxCommandEvent& event)
{
- //wxMaracasMultipleVolumeRendererView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
+ surrendmanager3->addRemoveActor(this->getPropIdSC(), checkboxSC->GetValue());
+}
+
+/**
+**
+**/
+int wxMaracasRenderTabbedPanel::getPropIdV()
+{
+ return _propidV;
+}
+
+/**
+**
+**/
+int wxMaracasRenderTabbedPanel::getPropIdSA()
+{
+ return _propidSA;
}
/**
**
**/
-int wxMaracasRenderTabbedPanel::getPropId(){
- return _propid;
+int wxMaracasRenderTabbedPanel::getPropIdSB()
+{
+ return _propidSB;
}
+/**
+**
+**/
+int wxMaracasRenderTabbedPanel::getPropIdSC()
+{
+ return _propidSC;
+}
\ No newline at end of file
{
public:
- wxMaracasRenderTabbedPanel(wxWindow* parent, wxMaracasMultipleVolumeRendererManager* img1, wxMaracasSurfaceRenderingManager* img2, wxMaracasSurfaceRenderingManager* img3,
- wxMaracasSurfaceRenderingManager* img4, wxString filename, wxString dataname);
+ wxMaracasRenderTabbedPanel(wxWindow* parent/*, wxMaracasMultipleVolumeRendererManager* volmanager, wxMaracasSurfaceRenderingManager* surmanager1, wxMaracasSurfaceRenderingManager* surmanager2,
+ wxMaracasSurfaceRenderingManager* surmanager3, wxString pathfile, wxString filename*/);
~wxMaracasRenderTabbedPanel();
- void createControls(wxString filename, wxString dataname);
- wxMaracasMultipleVolumeRendererPanel* addVolume(vtkImageData* img, std::string dataname);
- wxMaracasSurfaceRenderingPanel* addSurface1(vtkImageData* img, std::string dataname);
- wxMaracasSurfaceRenderingPanel* addSurface2(vtkImageData* img, std::string dataname);
- wxMaracasSurfaceRenderingPanel* addSurface3(vtkImageData* img, std::string dataname);
+
+ void createControls(wxString pathfile, wxString filename);
+ void setRenderer(vtkRenderer* rend);
+ void addVolume(vtkImageData* img, std::string dataname);
+ void addSurface1(vtkImageData* img, std::string dataname);
+ void addSurface2(vtkImageData* img, std::string dataname);
+ void addSurface3(vtkImageData* img, std::string dataname);
+
void onCheckBoxVChange(wxCommandEvent& event);
void onCheckBoxSAChange(wxCommandEvent& event);
void onCheckBoxSBChange(wxCommandEvent& event);
void onCheckBoxSCChange(wxCommandEvent& event);
+
+ void deleteVolume(int volid);
+ void addRemoveActorV(int id, bool addremove);
+ void addRemoveActorSA(int id, bool addremove);
+ void addRemoveActorSB(int id, bool addremove);
+ void addRemoveActorSC(int id, bool addremove);
+
+ // ----- Volume rendering functions ----- //
+ void SetValuesColorPointsFunction(int volid, std::vector<double> greylevelcolors,std::vector<double> red,std::vector<double> green,std::vector<double> blue);
+ void SetValuesPointsFunction(int volid, std::vector<double> greylevel, std::vector<double> values);
+ vtkPiecewiseFunction* GetTransferFunction(int volumeid);
+ vtkColorTransferFunction* GetColorFunction(int volumeid);
+
+ // ----- Surface rendering functions ----- //
+ void changeOpacityA(int _propid, int value);
+ void changeIsoValueA(int propid, double value);
+ void changeColorA(int propid, double red, double green, double blue);
+ void changeOpacityB(int _propid, int value);
+ void changeIsoValueB(int propid, double value);
+ void changeColorB(int propid, double red, double green, double blue);
+ void changeOpacityC(int _propid, int value);
+ void changeIsoValueC(int propid, double value);
+ void changeColorC(int propid, double red, double green, double blue);
+
void onColorChange(wxCommandEvent& event);
- void onOK(wxCommandEvent& event);
- void onCancel(wxCommandEvent& event);
+ //void onOK(wxCommandEvent& event);
+ //void onCancel(wxCommandEvent& event);
void onUpdate(wxCommandEvent& event);
void onViewImage(wxCommandEvent& event);
void updateVolume();
- int getPropId();
+ int getPropIdV();
+ int getPropIdSA();
+ int getPropIdSB();
+ int getPropIdSC();
private:
wxCheckBox* checkboxVol;
wxNotebook* wxtabs;
- int _propid;
+ int _propidV;
+ int _propidSA;
+ int _propidSB;
+ int _propidSC;
bool first;
wxMaracasSurfaceRenderingManager* surrendmanager1;
wxMaracasSurfaceRenderingManager* surrendmanager2;
wxMaracasSurfaceRenderingManager* surrendmanager3;
+
+ wxMaracasMultipleVolumeRendererPanel* controlpanV;
+ wxMaracasSurfaceRenderingPanel* controlpanSA;
+ wxMaracasSurfaceRenderingPanel* controlpanSB;
+ wxMaracasSurfaceRenderingPanel* controlpanSC;
};
#endif /*wxMaracasMultipleVolumeRendererPanel_H_*/
wxMaracasRendererView* wxMaracasRendererView::instance=NULL;
/**
-**
+** Class constructor
**/
wxMaracasRendererView::wxMaracasRendererView(wxWindow* parent,std::string path)
: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize){
_path = path;
- volmanager = new wxMaracasMultipleVolumeRendererManager();
- surrendmanager1 = new wxMaracasSurfaceRenderingManager();
- surrendmanager2 = new wxMaracasSurfaceRenderingManager();
- surrendmanager3 = new wxMaracasSurfaceRenderingManager();
+ wxtabs = new wxMaracasRenderTabbedPanel(this);
std::string iconsdir = path;
iconsdir+="/data/Icons";
}
/**
-**
+** Class destructor
**/
wxMaracasRendererView::~wxMaracasRendererView( )
{
**/
void wxMaracasRendererView::setRenderer(vtkRenderer* renderer)
{
- volmanager->setRenderer(renderer);
- surrendmanager1->setRenderer(renderer);
- surrendmanager2->setRenderer(renderer);
- surrendmanager3->setRenderer(renderer);
+ wxtabs->setRenderer(renderer);
}
/**
**/
void wxMaracasRendererView::addRemoveActorVol(int id, bool addremove)
{
- volmanager->addRemoveActor(id, addremove);
+ wxtabs->addRemoveActorV(id, addremove);
}
/**
**/
void wxMaracasRendererView::addRemoveSurf1Actor(int id, bool addremove)
{
- surrendmanager1->addRemoveActor(id, addremove);
+ wxtabs->addRemoveActorSA(id, addremove);
}
/**
**/
void wxMaracasRendererView::addRemoveSurf2Actor(int id, bool addremove)
{
- surrendmanager2->addRemoveActor(id, addremove);
+ wxtabs->addRemoveActorSB(id, addremove);
}
/**
**/
void wxMaracasRendererView::addRemoveSurf3Actor(int id, bool addremove)
{
- surrendmanager3->addRemoveActor(id, addremove);
+ wxtabs->addRemoveActorSC(id, addremove);
}
/**
-**
+** Called when an image file is opened
**/
void wxMaracasRendererView::onLoadImageFile()
{
wxString pathfile(fildial->GetDirectory() + _T("/") + filename);
if(filename.EndsWith(mhd))
{
- loadVolume(pathfile,filename);
+ addPanels(pathfile, filename);
}
}
delete fildial;
}
-/*
-*
-*/
-void wxMaracasRendererView::addPanels(wxString filename, wxString dataname)
+/**
+** Constructs and adds internal panel
+**/
+void wxMaracasRendererView::addPanels(wxString pathfile, wxString filename)
{
- wxString s(dataname.c_str(),wxConvUTF8 );
-
- wxtabs = new wxMaracasRenderTabbedPanel(this, volmanager, surrendmanager1, surrendmanager2, surrendmanager3, filename, dataname);
+ wxString s(filename.c_str(),wxConvUTF8);
+ wxtabs->createControls(pathfile, filename);
wxAuiPaneInfo paneinfo;
wxauimanager->AddPane(wxtabs, paneinfo.DefaultPane().Centre().DestroyOnClose().Caption(s));
wxauimanager->Update();
}
-
+/**
+** Returns internal panel
+**/
wxMaracasRenderTabbedPanel* wxMaracasRendererView::getTabbedPanel()
{
return wxtabs;
}
-/*
-*
-*/
-/*wxMaracasMultipleVolumeRendererPanel* wxMaracasRendererView::addVolume(vtkImageData* img, std::string dataname)
-{
-
- try
- {
- int id = volmanager->addVolume(img, dataname);
- if(id!=-1)
- {
- wxMaracasMultipleVolumeRendererPanel* controlpan = new wxMaracasMultipleVolumeRendererPanel(this, id,img);
- //controlpan->updateVolume();
-
- return controlpan;
- }
- }
- catch(char* str)
- {
- std::cout << "Exception : " << str << '\n';
- wxMessageDialog* diag = new wxMessageDialog(this, wxString(str,wxConvUTF8 ), wxString(str,wxConvUTF8 ), wxICON_ERROR);
- diag->ShowModal();
- }
-}
-
-wxMaracasSurfaceRenderingPanel* wxMaracasRendererView::addSurface1(vtkImageData* img, std::string dataname)
-{
- try
- {
- int id = surrendmanager1->addPropMHD(img, dataname);
-
- if(id!=-1)
- {
- wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3DMHD(this, id);
- //int maxiso = surrendmanager1->getMaxIsoValue(id);
- //((wxMaracasSurfaceRenderingProp3DMHD*)controlpan)->createControls(maxiso);
-
- return controlpan;
- }
- }
- catch(char* str)
- {
- std::cout << "Exception : " << str << '\n';
- wxMessageDialog* diag = new wxMessageDialog(this, wxString(str,wxConvUTF8 ), wxString(str,wxConvUTF8 ), wxICON_ERROR);
- diag->ShowModal();
- }
-}
-
-wxMaracasSurfaceRenderingPanel* wxMaracasRendererView::addSurface2(vtkImageData* img, std::string dataname)
-{
- try
- {
- int id = surrendmanager2->addPropMHD(img, dataname);
- if(id!=-1)
- {
- wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3DMHD(this, id);
- //int maxiso = surrendmanager2->getMaxIsoValue(id);
- //((wxMaracasSurfaceRenderingProp3DMHD*)controlpan)->createControls(maxiso);
-
- return controlpan;
- }
- }
- catch(char* str)
- {
- std::cout << "Exception : " << str << '\n';
- wxMessageDialog* diag = new wxMessageDialog(this, wxString(str,wxConvUTF8 ), wxString(str,wxConvUTF8 ), wxICON_ERROR);
- diag->ShowModal();
- }
-}
-
-wxMaracasSurfaceRenderingPanel* wxMaracasRendererView::addSurface3(vtkImageData* img, std::string dataname)
-{
- try
- {
- int id = surrendmanager3->addPropMHD(img, dataname);
- if(id!=-1)
- {
- wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3DMHD(this, id);
- //int maxiso = surrendmanager3->getMaxIsoValue(id);
- //((wxMaracasSurfaceRenderingProp3DMHD*)controlpan)->createControls(maxiso);
-
- return controlpan;
- }
- }
- catch(char* str)
- {
- std::cout << "Exception : " << str << '\n';
- wxMessageDialog* diag = new wxMessageDialog(this, wxString(str,wxConvUTF8 ), wxString(str,wxConvUTF8 ), wxICON_ERROR);
- diag->ShowModal();
- }
-}
-*/
-void wxMaracasRendererView::loadVolume(wxString filename, wxString dataname)
-{
-
- addPanels(filename, dataname);
-
-}
+/**
+** Deletes current volume
+**/
void wxMaracasRendererView::deleteVolume(int volid)
{
- volmanager->deleteActor(volid);
- surrendmanager1->deleteActor(volid);
- surrendmanager2->deleteActor(volid);
- surrendmanager3->deleteActor(volid);
-}
-
-void wxMaracasRendererView::SetValuesColorPointsFunction(int volid, std::vector<double> greylevelcolors,std::vector<double> red,std::vector<double> green,std::vector<double> blue){
- volmanager->setVolumeColor(volid, greylevelcolors, red, green, blue);
-}
-void wxMaracasRendererView::SetValuesPointsFunction(int volid, std::vector<double> greylevel, std::vector<double> values){
- volmanager->setVolumeOpacity(volid, greylevel, values);
-}
-
-vtkPiecewiseFunction* wxMaracasRendererView::GetTransferFunction(int volumeid){
- return volmanager->GetTransferFunction(volumeid);
-}
-vtkColorTransferFunction* wxMaracasRendererView::GetColorFunction(int volumeid){
- return volmanager->GetColorFunction(volumeid);
+ wxtabs->deleteVolume(volid);
}
/**
#include "wxMaracasRendererView.h"
#include "wxMaracasRenderTabbedPanel.h"
#include "wxMaracasMultipleVolumeRendererManager.h"
+#include "wxMaracasSurfaceRenderingManager.h"
//#include "wxMaracasMultipleVolumeRendererPanel.h"
//#include "wxMaracasSurfaceRenderingProp3DMHD.h"
-#include "wxMaracasSurfaceRenderingManager.h"
-
class creaMaracasVisu_EXPORT wxMaracasRendererView : public wxPanel
{
void loadVolume(wxString filename, wxString dataname);
void onLoadImageFile();
void addPanels(wxString filename, wxString dataname = _T(""));
+
wxMaracasRenderTabbedPanel* getTabbedPanel();
std::string getPath();
+
void deleteVolume(int volid);
void addRemoveActorVol(int id, bool remove);
void addRemoveSurf2Actor(int id, bool addremove);
void addRemoveSurf3Actor(int id, bool addremove);
- void SetValuesColorPointsFunction(int volid, std::vector<double> greylevelcolors,std::vector<double> red,std::vector<double> green,std::vector<double> blue);
- void SetValuesPointsFunction(int volid, std::vector<double> greylevel, std::vector<double> values);
+ //void SetValuesColorPointsFunction(int volid, std::vector<double> greylevelcolors,std::vector<double> red,std::vector<double> green,std::vector<double> blue);
+ //void SetValuesPointsFunction(int volid, std::vector<double> greylevel, std::vector<double> values);
- void addPanels(wxMaracasMultipleVolumeRendererPanel* irmview, std::string dataname);
-
- vtkPiecewiseFunction* GetTransferFunction(int volumeid);
- vtkColorTransferFunction* GetColorFunction(int volumeid);
+ //vtkPiecewiseFunction* GetTransferFunction(int volumeid);
+ //vtkColorTransferFunction* GetColorFunction(int volumeid);
private:
static wxMaracasRendererView* instance;
- wxMaracasMultipleVolumeRendererManager* volmanager;
- wxMaracasSurfaceRenderingManager* surrendmanager1;
- wxMaracasSurfaceRenderingManager* surrendmanager2;
- wxMaracasSurfaceRenderingManager* surrendmanager3;
-
wxMaracasRenderTabbedPanel* wxtabs;
wxAuiManager* wxauimanager;
std::string _path;
-
- wxToolBar* _toolb;
+ wxToolBar * _toolb;
};
-class ToolBarEventHandlerRenderer : public wxEvtHandler{
+class ToolBarEventHandlerRenderer : public wxEvtHandler
+{
public:
ToolBarEventHandlerRenderer();
};
#endif
-
Program: wxMaracas
Module: $RCSfile: wxMaracasSurfaceRendering.cxx,v $
Language: C++
- Date: $Date: 2009/10/16 15:17:57 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2009/10/30 20:06:07 $
+ Version: $Revision: 1.3 $
Copyright: (c) 2002, 2003
License:
// EOF - wxMaracasMPR.cxx
#include "wxMaracasSurfaceRendering.h"
-//#include "wxMaracasSurfaceRenderingPanel.h"
#include "wxMaracasSurfaceRenderingProp3DMHD.h"
#include "wxMaracasSurfaceRenderingProp3D.h"
std::string iconsdir = path;
iconsdir+="/data/Icons";
this->_toolb = new ToolBar(this,iconsdir);
+
+ /*Carolina: "Surface Rendering" label recently added*/
wxStaticText* txt = new wxStaticText(this, -1, wxString(_T(" Surface Rendering ")));
wxAuiPaneInfo paneinfo;
wxauimanager->AddPane(txt,paneinfo.ToolbarPane().Top());
int id = surrendmanager->addPropMHD(imgdata,dataname);
if(id!=-1){
- wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3DMHD(this, id);
+ wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3DMHD(this, id, false, -1);
int maxiso = surrendmanager->getMaxIsoValue(id);
((wxMaracasSurfaceRenderingProp3DMHD*)controlpan)->createControls(maxiso);
addSurfaceRenderingPanel(controlpan, dataname);
try{
int id = surrendmanager->addProp3D(prop3D,dataname);
if(id!=-1){
- wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3D(this, id);
+ wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3D(this, id, false, -1);
addSurfaceRenderingPanel(controlpan, dataname);
}
}catch(char* str){
void wxMaracasSurfaceRendering::deleteActor(int propid){
try{
- //surrendmanager->deleteActor(propid);
+ surrendmanager->deleteActor(propid);
}catch(char* e){
}
Program: wxMaracas
Module: $RCSfile: wxMaracasSurfaceRenderingManager.cxx,v $
Language: C++
- Date: $Date: 2009/10/15 11:56:43 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/10/30 20:06:07 $
+ Version: $Revision: 1.2 $
Copyright: (c) 2002, 2003
License:
=========================================================================*/
#include "wxMaracasSurfaceRenderingManager.h"
-
#include "wxMaracasSurfaceRenderingManagerDataMhd.h"
/**
prop3Dvect.pop_back();
}else{
throw "id not found in the data";
- }
-
-
-
-
+ }
}
-
class wxMaracasSurfaceRenderingPanel : public wxPanel{
public:
- wxMaracasSurfaceRenderingPanel(wxWindow* parent, int propid)
+ wxMaracasSurfaceRenderingPanel(wxWindow* parent, int propid, bool _isComplexBox, int _panID)
: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize){
createPanel();
+ isComplexBox = _isComplexBox;
+ panID = _panID;
_propid = propid;
}
//virtual ~wxMaracasSurfaceRenderingPanel();
return _propid;
}
+ /**
+ ** Returns the papnel id
+ **/
+ int getPanId(){
+ return panID;
+ }
+
+ /**
+ ** Tells if the panel is used for a complex box
+ **/
+ bool isComplex(){
+ return isComplexBox;
+ }
+
private:
wxBoxSizer* sizercontrols;
bool show;
protected:
int _propid;
-
+
+ //-- Atributes added for complex box --//
+ bool isComplexBox;
+ int panID;
};
#endif /*WXMARACASSURFACERENDERINGPANEL_H_*/
#include <wx/colordlg.h>
#include "wxMaracasSurfaceRendering.h"
+#include "wxMaracasRendererView.h"
#include <OpenImage.xpm>
+#include <Add.xpm>
#include "Color.xpm"
+
/**
** Implementation of viewProp3D
**/
-
-wxMaracasSurfaceRenderingProp3D::wxMaracasSurfaceRenderingProp3D(wxWindow* parent,int propid)
-:wxMaracasSurfaceRenderingPanel(parent, propid){
+wxMaracasSurfaceRenderingProp3D::wxMaracasSurfaceRenderingProp3D(wxWindow* parent, int propid, bool _isComplexBox, int _panID)
+:wxMaracasSurfaceRenderingPanel(parent, propid, _isComplexBox, _panID){
createControls();
}
+/**
+** Panel Destructor
+**/
wxMaracasSurfaceRenderingProp3D::~wxMaracasSurfaceRenderingProp3D(){
//wxMaracasSurfaceRendering::getInstance()->addRemoveActor(_propid, false);
- wxMaracasSurfaceRendering::getInstance()->deleteActor(_propid);
+ if(this->isComplex())
+ {
+ //if(this->getPanId() == 1)
+ // ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorSA(_propid, false);
+ //if(this->getPanId() == 2)
+ // ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorSB(_propid, false);
+ //if(this->getPanId() == 3)
+ // ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorSC(_propid, false);
+ }
+ //else
+ //wxMaracasSurfaceRendering::getInstance()->deleteActor(_propid);
}
+/**
+** Constructs the panel. Elements inside may change depending on which tipe of panel construction if being requested
+**/
void wxMaracasSurfaceRenderingProp3D::createControls(){
- wxFlexGridSizer* sizersurfprop = new wxFlexGridSizer(1,1,1);
+ wxFlexGridSizer* sizersurfprop = new wxFlexGridSizer(1);
- wxString choices[2];
- choices[0] = wxString(_T("On"));
- choices[1] = wxString(_T("Off"));
- checkbox = new wxCheckBox(this,-1,wxString(_T("Show Actor")));
- Connect(checkbox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3D::onCheckBoxChange);
- checkbox->SetValue(true);
-
- sizersurfprop->Add(checkbox,wxFIXED_MINSIZE);
+ if(!isComplexBox)
+ {
+ wxString choices[2];
+ choices[0] = wxString(_T("On"));
+ choices[1] = wxString(_T("Off"));
+ checkbox = new wxCheckBox(this,-1,wxString(_T("Show Actor")));
+ Connect(checkbox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3D::onCheckBoxChange);
+ checkbox->SetValue(true);
+
+ sizersurfprop->Add(checkbox,wxFIXED_MINSIZE);
+ }
//this->addControl(checkbox);
-
+ wxFlexGridSizer* sizerbut = new wxFlexGridSizer(3);
+
wxBitmap bitmap(Color_xpm);
_colorchoose = new wxBitmapButton(this, -1, bitmap,wxDefaultPosition,wxSize(30,30));
Connect(_colorchoose->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3D::onColorChange);
- sizersurfprop->Add(_colorchoose,wxFIXED_MINSIZE);
+ sizerbut->Add(_colorchoose,wxFIXED_MINSIZE);
+ wxBitmap bitmap1(Add_xpm);
+ _viewimage = new wxBitmapButton(this, -1, bitmap1, wxDefaultPosition, wxSize(30,30));
+ Connect(_viewimage->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3D::onViewImage);
+ sizerbut->Add(_viewimage,wxFIXED_MINSIZE);
+
+ if(isComplexBox)
+ {
+ wxBitmap bitmap2(OpenImage_xpm);
+ wxBitmapButton* _openParameters = new wxBitmapButton(this, -1, bitmap2, wxDefaultPosition, wxSize(30,30));
+ Connect(_openParameters->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3D::onOpenParameters);
+ sizerbut->Add(_openParameters,wxFIXED_MINSIZE);
+ }
+ sizersurfprop->Add(sizerbut,wxFIXED_MINSIZE);
//sizercolor->Add(checkbox,wxFIXED_MINSIZE);
//sizercolor->Add(_colorchoose,wxFIXED_MINSIZE);
//this->addControl(sizercolor);
-
-
+
wxStaticText* label = new wxStaticText(this, -1, wxString(_T("Opacity")));
opacity = new wxSlider(this, -1,100,0,100,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL|wxSL_LABELS);
Connect(opacity->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3D::onOpacityRelease);
sizersurfprop->Add(sizeropacity,wxFIXED_MINSIZE);
- /**wxBitmap bitmap1(OpenImage_xpm);
- _viewimage = new wxBitmapButton(this, -1, bitmap1, wxDefaultPosition, wxSize(30,30));
- Connect(_viewimage->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3D::onViewImage);
- sizersurfprop->Add(_viewimage,wxFIXED_MINSIZE); */
-
- //this->addControl(sizeropacity);
this->addControl(sizersurfprop);
}
+
+/**
+** Method called by setting on or off the actor
+**/
void wxMaracasSurfaceRenderingProp3D::onCheckBoxChange(wxCommandEvent& event){
- wxMaracasSurfaceRendering::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
+ //if(!isComplexBox)
+ wxMaracasSurfaceRendering::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
}
+
+/**
+**
+**/
void wxMaracasSurfaceRenderingProp3D::onColorChange(wxCommandEvent& event){
wxColourDialog* colourdiag = new wxColourDialog(this);
if(colourdiag->ShowModal()==wxID_OK){
double g = (double)(colour.Green())/255.0;
double b = (double)(colour.Blue())/255.0;
- wxMaracasSurfaceRendering::getInstance()->changeColor(this->getPropId(),r,g,b);
+ if(this->isComplex()){
+ if(this->getPanId() == 1)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->changeColorA(this->getPropId(), r, g, b);
+ if(this->getPanId() == 2)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->changeColorB(this->getPropId(), r, g, b);
+ if(this->getPanId() == 3)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->changeColorC(this->getPropId(), r, g, b);
+ }
+ else
+ wxMaracasSurfaceRendering::getInstance()->changeColor(this->getPropId(),r,g,b);
}
delete colourdiag;
}
}*/
+/**
+** Changes the opacity of an actor
+**/
void wxMaracasSurfaceRenderingProp3D::onOpacityRelease(wxScrollEvent& event ){
- wxMaracasSurfaceRendering::getInstance()->changeOpacity(this->getPropId(),opacity->GetValue());
+ if(this->isComplex()){
+ if(this->getPanId() == 1)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->changeOpacityA(this->getPropId(),opacity->GetValue());
+ if(this->getPanId() == 2)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->changeOpacityB(this->getPropId(),opacity->GetValue());
+ if(this->getPanId() == 3)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->changeOpacityC(this->getPropId(),opacity->GetValue());
+ }
+ else
+ wxMaracasSurfaceRendering::getInstance()->changeOpacity(this->getPropId(),opacity->GetValue());
}
+/**Carolina Perez: Method recently added. Not functionalit yet
+** Loads the volume in a separate window
+**/
void wxMaracasSurfaceRenderingProp3D::onViewImage(wxCommandEvent& event){
//if(mwxwidget->ShowModal()==wxID_OK){
//}
}
+/**
+** Loads the volume in a separate window
+** Carolina Perez: Method recently added 28/10/2009
+**/
+void wxMaracasSurfaceRenderingProp3D::onOpenParameters(wxCommandEvent& event){
+ dialog = new wxMaracasRenderImageManagementPanel(this);
+ dialog->SetSize(400,580);
+ dialog->Show();
+}
+
#define WXMARACASSURFACERENDERINGPROP3D_H_
#include "wxMaracasSurfaceRenderingPanel.h"
+#include "wxMaracasRenderImageManagementPanel.h"
class wxMaracasSurfaceRenderingProp3D : public wxMaracasSurfaceRenderingPanel{
public:
- wxMaracasSurfaceRenderingProp3D(wxWindow* parent, int propid);
+ wxMaracasSurfaceRenderingProp3D(wxWindow* parent, int propid, bool _isComplexBox, int _panID);
~wxMaracasSurfaceRenderingProp3D();
virtual void createControls();
- void onOpacityRelease(wxScrollEvent& event );
+ void onOpacityRelease(wxScrollEvent& event);
void onCheckBoxChange(wxCommandEvent& event);
void onColorChange(wxCommandEvent& event);
void onViewImage(wxCommandEvent& event);
+ void onOpenParameters(wxCommandEvent& event);
private:
wxSlider* opacity;
wxBitmapButton* _colorchoose;
wxBitmapButton* _viewimage;
-
-
+ wxMaracasRenderImageManagementPanel* dialog;
};
#endif /*WXMARACASSURFACERENDERINGPROP3D_H_*/
#include "wxMaracasSurfaceRenderingProp3DMHD.h"
#include "wxMaracasSurfaceRendering.h"
+#include "wxMaracasRendererView.h"
#include <OpenImage.xpm>
/**
** SurfaceRenderingProp3DMHD implementation
**/
-wxMaracasSurfaceRenderingProp3DMHD::wxMaracasSurfaceRenderingProp3DMHD(wxWindow* parent, int propid)
-: wxMaracasSurfaceRenderingProp3D(parent, propid)
-{
+wxMaracasSurfaceRenderingProp3DMHD::wxMaracasSurfaceRenderingProp3DMHD(wxWindow* parent, int propid, bool _isComplexBox, int _panID)
+: wxMaracasSurfaceRenderingProp3D(parent, propid, _isComplexBox, _panID){
}
wxMaracasSurfaceRenderingProp3DMHD::~wxMaracasSurfaceRenderingProp3DMHD(){
//this->Show(false);
- //wxMaracasSurfaceRendering::getInstance()->addRemoveActor(_propid, false);
+ if(this->isComplex())
+ {
+ //if(this->getPanId() == 1)
+ // ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorSA(_propid, false);
+ //if(this->getPanId() == 2)
+ // ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorSB(_propid, false);
+ //if(this->getPanId() == 3)
+ // ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->addRemoveActorSC(_propid, false);
+ }
+ //else
+ //wxMaracasSurfaceRendering::getInstance()->addRemoveActor(_propid, false);
}
void wxMaracasSurfaceRenderingProp3DMHD::createControls(int maxisovalue){
sizer->Add(isovalue, wxFIXED_MINSIZE);
//this->addControl(isovalue);
- wxBitmap bitmap(OpenImage_xpm);
- _viewimage = new wxBitmapButton(this, -1, bitmap, wxDefaultPosition, wxSize(30,30));
- Connect(_viewimage->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3DMHD::onViewImage);
- sizer->Add(_viewimage,wxFIXED_MINSIZE);
-
this->addControl(sizer);
Connect(isovalue->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction)&wxMaracasSurfaceRenderingProp3DMHD::onIsoValueRelease);
-
-
}
-void wxMaracasSurfaceRenderingProp3DMHD::onIsoValueRelease(wxScrollEvent& event ){
-
- wxMaracasSurfaceRendering::getInstance()->changeIsoValue(this->getPropId(), isovalue->GetValue()/1.0);
+void wxMaracasSurfaceRenderingProp3DMHD::onIsoValueRelease(wxScrollEvent& event )
+{
+ if(this->isComplex())
+ {
+ if(this->getPanId() == 1)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->changeIsoValueA(this->getPropId(),isovalue->GetValue()/1.0);
+ if(this->getPanId() == 2)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->changeIsoValueB(this->getPropId(),isovalue->GetValue()/1.0);
+ if(this->getPanId() == 3)
+ ((wxMaracasRenderTabbedPanel*)(wxMaracasRendererView::getInstance())->getTabbedPanel())->changeIsoValueC(this->getPropId(),isovalue->GetValue()/1.0);
+ }
+ else
+ wxMaracasSurfaceRendering::getInstance()->changeIsoValue(this->getPropId(), isovalue->GetValue()/1.0);
}
class wxMaracasSurfaceRenderingProp3DMHD : public wxMaracasSurfaceRenderingProp3D{
public:
- wxMaracasSurfaceRenderingProp3DMHD(wxWindow* parent, int propid);
+ wxMaracasSurfaceRenderingProp3DMHD(wxWindow* parent, int propid, bool _isComplexBox, int _panID);
~wxMaracasSurfaceRenderingProp3DMHD();
void onIsoValueRelease(wxScrollEvent& event );
void createControls(int maxisovalue);