//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
-/*void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
+void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
{
Wt::WContainerWidget* w = new Wt::WContainerWidget(parent);
Wt::WBoxLayout *l;
if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { l = new Wt::WHBoxLayout(); }
if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { l = new Wt::WVBoxLayout(); }
+
+
Wt::WContainerWidget* w1 = bbCreateWidgetOfInput("Widget1",w);
Wt::WContainerWidget* w2 = bbCreateWidgetOfInput("Widget2",w);
l->addWidget(w1);
l->addWidget(w2);
-
+ l->setResizable(0,true,400);
w->setLayout(l);
bbSetOutputWidget( w );
-}*/
+}
+/*
void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
{
Wt::WContainerWidget* w = new Wt::WContainerWidget(parent);
- Wt::Ext::Splitter *l = new Wt::Ext::Splitter(w);
+ Wt::Ext::Splitter *l = new Wt::Ext::Splitter();
// if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { l = new Wt::WHBoxLayout(); }
// if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { l = new Wt::WVBoxLayout(); }
if (w1==NULL) { w1=new Wt::WContainerWidget(); }
if (w2==NULL) { w2=new Wt::WContainerWidget(); }
- w1->resize(Wt::WLength::Auto,Wt::WLength::Auto) ;
- w2->resize(Wt::WLength::Auto,Wt::WLength::Auto) ;
+ w1->resize(200,200) ;
+ w2->resize(200,200) ;
l->addWidget(w1);
l->addWidget(w2);
-
+ w->addWidget(l);
//w->setLayout(l);
bbSetOutputWidget( w );
-}
+}*/
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
-/*void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
+void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
{
Wt::WContainerWidget* w = new Wt::WContainerWidget(parent);
Wt::WBoxLayout *l;
if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { l = new Wt::WHBoxLayout(); }
if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { l = new Wt::WVBoxLayout(); }
+
+
Wt::WContainerWidget* w1 = bbCreateWidgetOfInput("Widget1",w);
Wt::WContainerWidget* w2 = bbCreateWidgetOfInput("Widget2",w);
l->addWidget(w1);
l->addWidget(w2);
-
+ l->setResizable(0,true,Wt::WLength::Auto);
w->setLayout(l);
bbSetOutputWidget( w );
-}*/
+}
+/*
void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent)
{
Wt::WContainerWidget* w = new Wt::WContainerWidget(parent);
- Wt::Ext::Splitter *l = new Wt::Ext::Splitter(w);
+ Wt::Ext::Splitter *l = new Wt::Ext::Splitter();
// if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { l = new Wt::WHBoxLayout(); }
// if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { l = new Wt::WVBoxLayout(); }
if (w1==NULL) { w1=new Wt::WContainerWidget(); }
if (w2==NULL) { w2=new Wt::WContainerWidget(); }
-
+
+ w1->resize(200,200) ;
+ w2->resize(200,200) ;
l->addWidget(w1);
l->addWidget(w2);
-
+ w->addWidget(l);
//w->setLayout(l);
bbSetOutputWidget( w );
-}
+}*/
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
bbSetOutputWidget( w );
-}
+}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
Wt::WContainerWidget *w = new Wt::WContainerWidget(parent);
- Wt::WTabWidget* layout = new Wt::WTabWidget(w);
+ Wt::WTabWidget* layout = new Wt::WTabWidget();
Wt::WContainerWidget *cw;
- if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel1()));}
+ if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel1()));}
if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel2()));}
if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel3()));}
if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel4()));}
if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel8()));}
if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel9()));}
-
+ w->setLayout(layout);
bbSetOutputWidget( w );
BBTK_INPUT(LayoutTab,Label6,"label 6",std::string,"");
BBTK_INPUT(LayoutTab,Label7,"label 7",std::string,"");
BBTK_INPUT(LayoutTab,Label8,"label 8",std::string,"");
- BBTK_INPUT(LayoutTab,Label9,"label 9",std::string,"");
+ BBTK_INPUT(LayoutTab,Label9,"label 9",std::string,"");
// BBTK_INPUT(LayoutTab,Orientation,
// "Orientation (default T), 0=T=TOP , 1=R=RIGHT , 2=B=BOTTON , 3=L=LEFT "
// ,std::string,"");
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
- BBTK_DECLARE_INPUT(Widget1,Wt::WContainerWidget*);
- BBTK_DECLARE_INPUT(Widget2,Wt::WContainerWidget*);
- BBTK_DECLARE_INPUT(Widget3,Wt::WContainerWidget*);
- BBTK_DECLARE_INPUT(Widget4,Wt::WContainerWidget*);
- BBTK_DECLARE_INPUT(Widget5,Wt::WContainerWidget*);
- BBTK_DECLARE_INPUT(Widget6,Wt::WContainerWidget*);
- BBTK_DECLARE_INPUT(Widget7,Wt::WContainerWidget*);
- BBTK_DECLARE_INPUT(Widget8,Wt::WContainerWidget*);
- BBTK_DECLARE_INPUT(Widget9,Wt::WContainerWidget*);
+ BBTK_DECLARE_INPUT(Widget1,Wt:WContainerWidget*);
+ BBTK_DECLARE_INPUT(Widget2,Wt:WContainerWidget*);
+ BBTK_DECLARE_INPUT(Widget3,Wt:WContainerWidget*);
+ BBTK_DECLARE_INPUT(Widget4,Wt:WContainerWidget*);
+ BBTK_DECLARE_INPUT(Widget5,Wt:WContainerWidget*);
+ BBTK_DECLARE_INPUT(Widget6,Wt:WContainerWidget*);
+ BBTK_DECLARE_INPUT(Widget7,Wt:WContainerWidget*);
+ BBTK_DECLARE_INPUT(Widget8,Wt:WContainerWidget*);
+ BBTK_DECLARE_INPUT(Widget9,Wt:WContainerWidget*);
BBTK_DECLARE_INPUT(Label1,std::string);
BBTK_DECLARE_INPUT(Label2,std::string);
BBTK_DECLARE_INPUT(Label3,std::string);
BBTK_CATEGORY("__CategoryBlackBox__");
BBTK_DESCRIPTION("LayoutTab widget The label of each 'note book' will be the name of the object it contains");
- BBTK_INPUT(LayoutTab,Widget1,"widget 1",Wt::WContainerWidget*,"");
- BBTK_INPUT(LayoutTab,Widget2,"widget 2",Wt::WContainerWidget*,"");
- BBTK_INPUT(LayoutTab,Widget3,"widget 3",Wt::WContainerWidget*,"");
- BBTK_INPUT(LayoutTab,Widget4,"widget 4",Wt::WContainerWidget*,"");
- BBTK_INPUT(LayoutTab,Widget5,"widget 5",Wt::WContainerWidget*,"");
- BBTK_INPUT(LayoutTab,Widget6,"widget 6",Wt::WContainerWidget*,"");
- BBTK_INPUT(LayoutTab,Widget7,"widget 7",Wt::WContainerWidget*,"");
- BBTK_INPUT(LayoutTab,Widget8,"widget 8",Wt::WContainerWidget*,"");
- BBTK_INPUT(LayoutTab,Widget9,"widget 9",Wt::WContainerWidget*,"");
+ BBTK_INPUT(LayoutTab,Widget1,"widget 1",Wt:WContainerWidget*,"");
+ BBTK_INPUT(LayoutTab,Widget2,"widget 2",Wt:WContainerWidget*,"");
+ BBTK_INPUT(LayoutTab,Widget3,"widget 3",Wt:WContainerWidget*,"");
+ BBTK_INPUT(LayoutTab,Widget4,"widget 4",Wt:WContainerWidget*,"");
+ BBTK_INPUT(LayoutTab,Widget5,"widget 5",Wt:WContainerWidget*,"");
+ BBTK_INPUT(LayoutTab,Widget6,"widget 6",Wt:WContainerWidget*,"");
+ BBTK_INPUT(LayoutTab,Widget7,"widget 7",Wt:WContainerWidget*,"");
+ BBTK_INPUT(LayoutTab,Widget8,"widget 8",Wt:WContainerWidget*,"");
+ BBTK_INPUT(LayoutTab,Widget9,"widget 9",Wt:WContainerWidget*,"");
BBTK_INPUT(LayoutTab,Label1,"label 1",std::string,"");
BBTK_INPUT(LayoutTab,Label2,"label 2",std::string,"");
BBTK_INPUT(LayoutTab,Label3,"label 3",std::string,"");
Slider* mBox;
Wt::WSlider *mwtSlider;
Wt::WSlider *mResolutionOfSlider;
+ Wt::WText *textTitle;
+ Wt::WString tTitle;
int min;
int max;
bool reactiveOnTrack;
:
Wt::WContainerWidget(parent),
mBox(box),
+ tTitle(title),
min(vmin),
max(vmax),
reactiveOnTrack(reactiveontrack)
//mwtSlider->setValueText(title);
mwtSlider->valueChanged().connect(this,&SliderWidget::OnSliderTrack);
mwtSlider->sliderMoved().connect(this,&SliderWidget::OnSliderMove);
+ // mwtSlider->resize(Wt::WLength::Auto, 50);
// If asked : creation of the other little slider which allows to change
//---------------------------------------------------------------------
// 2) Insertion of the components in the window
std::cout<<"Creando SLIDER -- 4 "<<std::endl;
- layout->addWidget(new Wt::WText(title),Wt::WBorderLayout::North);
+ textTitle = new Wt::WText(tTitle + bbtk::std2wt(" : ")+ mwtSlider->valueText());
+ layout->addWidget(textTitle,Wt::WBorderLayout::North);
layout->addWidget(mwtSlider,Wt::WBorderLayout::Center);
std::cout<<"Creando SLIDER -- 5 "<<std::endl;
// Insert the sizer in the main panel and refresh the layout
}
// and signal that the output has changed
mBox->bbSignalOutputModification(std::string("Out"));
-
+ textTitle->setText(tTitle + bbtk::std2wt(" : ") + mwtSlider->valueText());
}
}
// and signal that the output has changed
mBox->bbSignalOutputModification(std::string("Out"));
+ textTitle->setText(tTitle + bbtk::std2wt(" : ") + mwtSlider->valueText());
}
);
// std::cout << "w = "<<w<<std::endl;
// w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
-
+ w->setMinimumSize(Wt::WLength::Auto, 120);
+ w->setMaximumSize(Wt::WLength::Auto, 180);
bbSetOutputWidget( w );
}
Slider* mBox;
Wt::WSlider *mwtSlider;
Wt::WSlider *mResolutionOfSlider;
+ Wt::WText *textTitle;
+ Wt::WString tTitle;
int min;
int max;
bool reactiveOnTrack;
:
Wt::WContainerWidget(parent),
mBox(box),
+ tTitle(title),
min(vmin),
max(vmax),
reactiveOnTrack(reactiveontrack)
//mwtSlider->setValueText(title);
mwtSlider->valueChanged().connect(this,&SliderWidget::OnSliderTrack);
mwtSlider->sliderMoved().connect(this,&SliderWidget::OnSliderMove);
+ // mwtSlider->resize(Wt::WLength::Auto, 50);
// If asked : creation of the other little slider which allows to change
//---------------------------------------------------------------------
// 2) Insertion of the components in the window
std::cout<<"Creando SLIDER -- 4 "<<std::endl;
- layout->addWidget(new Wt::WText(title),,Wt::WBorderLayout::North);
+ textTitle = new Wt::WText(tTitle + bbtk::std2wt(" : ")+ mwtSlider->valueText());
+ layout->addWidget(textTitle,Wt::WBorderLayout::North);
layout->addWidget(mwtSlider,Wt::WBorderLayout::Center);
std::cout<<"Creando SLIDER -- 5 "<<std::endl;
// Insert the sizer in the main panel and refresh the layout
}
// and signal that the output has changed
mBox->bbSignalOutputModification(std::string("Out"));
-
+ textTitle->setText(tTitle + bbtk::std2wt(" : ") + mwtSlider->valueText());
}
}
// and signal that the output has changed
mBox->bbSignalOutputModification(std::string("Out"));
+ textTitle->setText(tTitle + bbtk::std2wt(" : ") + mwtSlider->valueText());
}
);
// std::cout << "w = "<<w<<std::endl;
// w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
-
+ w->setMinimumSize(Wt::WLength::Auto, 120);
+ w->setMaximumSize(Wt::WLength::Auto, 200);
bbSetOutputWidget( w );
}
mRenderer.init() ; \
" + w->jsRef() + ".mRenderer = mRenderer;";
- w->resize(Wt::WLength::Auto, 500);
+ w->resize(Wt::WLength::Auto, 700);
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
-void ViewerNVWeb::Process()
+/*void ViewerNVWeb::Process()
{
//------------- This part works perfectly, uncomment it for use it safe
w->doJavaScript(jsCom);
*/
- Wt::WContainerWidget* w = (Wt::WContainerWidget*)bbGetOutputWidget();
+ /* Wt::WContainerWidget* w = (Wt::WContainerWidget*)bbGetOutputWidget();
cont++;
std::string jsCom;
- //}
- //else if(cont == 2)
- //{
+
if(nType.size() >1)
{
" + wtWindow2->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
" + wtWindow2->jsRef() + ".mRenderer.render();";
}
- //}
- //else if(cont == 3)
- //{
+
if(nType.size() >2 )
{
jsCom = jsCom + "\
" + wtWindow3->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
" + wtWindow3->jsRef() + ".mRenderer.render();";
}
-// }
-// else if(cont == 4)
-// {
+
if(nType.size() > 3)
{
jsCom = jsCom + "\
" + w->jsRef() +".mVolume.windowLow =0;\
" + w->jsRef() +".mVolume.windowHigh =1900;";
- // jsCom = jsCom + "\
+
+ jsCom = jsCom + "\
var gui = new dat.GUI();\
var volumegui = gui.addFolder('Volume');\
var vrController = volumegui.add(" + w->jsRef() +".mVolume, 'volumeRendering');\
var opacityController = volumegui.add(" + w->jsRef() +".mVolume, 'opacity', 0, 1).listen();\
- var lowerWindowController = volumegui.add(" + w->jsRef() +".mVolume, 'windowLow', " + w->jsRef() +".mVolume.min," + w->jsRef() +".mVolume.max);\
- var upperWindowController = volumegui.add(" + w->jsRef() +".mVolume, 'windowHigh', " + w->jsRef() +".mVolume.min, " + w->jsRef() +".mVolume.max);\
+ var lowerWindowController = volumegui.add(" + w->jsRef() +".mVolume, 'windowLow', 0,2000);\
+ var upperWindowController = volumegui.add(" + w->jsRef() +".mVolume, 'windowHigh', 0,2000);\
volumegui.open();\
var lowerThresholdController = volumegui.add(" + w->jsRef() +".mVolume, 'lowerThreshold'," + w->jsRef() +".mVolume.min, " + w->jsRef() +".mVolume.max);\
- var upperThresholdController = volumegui.add(" + w->jsRef() +".mVolume, 'upperThreshold'," + w->jsRef() +".mVolume.min, " + w->jsRef() +".mVolume.max);";
+ var upperThresholdController = volumegui.add(" + w->jsRef() +".mVolume, 'upperThreshold'," + w->jsRef() +".mVolume.min, " + w->jsRef() +".mVolume.max);";
+ }
+
+ if(nType.size() >1)
+ {
+ jsCom = jsCom + "\
+ },2000);";
+ }
+
+
+
+
+ std::cout<<"PROCESSSSS>>>>"<<jsCom<<std::endl;
+ //w->doJavaScript(jsCom);
+
+ Wt::WApplication::instance()->refresh();
+
+
+
+}*/
+
+void ViewerNVWeb::Process()
+{
+
+
+ Wt::WContainerWidget* w = (Wt::WContainerWidget*)bbGetOutputWidget();
+
+ cont++;
+ std::string jsCom;
+
+ std::cout<<"Process ----"<<std::endl;
+
+ jsCom = "\
+ var volume = new X.volume();\
+ volume.spacing = [0.7,0.7,0.7 ];\
+ volume.center = [0,0,0];\
+ volume.file = '" + bbGetInputImagePath() + "';\
+ " + w->jsRef() +".mVolume = volume;\
+ " + wtWindow1->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
+ " + wtWindow1->jsRef() + ".onShowTime = function(){";
+
+
+ if(nType.size() >1)
+ {
+ jsCom = jsCom + "\
+ " + wtWindow2->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
+ " + wtWindow2->jsRef() + ".mRenderer.render();";
+ }
+
+ if(nType.size() >2 )
+ {
+ jsCom = jsCom + "\
+ " + wtWindow3->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
+ " + wtWindow3->jsRef() + ".mRenderer.render();";
+ }
+
+ if(nType.size() > 3)
+ {
+ jsCom = jsCom + "\
+ " + wtWindow4->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
+ " + wtWindow4->jsRef() + ".mRenderer.render();\
+ " + w->jsRef() +".mVolume.upperTheshold =0;\
+ " + w->jsRef() +".mVolume.windowLow =0;\
+ " + w->jsRef() +".mVolume.windowHigh =1900;";
+
+
jsCom = jsCom + "\
var gui = new dat.GUI();\
var volumegui = gui.addFolder('Volume');\
var upperWindowController = volumegui.add(" + w->jsRef() +".mVolume, 'windowHigh', 0,2000);\
volumegui.open();\
var lowerThresholdController = volumegui.add(" + w->jsRef() +".mVolume, 'lowerThreshold'," + w->jsRef() +".mVolume.min, " + w->jsRef() +".mVolume.max);\
- var upperThresholdController = volumegui.add(" + w->jsRef() +".mVolume, 'upperThreshold'," + w->jsRef() +".mVolume.min, " + w->jsRef() +".mVolume.max);\
- },2000);";
+ var upperThresholdController = volumegui.add(" + w->jsRef() +".mVolume, 'upperThreshold'," + w->jsRef() +".mVolume.min, " + w->jsRef() +".mVolume.max);";
}
- // jsCom = jsCom + "\
- var gui = new dat.GUI();\
- var volumegui = gui.addFolder('Volume');\
- var vrController = volumegui.add(" + w->jsRef() +".mVolume, 'volumeRendering');\
- var opacityController = volumegui.add(" + w->jsRef() +".mVolume, 'opacity', 0, 1).listen();";
-
-// }
-// }
-//
-
+
+
+ jsCom = jsCom + "\
+ };\
+ " + wtWindow1->jsRef() + ".mRenderer.render();";
}
+
+
//--------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------
" + wtWindow3->jsRef() + ".mRenderer.render();\
" + wtWindow4->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
" + wtWindow4->jsRef() + ".mRenderer.render();\
- },1500);";
-
-
- // jsCom = "\
- setTimeout(function(){\
+ },1500);\
+ setTimeout(function(){\
+ " + wtWindow2->jsRef() + ".mRenderer.render();\
+ " + wtWindow3->jsRef() + ".mRenderer.render();\
+ " + wtWindow4->jsRef() + ".mRenderer.render();\
+ },3000);";
+
+ //jsCom = "\
var volume = new X.volume();\
volume.spacing = [0.7,0.7,0.7 ];\
volume.file = '" + bbGetInputImagePath() + "';\
];\
" +w->jsRef() + ".mVolume.center = center;\
volume.center = [0,0,0];\
- },100);\
- " + wtWindow1->jsRef() + ".mRenderer.onShowtime=function(){\
- " + w->jsRef() +".mVolume.upperThreshold =20000;\
+ setTimeout(function(){\
+ " + wtWindow1->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
+ },300);\
+ " + wtWindow1->jsRef() + ".mRenderer.onShowTime = function(){\
+ " + w->jsRef() +".mVolume.upperThreshold =20000;\
" + w->jsRef() +".mVolume.windowHigh =1670;\
var gui = new dat.GUI();\
var volumegui = gui.addFolder('Volume');\
" + wtWindow3->jsRef() + ".mRenderer.render();\
" + wtWindow4->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
" + wtWindow4->jsRef() + ".mRenderer.render();\
- };\
- setTimeout(function(){\
- " + wtWindow1->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
- " + wtWindow1->jsRef() + ".mRenderer.render();\
- },300);\
- ";
-
- // jsCom = jsCom + "\
- setTimeout(function(){\
- " + wtWindow2->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
- " + wtWindow2->jsRef() + ".mRenderer.render();";
-
-
-
- // jsCom = jsCom + "\
- " + wtWindow3->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
- " + wtWindow3->jsRef() + ".mRenderer.render();";
-
-
-
- // jsCom = jsCom + "\
- " + wtWindow4->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
- " + wtWindow4->jsRef() + ".mRenderer.render();";
-
+ };\
+ " + wtWindow1->jsRef() + ".mRenderer.render();";
+
- // jsCom = jsCom + "\
- " + w->jsRef() +".mVolume = volume;\
- " + w->jsRef() +".mVolume.lowerThreshold =0;\
- " + w->jsRef() +".mVolume.upperThreshold =20000;\
- " + w->jsRef() +".mVolume.windowHigh =1670;\
- var gui = new dat.GUI();\
- var volumegui = gui.addFolder('Volume');\
- var vrController = volumegui.add(" + w->jsRef() +".mVolume, 'volumeRendering');\
- var opacityController = volumegui.add(" + w->jsRef() +".mVolume, 'opacity', 0, 1);\
- var lowerWindowController = volumegui.add(" + w->jsRef() +".mVolume, 'windowLow', 0,2000);\
- var upperWindowController = volumegui.add(" + w->jsRef() +".mVolume, 'windowHigh', 0,2000);\
- volumegui.open();\
- },1000);";
-
- // jsCom = jsCom + "\
- setTimeout(function(){\
- var gui = new dat.GUI();\
- var volumegui = gui.addFolder('Volume');\
- var vrController = volumegui.add(" + w->jsRef() +".mVolume, 'volumeRendering');\
- var opacityController = volumegui.add(" + w->jsRef() +".mVolume, 'opacity', 0, 1);\
- var lowerWindowController = volumegui.add(" + w->jsRef() +".mVolume, 'windowLow', 0,2000);\
- var upperWindowController = volumegui.add(" + w->jsRef() +".mVolume, 'windowHigh', 0,2000);\
- var sliceXController = volumegui.add(" + w->jsRef() +".mVolume, 'indexX', 0,volume.range[0] - 1);\
- var sliceYController = volumegui.add(" + w->jsRef() +".mVolume, 'indexY', 0,volume.range[1] - 1);\
- var sliceZController = volumegui.add(" + w->jsRef() +".mVolume, 'indexZ', 0,volume.range[2] - 1);\
- volumegui.open();\
- },500);";
std::cout<<"LOADzzzzzzzzzzzzzzzzzzzzzzzzzzzz"<<jsCom<<std::endl;
w->doJavaScript(jsCom);
+
+
//Wt::WApplication::instance()->refresh();
- wtWindow2->resize(Wt::WLength::Auto, 200);
- wtWindow3->resize(Wt::WLength::Auto, 200);
- wtWindow4->resize(Wt::WLength::Auto, 200);
+ // wtWindow2->resize(Wt::WLength::Auto, 200);
+ // wtWindow3->resize(Wt::WLength::Auto, 200);
+ // wtWindow4->resize(Wt::WLength::Auto, 200);
+
+
+ Wt::WApplication::instance()->refresh();
w->setLayout(l2);
-
+
+ wtWindow1->setStyleClass("black-box");
+ wtWindow2->setStyleClass("black-box");
+ wtWindow3->setStyleClass("black-box");
+ wtWindow4->setStyleClass("black-box");
+
wtWindow1->configureWt();
wtWindow2->configureWt();
wtWindow3->configureWt();
wtWindow4->configureWt();
- wtWindow1->setStyleClass("black-box");
- wtWindow2->setStyleClass("black-box");
- wtWindow3->setStyleClass("black-box");
- wtWindow4->setStyleClass("black-box");
-
bbSetOutputviewer1(wtWindow1->jsRef());
bbSetOutputviewer2(wtWindow2->jsRef());
bbSetOutputviewer3(wtWindow3->jsRef());