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>
61 class GObjectModel : public Observable {
70 // Method to get the values of Inic or Final point passed as references in the parameters
71 void getInicPoint( double& x, double& y, double& z );
72 void getFinalPoint( double& x, double& y, double& z );
74 // Returns the center of the enclosing rectangle
75 void getCenter( double& x, double& y, double& z );
77 // Method to set the values of Inic or Final point
78 virtual void setInicPoint( double& x, double& y, double& z );
79 virtual void setFinalPoint( double& x, double& y, double& z );
81 // Changes the inic(top-left point) point of the rectangle
82 virtual void move( double xx, double yy, double zz );
84 // Returns true if (x,y,z) is inside the rectangle
85 virtual bool isPointInside( double x, double y, double z );
87 // Get the type of the graphical objects (See the GlobalConstants.h file)
88 int getGObjectType( );
89 void setGObjectType( int obtype );
91 // The type in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), LoadHola is the type
92 std::string getBBTKType( );
93 void setBBTKType( std::string obtype );
95 // The name in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), abcd is the name
96 std::string getBBTKName( );
97 void setBBTKName( std::string obname );
101 void setObjectId( int id );
103 // Status bar message
104 virtual std::string getStatusText( );
106 virtual void save( std::string &content );
116 //Protected Attributes
127 // The type of the graphical objects (See the GlobalConstants.h file)
130 // The type in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), LoadHola is the type
131 std::string _bbtkType;
133 // The name in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), abcd is the name
134 std::string _bbtkName;