X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxVtkSceneManager.h;h=dfecab706d1484a08c2ff63ae3c822de46a6f5b9;hb=b7e481b5969501d55054998e3115cddd2d6ed918;hp=fe5889c831a0ec357c4f3a2694a05dba54ee992e;hpb=806f5f22eb6e0e3d33e9f5e63efc13bd16d616a7;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h index fe5889c..dfecab7 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h @@ -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$ @@ -93,8 +118,10 @@ namespace bbtk class wxVtkSceneManager : public InteractorStyleMaracas , public Observer { public: - - wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager); + +//EED 15 oct 2012 wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager); + wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager,Factory::Pointer bbtkfactory); + ~wxVtkSceneManager(); void disconnectDrop(); @@ -116,21 +143,20 @@ namespace bbtk int createGBlackBox(int x, int y, std::string packageName, std::string boxType ); int createGComplexBoxInputPort(std::string inputName); int createGComplexBoxOutputPort(std::string outputName); - GPortController* createGPort(int portType, std::string bbtkName, std::string bbtkType, int posinBox,GBoxModel *blackBox); + GPortController* createGPort(int portType, std::string bbtkName, std::string bbtkType, std::string bbtkDescription, int posinBox,GBoxModel *blackBox); int createGInputPort(int portType, int posinBox,GBoxModel *blackBox, BlackBoxInputDescriptor *desc); int createGOutputPort(int portType, int posinBox,GBoxModel *blackBox, BlackBoxOutputDescriptor *desc); int createGConnector(GPortModel* startPort); void configGBlackBox(int idBox, double xIn, double yIn, double zIn, std::string name, bool boxExecutable,double xEn,double yEn,double zEn); - int configGConnetion( std::string nameStartBox, std::string nameStartPort, std::string - nameEndBox, std::string nameEndPort); + int configGConnetion( std::string nameStartBox, std::string nameStartPort, std::string nameEndBox, std::string nameEndPort); void configGComBoxInputOutputPort(bool inputoutput, std::string inputPortName, double xIn, double yIn,double zIn); GBoxModel* findGBox(std::string boxname); vtkRenderWindow* getRenderWindow(); - vtkRenderer* getRenderer(); + vtkRenderer* getRenderer(); virtual void update(int idController,int command); @@ -177,7 +203,7 @@ namespace bbtk std::string saveComplexBoxBBS(); //Delete the object in the list of controllers with the id given by parameter. - void deleteObject(int id); + bool deleteObject(int id); void AddControlerToBeRemove(std::vector *controllersToRemove, int id); @@ -209,7 +235,18 @@ namespace bbtk std::string GetAuthor(); std::string GetCategory(); std::string GetDescription(); - + + // RaC2012 2nd HackFest + // External Inputs was the complex inputs in previous versions + // Get names of all external inputs + std::vector< std::string> GetExternalInputsNames(); + void getCleanLine(std::stringstream &inputStream, std::string &line); + + // JGRR & CM + void printAll( int com, int sta ); + + + private: std::string _cbName; @@ -254,11 +291,15 @@ namespace bbtk vtkActor *_fillObjectActor; vtkDataSetMapper *_aPolygonMapper; + Factory::Pointer _bbtkfactory; + + std::string LineNumber(bool withLineNumber, int &value); int GetIndexInSelected(int idControler); void UnSelectBlackBoxes(); GObjectController *GetGBlackBoxControlerPointedByMouse(); void CancelConnection(); + protected: