From 8330bb7bb23c8b5521a6ab9470d0dcbd19b9117e Mon Sep 17 00:00:00 2001 From: Felipe Gonzalez Date: Thu, 9 Jul 2015 16:09:38 +0200 Subject: [PATCH] #2489 creaWt --- wt/bbtk_wt_PKG/src/bbwtViewerNVWeb.cxx | 46 +++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/wt/bbtk_wt_PKG/src/bbwtViewerNVWeb.cxx b/wt/bbtk_wt_PKG/src/bbwtViewerNVWeb.cxx index 34c75e6..4957d90 100644 --- a/wt/bbtk_wt_PKG/src/bbwtViewerNVWeb.cxx +++ b/wt/bbtk_wt_PKG/src/bbwtViewerNVWeb.cxx @@ -334,6 +334,40 @@ void ViewerNVWeb::loadImage() std::cout<<"Process ----"<jsRef() + ".mVolume = volume;\ + setTimeout(function(){\ + var center = [0,0,0\ + ];\ + " +w->jsRef() + ".mVolume.center = center;\ + volume.center = [0,0,0];\ + " + wtWindow1->jsRef() + ".mRenderer.add(" + w->jsRef() + ".mVolume);\ + " + 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');\ + 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);\ + " + wtWindow2->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\ + " + wtWindow2->jsRef() + ".mRenderer.render();\ + " + wtWindow3->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\ + " + wtWindow3->jsRef() + ".mRenderer.render();\ + " + wtWindow4->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\ + " + wtWindow4->jsRef() + ".mRenderer.render();\ + };\ + " + wtWindow1->jsRef() + ".mRenderer.render();\ + },500"; + jsCom = "\ var volume = new X.volume();\ volume.spacing = [0.7,0.7,0.7 ];\ @@ -367,7 +401,7 @@ void ViewerNVWeb::loadImage() " + wtWindow4->jsRef() + ".mRenderer.render();\ },1500);"; - //jsCom = "\ + // jsCom = "\ var volume = new X.volume();\ volume.spacing = [0.7,0.7,0.7 ];\ volume.file = '" + bbGetInputImagePath() + "';\ @@ -480,7 +514,7 @@ void ViewerNVWeb::CreateWidget(Wt::WContainerWidget* parent) l->addWidget(wtWindow1); l->addWidget(wtWindow2); - + l->setResizable(0,true,400); w->setLayout(l); wtWindow1->configureWt(); @@ -520,11 +554,12 @@ void ViewerNVWeb::CreateWidget(Wt::WContainerWidget* parent) l->addWidget(wtWindow2); l->addWidget(wtWindow3); + l->setResizable(0,true,400); aux1->setLayout(l); l2->addWidget(wtWindow1); l2->addWidget(aux1); - + l2->setResizable(0,true,400); w->setLayout(l2); wtWindow1->configureWt(); @@ -570,11 +605,14 @@ void ViewerNVWeb::CreateWidget(Wt::WContainerWidget* parent) l->addWidget(wtWindow2,0,1); l->addWidget(wtWindow3,0,2); l->addWidget(wtWindow4,0,3); + l->setColumnResizable(0,true,400); + l->setColumnResizable(1,true,400); + l->setColumnResizable(2,true,400); aux1->setLayout(l); l2->addWidget(wtWindow1); l2->addWidget(aux1); - + l2->setResizable(0,true,400); w->setLayout(l2); -- 2.47.1