1 /*=========================================================================
7 =========================================================================*/
9 /* ---------------------------------------------------------------------
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
14 * This software is governed by the CeCILL-B license under French law and
15 * abiding by the rules of distribution of free software. You can use,
16 * modify and/ or redistribute the software under the terms of the CeCILL-B
17 * license as circulated by CEA, CNRS and INRIA at the following URL
18 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
19 * or in the file LICENSE.txt.
21 * As a counterpart to the access to the source code and rights to copy,
22 * modify and redistribute granted by the license, users are provided only
23 * with a limited warranty and the software's author, the holder of the
24 * economic rights, and the successive licensors have only limited
27 * The fact that you are presently reading this means that you have had
28 * knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */
35 * \brief Class bbtk::BlackBox : abstract black-box interface.
39 * \class bbtk::wxVtkSceneManager
43 #ifndef __wxVtkSceneManager_h__
44 #define __wxVtkSceneManager_h__
46 //Includes same project
47 #include "GObjectsMVCFactory.h"
49 #include "GPortModel.h"
50 #include "GConnectorView.h"
51 #include "GConnectorModel.h"
52 #include "GConnectorController.h"
53 #include "vtkGPortView.h"
54 #include "manualConnectorContourView.h"
55 #include "manualConnectorContourController.h"
58 #include <bbtkBlackBoxInputDescriptor.h>
59 #include <bbtkBlackBoxDescriptor.h>
61 //Includes creaMaracasVisu
62 #include <wxVtk3DBaseView.h>
63 #include <InteractorStyleMaracas.h>
64 #include <vtkInteractorStyleBaseView2D.h>
65 #include <manualContourControler.h>
66 #include <manualContourModel.h>
69 #include <vtkRenderWindow.h>
70 #include <vtkRenderWindowInteractor.h>
71 #include <vtkRenderer.h>
72 #include <vtkInteractorStyleImage.h>
83 class wxVtkSceneManager : public InteractorStyleMaracas , public Observer
86 wxVtkSceneManager(wxDropTarget *parent, wxVtk3DBaseView *baseView, int idManager);
89 void configureBaseView();
90 void createGBlackBox(int x, int y,std::string packageName, std::string boxName);
91 void createGPort(int portType, int posinBox,GBlackBoxModel *blackBox);
92 void createGInputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxInputDescriptor *desc);
93 void createGOutputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxOutputDescriptor *desc);
94 void createGConnector(GPortModel* startPort);
96 void registerController(InteractorStyleMaracas *param);
98 vtkRenderWindow* getRenderWindow();
99 vtkRenderer* getRenderer();
101 void disconnectDrop();
103 virtual bool OnMouseMove();
105 virtual void update(int idController,int command);
109 // Last controller created
110 int _idLastController;
112 // Id of the manager, the same of the panel
115 // Boxes number in the scene
118 wxVtk3DBaseView *_baseView;
122 std::map<int,GObjectController*> _controllers;