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::GObjectModel : abstract black-box interface.
39 * Design and Developpement of BBTK GEditor
40 * Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
44 #ifndef __GObjectModel_h__
45 #define __GObjectModel_h__
47 //Includes same project
48 #include "GlobalConstants.h"
49 #include "Observable.h"
51 //Includes creaMaracasVisu
57 #include <bbtkBlackBoxDescriptor.h>
62 class GObjectModel : public Observable
73 // Method to get the values of Inic or Final point passed as references in the parameters
74 void getInicPoint(double& x, double& y, double& z);
75 void getFinalPoint(double& x, double& y, double& z);
77 // Returns the center of the enclosing rectangle
78 void getCenter(double& x, double& y, double& z);
80 // Method to set the values of Inic or Final point
81 virtual void setInicPoint(double& x, double& y, double& z);
82 virtual void setFinalPoint(double& x, double& y, double& z);
84 // Changes the inic(top-left point) point of the rectangle
85 virtual void move(double xx,double yy,double zz);
87 // Returns true if (x,y,z) is inside the rectangle
88 virtual bool isPointInside(double x,double y, double z);
90 // Get the type of the graphical objects (See the GlobalConstants.h file)
92 void setGObjectType(int obtype);
94 // The type in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), LoadHola is the type
95 std::string getBBTKType();
96 void setBBTKType(std::string obtype);
98 // The name in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), abcd is the name
99 std::string getBBTKName();
100 void setBBTKName(std::string obname);
104 void setObjectId(int id);
106 // Status bar message
107 virtual std::string getStatusText();
109 virtual void save(std::string &content);
119 //Protected Attributes
130 // The type of the graphical objects (See the GlobalConstants.h file)
133 // The type in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), LoadHola is the type
134 std::string _bbtkType;
136 // The name in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), abcd is the name
137 std::string _bbtkName;