anatomist 6.0.4
3D neuroimaging data viewer
Referential.h
Go to the documentation of this file.
1/* This software and supporting documentation are distributed by
2 * Institut Federatif de Recherche 49
3 * CEA/NeuroSpin, Batiment 145,
4 * 91191 Gif-sur-Yvette cedex
5 * France
6 *
7 * This software is governed by the CeCILL-B license under
8 * French law and abiding by the rules of distribution of free software.
9 * You can use, modify and/or redistribute the software under the
10 * terms of the CeCILL-B license as circulated by CEA, CNRS
11 * and INRIA at the following URL "http://www.cecill.info".
12 *
13 * As a counterpart to the access to the source code and rights to copy,
14 * modify and redistribute granted by the license, users are provided only
15 * with a limited warranty and the software's author, the holder of the
16 * economic rights, and the successive licensors have only limited
17 * liability.
18 *
19 * In this respect, the user's attention is drawn to the risks associated
20 * with loading, using, modifying and/or developing or reproducing the
21 * software by the user in light of its specific status of free software,
22 * that may mean that it is complicated to manipulate, and that also
23 * therefore means that it is reserved for developers and experienced
24 * professionals having in-depth computer knowledge. Users are therefore
25 * encouraged to load and test the software's suitability as regards their
26 * requirements in conditions enabling the security of their systems and/or
27 * data to be ensured and, more generally, to use and operate it in the
28 * same conditions as regards security.
29 *
30 * The fact that you are presently reading this means that you have had
31 * knowledge of the CeCILL-B license and that you accept its terms.
32 */
33
34
35#ifndef ANA_REFERENCE_REFERENTIAL_H
36#define ANA_REFERENCE_REFERENTIAL_H
37
38
39//--- header files ------------------------------------------------------------
40
43#include <aims/data/pheader.h>
44#include <cartobase/uuid/uuid.h>
45#include <cartobase/thread/mutex.h>
46
47
48//--- class declarations ------------------------------------------------------
49
50namespace anatomist
51{
52
56 {
57 public:
59 Referential( const std::string & filename );
60 Referential( std::set<AObject*>& );
61 Referential( std::set<AWindow*>& );
62 Referential( const Referential& ref );
63 virtual ~Referential();
64
66
68 std::set<AObject*> AnaObj( void ) const { return( _anaObj ); }
70 std::set<AWindow*> AnaWin( void ) const { return( _anaWin ); }
71 AimsRGB Color() const { return( _color ); }
72 void setColor( const AimsRGB & col );
74 int index() const { return( _indCol ); }
83 bool destroying() const { return _destroying; }
85 const aims::PythonHeader & header() const { return *_header; }
87 bool load( const std::string & filename );
88 std::string filename() const;
89 bool isDirect() const;
92 bool hidden() const;
93
95 static Referential* referentialOfUUID( const std::string & uuid );
101 const std::string & refname );
103 static Referential* referentialOfName( const std::string & refname );
114
115 protected:
116 std::set<AObject*> _anaObj;
117 std::set<AWindow*> _anaWin;
125 std::string _filename;
127 };
128
129}
130
131namespace carto
132{
134 DECLARE_GENERIC_OBJECT_TYPE( std::set<anatomist::Referential *> )
135 DECLARE_GENERIC_OBJECT_TYPE( std::vector<anatomist::Referential *> )
136 DECLARE_GENERIC_OBJECT_TYPE( std::list<anatomist::Referential *> )
137}
138
139#endif
Base Anatomist object (abstract)
Definition Object.h:97
Abstract base class Anatomist window.
Definition Window.h:59
Referential: marker for transformations, with an associated color.
Definition Referential.h:56
std::set< AWindow * > AnaWin(void) const
windows which are currently in this referential
Definition Referential.h:70
static Referential * giftiTalairachReferential()
static bool mergeReferentials(Referential *r1, Referential *r2)
merge 2 unconnected referential or connected by identity.
AimsRGB Color() const
Definition Referential.h:71
AimsRGB NewColor()
Retourne une nouvelle couleur.
static Referential * acPcReferential()
std::set< AObject * > AnaObj(void) const
objects which are currently in this referential
Definition Referential.h:68
Referential(std::set< AWindow * > &)
aims::PythonHeader & header()
Definition Referential.h:86
static void clearUnusedReferentials()
Referential(std::set< AObject * > &)
Referential(const std::string &filename)
bool hidden() const
a hidden referential does not appear in the GUI.
void AddWindow(AWindow *)
Ajoute une fenetre dans la liste des fenetres.
void setColor(const AimsRGB &col)
int index() const
Unique index, 0 is always the central referential.
Definition Referential.h:74
Referential(const Referential &ref)
static Referential * referentialOfUUID(const carto::UUID &uuid)
std::set< AObject * > _anaObj
void RemoveWindow(AWindow *)
Enleve une fenetre de la liste des fenetres.
std::string filename() const
void RemoveObject(AObject *)
Enleve un objet de la liste des objets.
std::set< AWindow * > _anaWin
Referential & operator=(const Referential &)
void AddObject(AObject *)
Ajoute un objet dans la liste des objets.
carto::UUID uuid() const
bool destroying() const
Definition Referential.h:83
bool load(const std::string &filename)
const aims::PythonHeader & header() const
Definition Referential.h:85
static Referential * referentialOfNameOrUUID(const AObject *obj, const std::string &refname)
tries to find a ref in the referentials property list
static Referential * referentialOfName(const std::string &refname)
WARNING: a referential may not have a unique name.
static Referential * mniTemplateReferential()
static Referential * referentialOfUUID(const std::string &uuid)
static void mergeIdenticalReferentials()
aims::PythonHeader * _header
int _indCol
color index
#define DECLARE_GENERIC_OBJECT_TYPE(T)
carto::VoxelRGB AimsRGB