]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx
Feature #1771 Add licence terms for all files.
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxVtkSceneManager.cxx
index b5e431c7c3816a5368d4ec88efde27a08bca5075..387924595fad242bf42b9a9a4ff340acb434dbd8 100644 (file)
@@ -1,3 +1,28 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Santé)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------  
+*/
+
 /*=========================================================================
  Program:   bbtk
  Module:    $RCSfile$
@@ -40,6 +65,8 @@
 
 namespace bbtk {
 
+#define POORT_MAX_LINE_SIZE_INTERPRETER 1500
+
 //=========================================================================
        
 // EED 15 oct 2012  wxVtkSceneManager::wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager,Factory::Pointer bbtkfactory) 
@@ -104,7 +131,6 @@ wxVtkSceneManager::~wxVtkSceneManager()
 
 void wxVtkSceneManager::configureBaseView() 
 {
-       printf("EED wxVtkSceneManager::configureBaseView 0\n");
        vtkInteractorStyleBaseView2D *interactorstylebaseview = vtkInteractorStyleBaseView2D::New();
 
        _baseView->SetInteractorStyleBaseView(interactorstylebaseview);
@@ -192,7 +218,6 @@ void wxVtkSceneManager::configureBaseView()
        _aPolygonMapper->Modified();
 
        _baseView->GetRenderer()->AddActor(_fillObjectActor);
-       printf("EED wxVtkSceneManager::configureBaseView 1\n");
 }
 
 //=========================================================================
@@ -1849,14 +1874,12 @@ void wxVtkSceneManager::getCleanLine(stringstream &inputStream, std::string &lin
 //=========================================================================
 void wxVtkSceneManager::loadDiagram(stringstream &inputStream) 
 {
-       printf("EED wxVtkSceneManager::loadDiagram Start \n");
        int size;
        std::string version = "<void>";
        std::string line = "";
        char delims[] = ":";
        char *result = NULL;
-       int MAX_LINE_SIZE=1500;
-       char poort[MAX_LINE_SIZE];
+       char poort[POORT_MAX_LINE_SIZE_INTERPRETER];
 
        getCleanLine(inputStream, line);
 
@@ -2196,9 +2219,9 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                        while (port == "PORT") 
                        {
                                getCleanLine(inputStream, line);//name:value
-                               if (line.length()>=MAX_LINE_SIZE-1)
+                               if (line.length()>=POORT_MAX_LINE_SIZE_INTERPRETER-1)
                                {
-                                       line=line.substr(0, MAX_LINE_SIZE-1);
+                                       line=line.substr(0, POORT_MAX_LINE_SIZE_INTERPRETER-1);
                                }
                                
                                strcpy(poort, line.c_str());
@@ -2294,20 +2317,16 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream)
                                        conView->getManualContourView()->AddPoint();
                                }
                        }// version !=1.0
-
                } // for numConns
-
-       } // start
-       
-printf("EED wxVtkSceneManager::loadDiagram End \n");
-
+       } // start      
 }
 //=========================================================================
 
 
 //=========================================================================
 void wxVtkSceneManager::configGComBoxInputOutputPort(bool inputoutput,
-               std::string portName, double xIn, double yIn, double zIn) {
+               std::string portName, double xIn, double yIn, double zIn) 
+{
        int idPort;
        if (inputoutput == true) {
                idPort = createGComplexBoxInputPort(portName);
@@ -2323,7 +2342,8 @@ void wxVtkSceneManager::configGComBoxInputOutputPort(bool inputoutput,
 
 
 //=========================================================================
-GBoxModel* wxVtkSceneManager::findGBox(std::string boxname) {
+GBoxModel* wxVtkSceneManager::findGBox(std::string boxname) 
+{
        int j;
        int idB;
        GBoxModel *bMod;