2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
8 # This software is governed by the CeCILL-B license under French law and
9 # abiding by the rules of distribution of free software. You can use,
10 # modify and/ or redistribute the software under the terms of the CeCILL-B
11 # license as circulated by CEA, CNRS and INRIA at the following URL
12 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
13 # or in the file LICENSE.txt.
15 # As a counterpart to the access to the source code and rights to copy,
16 # modify and redistribute granted by the license, users are provided only
17 # with a limited warranty and the software's author, the holder of the
18 # economic rights, and the successive licensors have only limited
21 # The fact that you are presently reading this means that you have had
22 # knowledge of the CeCILL-B license and that you accept its terms.
23 # ------------------------------------------------------------------------
26 /*=========================================================================
32 =========================================================================*/
34 /* ---------------------------------------------------------------------
36 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
37 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
39 * This software is governed by the CeCILL-B license under French law and
40 * abiding by the rules of distribution of free software. You can use,
41 * modify and/ or redistribute the software under the terms of the CeCILL-B
42 * license as circulated by CEA, CNRS and INRIA at the following URL
43 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
44 * or in the file LICENSE.txt.
46 * As a counterpart to the access to the source code and rights to copy,
47 * modify and redistribute granted by the license, users are provided only
48 * with a limited warranty and the software's author, the holder of the
49 * economic rights, and the successive licensors have only limited
52 * The fact that you are presently reading this means that you have had
53 * knowledge of the CeCILL-B license and that you accept its terms.
54 * ------------------------------------------------------------------------ */
57 * Design and Developpement of BBTK GEditor
58 * Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
62 #ifndef __GBoxModel_h__
63 #define __GBoxModel_h__
65 //Includes same project
66 #include "GlobalConstants.h"
67 #include "GObjectModel.h"
68 #include "GPortModel.h"
70 //Includes creaMaracasVisu
79 // Mandatory when exists a bidirectional relation: GPortModel includes GBoxModel and viceversa
82 class GBoxModel : public GObjectModel
92 virtual void setInicPoint(double& x, double& y, double& z);
94 void addInputPort(GPortModel *inputport);
95 void addOutputPort(GPortModel *outputport);
97 int getNumInputPorts();
98 int getNumOutputPorts();
100 // Change the position of the box and its ports
101 virtual void move(double xx,double yy,double zz);
103 // Text in the status bar
104 virtual std::string getStatusText();
106 // Method to write the information of the black box to be saved in the parameter string
107 virtual void save(std::string &content);
109 // Returns a vector with inputs or outputs
110 std::vector<GPortModel*> getInputPorts();
111 std::vector<GPortModel*> getOutputPorts();
113 // Get input with the name given by parameter
114 GPortModel* getInputPort(std::string name);
115 GPortModel* getInputPort(int pos);
117 // Get output with the name given by parameter
118 GPortModel* getOutputPort(std::string name);
119 GPortModel* getOutputPort(int pos);
121 // Updates the position and finally the view of inputs and outputs
124 void addColons(std::string &text);
125 void removeColons(std::string &text);
130 //Protected Attributes
131 std::vector<GPortModel*> _inputs;
132 std::vector<GPortModel*> _outputs;