AUTHOR:Author ??
COMPLEXBOX:FALSE
COMPLEXINPUTS:0
-BOXES:20
+BOXES:17
BOX
vtk:LoadHola:Box00
ISEXEC:FALSE
-19.706028:4.218308:-900.000000
-65.281028:-5.781692:-900.000000
+60.324137:-36.902724:-900.000000
+105.899137:-46.902724:-900.000000
FIN_BOX
BOX
itk:BinaryThresholdImageFilter:Box02
ISEXEC:FALSE
-110.969172:-113.546435:-900.000000
-182.144172:-123.546435:-900.000000
+57.945666:-128.858036:-900.000000
+129.120666:-138.858036:-900.000000
PORT
InsideValue:"255"
PORT
BOX
vtk:MarchingCubes:Box05
ISEXEC:FALSE
-98.769445:-206.135374:-900.000000
-144.344445:-216.135374:-900.000000
+42.059812:-205.568278:-900.000000
+87.634812:-215.568278:-900.000000
PORT
ComputeNormalsOn:"true"
PORT
FIN_BOX
BOX
vtk:ImageContinuousErode3D:Box06
-ISEXEC:FALSE
-112.040179:-136.271704:-900.000000
-183.215179:-146.271704:-900.000000
+ISEXEC:TRUE
+55.330546:-148.747823:-900.000000
+126.505546:-158.747823:-900.000000
PORT
KernelSizeX:"3"
PORT
BOX
vtk:SegmentationConnectivity:Box09
ISEXEC:FALSE
-112.425062:-157.933155:-900.000000
-183.600062:-167.933155:-900.000000
+54.014140:-166.439600:-900.000000
+125.189140:-176.439600:-900.000000
PORT
PositionXYZ:"73 101 93"
PORT
BOX
wt:ViewerNVWeb:Box12
ISEXEC:FALSE
--79.966168:-202.388734:-900.000000
--34.391168:-212.388734:-900.000000
+-101.034885:-197.398691:-900.000000
+-55.459885:-207.398691:-900.000000
PORT
-ImagePath:"xx"
+ImagePath:"imagesTMP/hola.nii"
FIN_BOX
BOX
wt:Slider:Box15
ISEXEC:FALSE
--135.346214:-66.177168:-900.000000
--87.026214:-76.177168:-900.000000
+-121.482446:-62.619179:-900.000000
+-73.162446:-72.619179:-900.000000
PORT
In:"1250"
PORT
BOX
wt:Slider:Box16
ISEXEC:FALSE
--153.534026:-38.309300:-900.000000
--105.214026:-48.309300:-900.000000
+-163.108601:-79.545339:-900.000000
+-114.788601:-89.545339:-900.000000
PORT
In:"1500"
PORT
BOX
wt:LayoutLine:Box17
ISEXEC:FALSE
--184.557478:-126.277482:-900.000000
--126.997478:-136.277482:-900.000000
+-170.375687:-198.734780:-900.000000
+-112.815687:-208.734780:-900.000000
FIN_BOX
BOX
wt:CommandButton:Box21
ISEXEC:FALSE
--126.882350:-88.359946:-900.000000
--81.307350:-98.359946:-900.000000
-PORT
-Label:"Run...Q"
-FIN_BOX
-BOX
-wt:configServerWT:Box24
-ISEXEC:TRUE
-4.308157:-272.491944:-900.000000
-49.883157:-282.491944:-900.000000
+-189.489664:-97.152664:-900.000000
+-143.914664:-107.152664:-900.000000
PORT
-DocRoot:"/var/www/testwtdbg/docroot/appli1/"
-PORT
-Port:"8082"
-FIN_BOX
-BOX
-itk:ImageWriter:Box26
-ISEXEC:FALSE
--2.355526:-180.973757:-900.000000
-43.219474:-190.973757:-900.000000
-FIN_BOX
-BOX
-std:ConcatStrings:Box27
-ISEXEC:FALSE
--40.193736:-128.049015:-900.000000
-5.381264:-138.049015:-900.000000
-PORT
-In1:"/var/www/testwtdbg/docroot/appli1/"
-FIN_BOX
-BOX
-std:ConcatStrings:Box28
-ISEXEC:FALSE
--27.981750:-150.063096:-900.000000
-17.593250:-160.063096:-900.000000
-PORT
-In2:"/imagesTMP/"
-PORT
-In3:"hola.nii"
+Label:"Segmentation"
FIN_BOX
BOX
vtk:ImageGaussianSmooth:Box29
ISEXEC:FALSE
-106.977757:-186.112622:-900.000000
-178.152757:-196.112622:-900.000000
+51.402317:-187.813911:-900.000000
+122.577317:-197.813911:-900.000000
PORT
StdDevX:"0"
PORT
BOX
wt:Slider:Box31
ISEXEC:FALSE
--169.916356:-14.173068:-900.000000
--121.596356:-24.173068:-900.000000
+-78.667210:-47.626578:-900.000000
+-30.347210:-57.626578:-900.000000
PORT
In:"1"
PORT
BOX
wt:AddMeshB:Box37
ISEXEC:FALSE
-13.203509:-245.183527:-900.000000
-58.778509:-255.183527:-900.000000
+38.683815:-225.123788:-900.000000
+84.258815:-235.123788:-900.000000
FIN_BOX
BOX
-wt:ImageWriteB:Box33
+wt:configServerWT:Box38
ISEXEC:TRUE
--76.199317:-160.688358:-900.000000
--30.624317:-170.688358:-900.000000
+86.797340:-60.838054:-900.000000
+132.372340:-70.838054:-900.000000
+PORT
+DocRoot:"/var/www/testwtdbg/docroot/appli1/"
+PORT
+Port:"8082"
FIN_BOX
BOX
-wt:OutputText:Box35
-ISEXEC:FALSE
--129.329787:-182.455051:-900.000000
--83.754787:-192.455051:-900.000000
+wt:ImageWriteB:Box39
+ISEXEC:TRUE
+16.790413:-59.780862:-900.000000
+62.365413:-69.780862:-900.000000
FIN_BOX
BOX
-wt:LayoutSplit:Box36
+wt:LayoutSplit:Box40
ISEXEC:TRUE
--117.324457:-252.223720:-900.000000
--71.749457:-262.223720:-900.000000
+-143.571980:-228.411427:-900.000000
+-97.996980:-238.411427:-900.000000
PORT
Orientation:"h"
FIN_BOX
-CONNECTIONS:28
+BOX
+wt:OutputText:Box25
+ISEXEC:FALSE
+-194.819427:-148.967664:-900.000000
+-149.244427:-158.967664:-900.000000
+PORT
+In:"ALT-left to refresh screen"
+FIN_BOX
+CONNECTIONS:22
CONNECTION
Box00:Out:Box02:In
NumberOfControlPoints:0
Box21:Widget:Box17:Widget5
NumberOfControlPoints:0
CONNECTION
-Box00:Out:Box26:In
-NumberOfControlPoints:0
-CONNECTION
-Box27:Out:Box28:In1
-NumberOfControlPoints:0
-CONNECTION
-Box28:Out:Box26:Filename
-NumberOfControlPoints:0
-CONNECTION
Box09:Out:Box29:In
NumberOfControlPoints:0
CONNECTION
Box12:Viewer1:Box37:viewerwt
NumberOfControlPoints:0
CONNECTION
-Box21:BoxChange:Box37:boxExecute
-NumberOfControlPoints:0
-CONNECTION
-Box00:Out:Box33:Image
+Box00:Out:Box39:Image
NumberOfControlPoints:0
CONNECTION
-Box35:Widget:Box17:Widget4
+Box17:Widget:Box40:Widget1
NumberOfControlPoints:0
CONNECTION
-Box33:FileName:Box35:In
+Box12:Widget:Box40:Widget2
NumberOfControlPoints:0
CONNECTION
-Box21:BoxChange:Box35:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
-Box17:Widget:Box36:Widget1
-NumberOfControlPoints:0
-CONNECTION
-Box12:Widget:Box36:Widget2
+Box21:BoxChange:Box37:boxExecute
NumberOfControlPoints:0
CONNECTION
-Box33:FileName:Box12:ImagePath
+Box39:FileName:Box12:ImagePath
NumberOfControlPoints:0
CONNECTION
-Box33:out:Box24:BoxExecute
+Box25:Widget:Box17:Widget6
NumberOfControlPoints:0
APP_END
include vtk
include itk
include wt
-include std
author "Author ??"
description "Description ??"
set Box09.ThresholdMinMax "200 300"
new wt:ViewerNVWeb Box12
- set Box12.ImagePath "xx"
+ set Box12.ImagePath "imagesTMP/hola.nii"
new wt:Slider Box15
set Box15.In "1250"
new wt:LayoutLine Box17
new wt:CommandButton Box21
- set Box21.Label "Run...Q"
-
-new wt:configServerWT Box24
- set Box24.DocRoot "/var/www/testwtdbg/docroot/appli1/"
- set Box24.Port "8082"
-
-new itk:ImageWriter Box26
-
-new std:ConcatStrings Box27
- set Box27.In1 "/var/www/testwtdbg/docroot/appli1/"
-
-new std:ConcatStrings Box28
- set Box28.In2 "/imagesTMP/"
- set Box28.In3 "hola.nii"
+ set Box21.Label "Segmentation"
new vtk:ImageGaussianSmooth Box29
set Box29.StdDevX "0"
new wt:AddMeshB Box37
-new wt:ImageWriteB Box33
+new wt:configServerWT Box38
+ set Box38.DocRoot "/var/www/testwtdbg/docroot/appli1/"
+ set Box38.Port "8082"
+
+new wt:ImageWriteB Box39
-new wt:OutputText Box35
+new wt:LayoutSplit Box40
+ set Box40.Orientation "h"
-new wt:LayoutSplit Box36
- set Box36.Orientation "h"
+new wt:OutputText Box25
+ set Box25.In "ALT-left to refresh screen"
connect Box00.Out Box02.In
connect Box21.Widget Box17.Widget5
-connect Box00.Out Box26.In
-
-connect Box27.Out Box28.In1
-
-connect Box28.Out Box26.Filename
-
connect Box09.Out Box29.In
connect Box31.Widget Box17.Widget1
connect Box12.Viewer1 Box37.viewerwt
-connect Box21.BoxChange Box37.boxExecute
-
-connect Box00.Out Box33.Image
+connect Box00.Out Box39.Image
-connect Box35.Widget Box17.Widget4
+connect Box17.Widget Box40.Widget1
-connect Box33.FileName Box35.In
+connect Box12.Widget Box40.Widget2
-connect Box21.BoxChange Box35.BoxExecute
-
-connect Box17.Widget Box36.Widget1
-
-connect Box12.Widget Box36.Widget2
+connect Box21.BoxChange Box37.boxExecute
-connect Box33.FileName Box12.ImagePath
+connect Box39.FileName Box12.ImagePath
-connect Box33.out Box24.BoxExecute
+connect Box25.Widget Box17.Widget6
# Complex input ports
-exec Box24
-exec Box33
-exec Box36
+exec Box06
+exec Box38
+exec Box39
+exec Box40
COMPLEXBOX:TRUE
COMPLEXBOXNAME:AddMeshB
PACKAGENAME:wt
-COMPLEXOUTPUTS:1
-COMPLEX_PORT
-out
--63.140570:-83.461272:-900.000000
-FIN_COMPLEX_PORT
+COMPLEXOUTPUTS:0
COMPLEXINPUTS:3
COMPLEX_PORT
boxExecute
BOX
std:RandomString:Box04
ISEXEC:FALSE
-72.734827:21.182375:-900.000000
-118.309827:11.182375:-900.000000
+-6.661884:3.538662:-900.000000
+38.913116:-6.461338:-900.000000
PORT
BoxProcessMode:"Reactive"
FIN_BOX
BOX
std:MultipleInputs:Box11
ISEXEC:FALSE
--64.412233:45.152810:-900.000000
--18.837233:35.152810:-900.000000
+-64.763199:49.407780:-900.000000
+-19.188199:39.407780:-900.000000
PORT
BoxProcessMode:"Reactive"
FIN_BOX
116.484416:-14.508239:-900.000000
162.059416:-24.508239:-900.000000
FIN_BOX
-CONNECTIONS:13
+CONNECTIONS:12
CONNECTION
Box04:Out:Box05:In2
NumberOfControlPoints:0
boxExecute:boxExecute:Box11:BoxExecute
NumberOfControlPoints:0
CONNECTION
-Box11:BoxChange:Box09:BoxExecute
+Box12:DocRoot:Box07:In1
NumberOfControlPoints:0
CONNECTION
Box11:BoxChange:Box10:BoxExecute
Box11:BoxChange:Box04:BoxExecute
NumberOfControlPoints:0
CONNECTION
-Box11:BoxChange:out:out
-NumberOfControlPoints:0
-CONNECTION
-Box12:DocRoot:Box07:In1
+Box11:BoxChange:Box09:BoxExecute
NumberOfControlPoints:0
APP_END
connect Box06.Out Box07.In2
connect Box07.Out Box09.Filename
connect Box06.Out Box10.Mesh
-connect Box11.BoxChange Box09.BoxExecute
+connect Box12.DocRoot Box07.In1
connect Box11.BoxChange Box10.BoxExecute
connect Box11.BoxChange Box04.BoxExecute
-connect Box12.DocRoot Box07.In1
+connect Box11.BoxChange Box09.BoxExecute
# Complex input ports
input vtkPolyData Box09.In " "
input boxExecute Box11.BoxExecute " "
# Complex output ports
-output out Box11.BoxChange " "
message
-31.511542:19.529497:-900.000000
14.063458:9.529497:-900.000000
PORT
-In1:"Image_"
+In1:"hola"
PORT
In3:".nii"
FIN_BOX
BOX
wt:GetConfigServerWt:Box02
ISEXEC:FALSE
--111.255962:3.228152:-900.000000
--65.680962:-6.771848:-900.000000
+-98.729444:17.178138:-900.000000
+-53.154444:7.178138:-900.000000
FIN_BOX
BOX
std:RandomString:Box03
ISEXEC:FALSE
--22.477657:39.017820:-900.000000
-23.097343:29.017820:-900.000000
+-30.164384:67.060138:-900.000000
+15.410616:57.060138:-900.000000
FIN_BOX
BOX
std:ConcatStrings:Box04
ISEXEC:FALSE
--40.928359:0.461165:-900.000000
-4.646641:-9.538835:-900.000000
+-40.928359:0.318818:-900.000000
+4.646641:-9.681182:-900.000000
PORT
In1:"imagesTMP/"
FIN_BOX
Image:Image:Box01:In
NumberOfControlPoints:0
CONNECTION
-Box03:Out:Box00:In2
-NumberOfControlPoints:0
-CONNECTION
Box00:Out:Box04:In2
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box01:BoxChange:out:out
NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box00:In2
+NumberOfControlPoints:0
APP_END
category "<VOID>"
new ConcatStrings Box00
- set Box00.In1 "Image_"
+ set Box00.In1 "hola"
set Box00.In3 ".nii"
new ImageWriter Box01
set Box05.In2 "/"
-connect Box03.Out Box00.In2
connect Box00.Out Box04.In2
connect Box02.DocRoot Box05.In1
connect Box04.Out Box05.In3
connect Box05.Out Box01.Filename
+connect Box03.Out Box00.In2
# Complex input ports
input Image Box01.In " "
--- /dev/null
+//=====
+// 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)
+//=====
+#include "bbwtGetConfigServerWt.h"
+#include "bbwtPackage.h"
+#include "bbtkWtBlackBox.h"
+
+namespace bbwt
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,GetConfigServerWt)
+BBTK_BLACK_BOX_IMPLEMENTATION(GetConfigServerWt,bbtk::AtomicBlackBox);
+//=====
+// 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 GetConfigServerWt::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (the one provided in the attribute 'name' of the tag 'input')
+// * TYPE is the C++ type of the input/output
+// (the one provided in the attribute 'type' of the tag 'input')
+
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ bbSetOutputPort( bbtk::WtBlackBox::wtServerData::port );
+ bbSetOutputDocRoot( bbtk::WtBlackBox::wtServerData::docRoot );
+
+}
+//=====
+// 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 GetConfigServerWt::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+// bbSetInputIn(0);
+
+}
+//=====
+// 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 GetConfigServerWt::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// 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 GetConfigServerWt::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbwt
+
+
--- /dev/null
+//=====
+// 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)
+//=====
+#ifndef __bbwtGetConfigServerWt_h_INCLUDED__
+#define __bbwtGetConfigServerWt_h_INCLUDED__
+#include "bbwt_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+namespace bbwt
+{
+
+class bbwt_EXPORT GetConfigServerWt
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(GetConfigServerWt,bbtk::AtomicBlackBox);
+//=====
+// 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(In,double);
+ BBTK_DECLARE_OUTPUT(Port,std::string);
+ BBTK_DECLARE_OUTPUT(DocRoot,std::string);
+ BBTK_PROCESS(Process);
+ void Process();
+//=====
+// 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_BEGIN_DESCRIBE_BLACK_BOX(GetConfigServerWt,bbtk::AtomicBlackBox);
+ BBTK_NAME("GetConfigServerWt");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+// BBTK_INPUT(GetConfigServerWt,In,"First input",double,"");
+ BBTK_OUTPUT(GetConfigServerWt,Port,"port",std::string,"");
+ BBTK_OUTPUT(GetConfigServerWt,DocRoot,"doc root",std::string,"");
+BBTK_END_DESCRIBE_BLACK_BOX(GetConfigServerWt);
+//=====
+// 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)
+//=====
+}
+// EO namespace bbwt
+
+#endif // __bbwtGetConfigServerWt_h_INCLUDED__
+
parent,
bbtk::std2wt ( bbGetInputIn() ) ,
bbtk::std2wt ( bbGetInputTitle() ) ) );
- Process();
+//EED Process();
}
//=====
// 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)
parent,
bbtk::std2wt ( bbGetInputIn() ) ,
bbtk::std2wt ( bbGetInputTitle() ) ) );
-
+ Process();
}
//=====
// 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( new OutputTextWidget(parent,bbtk::std2wt(bbGetInputIn()))) ;
- Process();
+//EED Process();
}
//=====
void OutputTextWidget::setTextValue(Wt::WString newText)
{
std::cout<<"CAMBIANDO TEXTO--"<<bbtk::wt2std(newText)<<std::endl;
- mText->setText(newText);
+//EED mText->setText(newText);
}
Wt::WString OutputTextWidget::getTextValue()
{
bbSetOutputWidget( new OutputTextWidget(parent,bbtk::std2wt(bbGetInputIn()))) ;
- Process();
+//EED Process();
}
//=====
-
-
-void updatePath (std::string sPath)
-{
- bbSetOutputOutPath(sPath);
-}
-
// 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 OutputText::bbUserSetDefaultValues()
//=====
// 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()
-{
-
- //------------- This part works perfectly, uncomment it for use it safe
- /*Wt::WContainerWidget* w = (Wt::WContainerWidget*)bbGetOutputWidget();
-
- cont++;
- std::string jsCom;
-
-
- //jsCom = "\
- " + wtWindow1->jsRef() + ".mRenderer.add(" +bbGetInputImagePath() + ".mObject);\
- " + wtWindow1->jsRef() + ".mRenderer.render();";
-
- std::cout<<std::endl;
- std::cout<<std::endl;
- std::cout<<std::endl;
- std::cout<<std::endl;
- std::cout<<"CADENA -- "<<std::endl;
- std::cout<<jsCom<<std::endl;
-
- //jsCom = "\
- var volume = new X.volume();\
- volume.file = '" + bbGetInputImagePath() + "';\
- " + wtWindow1->jsRef() + ".mRenderer.add(volume);\
- " + wtWindow1->jsRef() + ".mRenderer.render();";
-
-
- jsCom = "\
- var volume = new X.volume();\
- volume.file = '" + bbGetInputImagePath() + "';\
- " + w->jsRef() +".mVolume = volume;\
- " + wtWindow1->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
- " + wtWindow1->jsRef() + ".mRenderer.render();";
-
-
- 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();";
- }
-
-
-
-
- std::cout<<"PROCESSSSS>>>>"<<jsCom<<std::endl;
- w->doJavaScript(jsCom);
- */
-
- /* Wt::WContainerWidget* w = (Wt::WContainerWidget*)bbGetOutputWidget();
-
- cont++;
- std::string jsCom;
-
- std::cout<<"Process ----"<<std::endl;
-
- //if(cont ==1)
- // {
-
- 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() + ".mRenderer.render();";
-
- // jsCom = jsCom + "\
- var gui = new dat.GUI();\
- var volumegui = gui.addFolder('Volume');\
- var vrController = volumegui.add(volume, 'volumeRendering');\
- var opacityController = volumegui.add(volume, 'opacity', 0, 1).listen();\
- var lowerThresholdController = volumegui.add(volume, 'lowerThreshold',volume.min, volume.max);\
- var upperThresholdController = volumegui.add(volume, 'upperThreshold',volume.min, volume.max);\
- volumegui.open();";
-
- //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);\
- volumegui.open();";
-
-
-
-
-
-
-
-
- if(nType.size() >1)
- {
- jsCom = jsCom + "\
- setTimeout(function(){\
- " + 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 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', 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);";
- }
-
-
- 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 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', 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);";
- }
-
-
- jsCom = jsCom + "\
- };\
- " + wtWindow1->jsRef() + ".mRenderer.render();";
-
-
-
- std::cout<<"PROCESSSSS>>>>"<<jsCom<<std::endl;
- //w->doJavaScript(jsCom);
-
- Wt::WApplication::instance()->refresh();
-
-
-
-}
//--------------------------------------------------------------------------------------------------------
-//--------------------------------------------------------------------------------------------------------
-
-
-
-void ViewerNVWeb::loadImage()
+void ViewerNVWeb::Process()
{
+ printf("EED ViewerNVWeb::Process start\n ");
-
- Wt::WContainerWidget* w = (Wt::WContainerWidget*)bbGetOutputWidget();
+ Wt::WContainerWidget* w = (Wt::WContainerWidget*)bbGetOutputWidget();
std::string jsCom;
- std::cout<<"Process ----"<<std::endl;
-
-
- //jsCom = "\
+ //jsCom = "\
var volume = new X.volume();\
volume.spacing = [0.7,0.7,0.7 ];\
volume.file = '" + bbGetInputImagePath() + "';\
" + wtWindow1->jsRef() + ".mRenderer.render();\
},500";
- jsCom = "\
+
+ if (firstTime==false)
+ {
+ firstTime=false;
+ jsCom = "\
var volume = new X.volume();\
volume.spacing = [0.7,0.7,0.7 ];\
volume.file = '" + bbGetInputImagePath() + "';\
" +w->jsRef() + ".mVolume = volume;\
- var center = [0,0,0\
- ];\
+ var center = [0,0,0];\
+ " +w->jsRef() + ".mVolume.center = center;\
+ volume.center = [0,0,0];\
+ setTimeout(function(){\
+ " + wtWindow1->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
+ " + wtWindow1->jsRef() + ".mRenderer.render();\
+ },300);\
+ ";
+ w->doJavaScript(jsCom);
+ }
+
+ if (firstTime==true)
+ {
+ firstTime=false;
+ jsCom = "\
+ var volume = new X.volume();\
+ volume.spacing = [0.7,0.7,0.7 ];\
+ volume.file = '" + bbGetInputImagePath() + "';\
+ " +w->jsRef() + ".mVolume = volume;\
+ var center = [0,0,0];\
" +w->jsRef() + ".mVolume.center = center;\
volume.center = [0,0,0];\
setTimeout(function(){\
" + wtWindow3->jsRef() + ".mRenderer.render();\
" + wtWindow4->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
" + wtWindow4->jsRef() + ".mRenderer.render();\
- },3000);";
+ },3000);\
+ ";
// jsCom = "\
var volume = new X.volume();\
};\
" + wtWindow1->jsRef() + ".mRenderer.render();";
-
-
-
-
- std::cout<<"LOADzzzzzzzzzzzzzzzzzzzzzzzzzzzz"<<jsCom<<std::endl;
- w->doJavaScript(jsCom);
+ std::cout<<"LOADzzzzzzzzzzzzzzzzzzzzzzzzzzzz"<<jsCom<<std::endl;
+ w->doJavaScript(jsCom);
+ }
//Wt::WApplication::instance()->refresh();
Wt::WApplication::instance()->refresh();
+ printf("EED ViewerNVWeb::Process END\n ");
}
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
- bbSetInputImagePath("");
- int n[] = {3,2,1,0};
- std::vector<int> nn (n,n+sizeof(n)/sizeof(int));
- bbSetInputnTypeView(nn);
+ firstTime=true;
+ bbSetInputImagePath("");
+ int n[] = {3,2,1,0};
+ std::vector<int> nn (n,n+sizeof(n)/sizeof(int));
+ bbSetInputnTypeView(nn);
bbSetOutputviewer1("");
bbSetOutputviewer2("");
bbSetOutputviewer3("");
bbSetOutputWidget(w);
- loadImage();
- //Process();
+//EED loadImage();
}
void Process();
BBTK_CREATE_WIDGET(CreateWidget);
void CreateWidget(Wt::WContainerWidget* parent);
- void loadImage();
std::vector<int> nType;
+ bool firstTime;
+
/* Wt::WContainerWidget* wtWindow1;
Wt::WContainerWidget* wtWindow2;
Wt::WContainerWidget* wtWindow3;