]> Creatis software - creaWT.git/commitdiff
#3052 creaWT Feature New Normal - Install documentation master
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 10 Jan 2017 08:47:40 +0000 (09:47 +0100)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 10 Jan 2017 08:47:40 +0000 (09:47 +0100)
wt/bbtk_wt_PKG/src/bbwtViewerNVWeb.cxx
wt/data/infoConf_server_fcgi/Readme.txt

index 094ef1277eaf0d149445932f9b6e9555e1188918..9bc8f5c1a6b1e324a5513ec960cc30ee43a823f1 100644 (file)
@@ -73,8 +73,6 @@ namespace bbwt
 
  
   w->doJavaScript(jsCom);
-  std::cout<<"       REF:   "<<w->jsRef()<<std::endl;
-       std::cout<<"       CREANDO TIPO:   "<<mType<<" ---  "<<jsCom<<std::endl;
 
   }
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,ViewerNVWeb)
@@ -91,7 +89,10 @@ void ViewerNVWeb::Process()
 {
        Wt::WContainerWidget* w = (Wt::WContainerWidget*)bbGetOutputWidget();
        std::string jsCom;      
-printf("EED ViewerNVWeb::Process %s\n", bbGetInputImagePath().c_str() );
+FILE *flog;
+flog=fopen("/var/www/testwtdbg/docroot/appli1/imagesTMP/bbtk-Web.log","a+");
+fprintf(flog,"EED %p ViewerNVWeb::Process START %s\n", this, bbGetInputImagePath().c_str() );
+fclose(flog);
        bool ok;
        FILE *ff=fopen( bbGetInputImagePath().c_str() , "r" );
        if (ff)
@@ -126,25 +127,31 @@ printf("EED ViewerNVWeb::Process %s\n", bbGetInputImagePath().c_str() );
                   ";
 */
 
-/*
+flog=fopen("/var/www/testwtdbg/docroot/appli1/imagesTMP/bbtk-Web.log","a+");
+fprintf(flog,"  EED ViewerNVWeb::Process firsttime = false\n" );
+fclose(flog);
+
                          jsCom = "\
                                try{\
-                                   " +w->jsRef() + ".mVolume.file = '" + bbGetInputImagePath() + "';\
-                                   setTimeout(function(){\
-                               " + wtWindow1->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
-                                   " + wtWindow1->jsRef() + ".mRenderer.render();\
-                             },300);\
+                                       " +w->jsRef() + ".mVolume.file = '" + bbGetInputImagePath() + "';\
+                                       " +w->jsRef() + ".mVolume.modified(true);\
+                               " + wtWindow1->jsRef() + ".mRenderer.render();\
+                                       alert('firsttime=false');\
                                } catch (err) {\
                                } \
                   ";
 
                        w->doJavaScript(jsCom);
-*/
 
                }
 
                if (firstTime==true)
                {
+
+flog=fopen("/var/www/testwtdbg/docroot/appli1/imagesTMP/bbtk-Web.log","a+");
+fprintf(flog,"  EED ViewerNVWeb::Process firsttime = true \n" );
+fclose(flog);
+
                        firstTime=false;
                          jsCom = "\
                                        try{\
@@ -158,6 +165,7 @@ printf("EED ViewerNVWeb::Process %s\n", bbGetInputImagePath().c_str() );
                                    setTimeout(function(){\
                                        " + wtWindow1->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
                                            " + wtWindow1->jsRef() + ".mRenderer.render();\
+                                                       alert('(1) firsttime=true');\
                                },300);\
                                    setTimeout(function(){\
                                        " + w->jsRef() +".mVolume.upperThreshold =20000;\
@@ -177,11 +185,14 @@ printf("EED ViewerNVWeb::Process %s\n", bbGetInputImagePath().c_str() );
                                        " + wtWindow3->jsRef() + ".mRenderer.render();\
                                        " + wtWindow4->jsRef() + ".mRenderer.add(" +w->jsRef() + ".mVolume);\
                                        " + wtWindow4->jsRef() + ".mRenderer.render();\
-                               },3000);\
+                                                       alert('(2) firsttime=true');\
+                               },10000);\
                                        } catch(err) { \
                                        } \
                                        ";
                              
+
+
           // jsCom = "\
                                var volume = new X.volume();\
                                volume.spacing = [0.7,0.7,0.7 ];\
@@ -224,7 +235,11 @@ printf("EED ViewerNVWeb::Process %s\n", bbGetInputImagePath().c_str() );
        // wtWindow3->resize(Wt::WLength::Auto, 200);
        // wtWindow4->resize(Wt::WLength::Auto, 200);
         
+flog=fopen("/var/www/testwtdbg/docroot/appli1/imagesTMP/bbtk-Web.log","a+");
+fprintf(flog,"EED ViewerNVWeb::Process END \n" );
+fclose(flog);
         
+
         Wt::WApplication::instance()->refresh();
        
 
@@ -270,7 +285,6 @@ void ViewerNVWeb::CreateWidget(Wt::WContainerWidget* parent)
                wtWindow1 = new Viewer_NV(w,nType[0]);
                wtWindow1->configureWt();
                wtWindow1->setStyleClass("black-box");
-               std::cout<<"   PRUEBA 1 RENDERER"<<std::endl;
                bbSetOutputviewer1(wtWindow1->jsRef());
        }
        else if(nType.size() == 2)
index d279c770906ceccbe3906802abee4b0780d6bc3e..f06f5318154790ca0c56bc90e04af513285ec8b3 100644 (file)
@@ -1,41 +1,45 @@
 
 As root or with sudo command:
 
--1)
+1) BBTK
 Compile bbtk with the cmake option USE_WT
+(Make sure you are in a new consolo with all the thirdparty variables are loaded)
 
-0)
-yum install fcgi-devel
-yum install mod_fcgid
+2) Compile and install le package de creaWt
+definir <creaWTInstall>
+
+3)
+dnf install fcgi-devel
+dnf install mod_fcgid
 
-1) ld configuration
+4) ld configuration
 cp bbtk.conf  /etc/ld.so.conf.d/.
-1.1) check the path of the file  /etc/ld.so.conf.d/bbtk.conf
-1.2) execute :
+4.1) check the path of the file  /etc/ld.so.conf.d/bbtk.conf
+4.2) execute :
 ldconfig
 
-1.2) Check the paths of the file
+4.2) Check the paths of the file
 
-2) Create virtual site apache
+5) Create virtual site apache
 mkdir /var/www/testwtdbg
 mkdir /var/www/testwtdbg/docroot
 
 <rootBbtkWt> = /var/www/testwtdbg/docroot
 
 
-3)  Apache configuration
+6)  Apache configuration
 cp fastcgi-wt.conf /etc/httpd/conf.d/.
 service httpd restart
 
-4) wt temporary diractory
+7) wt temporary diractory
 mkdir /var/run/wt
 chown apache:apache /var/run/wt
 
-5) wt CONFIGURATION
+8) wt CONFIGURATION
 mkdir /etc/wt
 cp wt_config.xml /etc/wt/.
 
-6) Prepare wt application site 
+9) Prepare wt application site 
 
 mkdir <rootBbtkWt>/<appliBtkWt>
 chown apache:apache <rootBbtkWt>/<appliBtkWt>
@@ -45,7 +49,7 @@ ln -s <INSTALATION_BBTK>/share/Wt/resources <rootBbtkWt>/<appliBbtkWt>/resources
 ln -s <INSTALATION_creaWTInstall>/share/data/reosurcesXTK <rootBbtkWt>/resourcesXTK
 ln -s <INSTALATION_BBTK>/bin/bbiWeb.wt <rootBbtkWt>/bbiWeb.wt
 
-7) To cofigure new Package in 
+10) To cofigure new Package in 
 <rootBbtkWt>/.bbtk/bbtk_config.xml
 with 
        <bbs_path>
@@ -58,7 +62,7 @@ with
 
 
 
-8) Call application from browser
+11) Call application from browser
 http://localhost/<appliBbtkWt>/bbiWeb.php