GObjectModel.h

Go to the documentation of this file.
00001 /*=========================================================================                                                                               
00002 Program:   bbtk
00003 Module:    $RCSfile: GObjectModel.h,v $
00004 Language:  C++
00005 Date:      $Date: 2012/05/23 15:57:12 $
00006 Version:   $Revision: 1.17 $
00007 =========================================================================*/
00008 
00009 /* ---------------------------------------------------------------------
00010 
00011  * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
00012  * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
00013  *
00014  *  This software is governed by the CeCILL-B license under French law and 
00015  *  abiding by the rules of distribution of free software. You can  use, 
00016  *  modify and/ or redistribute the software under the terms of the CeCILL-B 
00017  *  license as circulated by CEA, CNRS and INRIA at the following URL 
00018  *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
00019  *  or in the file LICENSE.txt.
00020  *
00021  *  As a counterpart to the access to the source code and  rights to copy,
00022  *  modify and redistribute granted by the license, users are provided only
00023  *  with a limited warranty  and the software's author,  the holder of the
00024  *  economic rights,  and the successive licensors  have only  limited
00025  *  liability. 
00026  *
00027  *  The fact that you are presently reading this means that you have had
00028  *  knowledge of the CeCILL-B license and that you accept its terms.
00029  * ------------------------------------------------------------------------ */
00030 
00031 
00032 
00038 /****
00039  * Design and Developpement of BBTK GEditor
00040  * Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
00041  * RaC - 2010
00042  ****/
00043 
00044 #ifndef __GObjectModel_h__
00045 #define __GObjectModel_h__
00046 
00047 //Includes same project
00048 #include "GlobalConstants.h"
00049 #include "Observable.h"
00050 
00051 //Includes creaMaracasVisu
00052 
00053 //Includes std
00054 #include <iostream>
00055 
00056 //Includes bbtk
00057 #include <bbtkBlackBoxDescriptor.h>
00058 
00059 namespace bbtk {
00060 
00061     class GObjectModel : public Observable {
00062     public:
00063 
00064         //Constructors
00065         GObjectModel( );
00066         ~ GObjectModel( );
00067 
00068         //Public methods
00069 
00070         // Method to get the values of Inic or Final point passed as references in the parameters
00071         void getInicPoint( double& x, double& y, double& z );
00072         void getFinalPoint( double& x, double& y, double& z );
00073 
00074         // Returns the center of the enclosing rectangle
00075         void getCenter( double& x, double& y, double& z );
00076 
00077         // Method to set the values of Inic or Final point 
00078         virtual void setInicPoint( double& x, double& y, double& z );
00079         virtual void setFinalPoint( double& x, double& y, double& z );
00080 
00081         // Changes the inic(top-left point) point of the rectangle
00082         virtual void move( double xx, double yy, double zz );
00083 
00084         // Returns true if (x,y,z) is inside the rectangle 
00085         virtual bool isPointInside( double x, double y, double z );
00086 
00087         // Get the type of the graphical objects (See the GlobalConstants.h file)
00088         int getGObjectType( );
00089         void setGObjectType( int obtype );
00090 
00091         // The type in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), LoadHola is the type
00092         std::string getBBTKType( );
00093         void setBBTKType( std::string obtype );
00094 
00095         // The name in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), abcd is the name
00096         std::string getBBTKName( );
00097         void setBBTKName( std::string obname );
00098 
00099         // Object ID
00100         int getObjectId( );
00101         void setObjectId( int id );
00102 
00103         // Status bar message
00104         virtual std::string getStatusText( );
00105 
00106         virtual void save( std::string &content );
00107 
00108     private:
00109 
00110         //Private Attributes
00111 
00112         //Private Methods
00113 
00114     protected:
00115 
00116         //Protected Attributes
00117 
00118         double _xInic;
00119         double _yInic;
00120         double _zInic;
00121         double _xFin;
00122         double _yFin;
00123         double _zFin;
00124 
00125         int _objectId;
00126 
00127         // The type of the graphical objects (See the GlobalConstants.h file)
00128         int _gObjectType;
00129 
00130         // The type in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), LoadHola is the type
00131         std::string _bbtkType;
00132 
00133         // The name in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), abcd is the name
00134         std::string _bbtkName;
00135 
00136         //Protected methods
00137 
00138     };
00139 
00140 
00141 }
00142 // namespace bbtk
00143 #endif
00144 

Generated on Thu May 31 15:12:19 2012 for bbtkGEditor by  doxygen 1.5.7.1