anatomist  5.1.2
3D neuroimaging data viewer
viewstate.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 #ifndef ANA_WINDOW_VIEWSTATE_H
35 #define ANA_WINDOW_VIEWSTATE_H
36 
37 #include <aims/vector/vector.h>
38 
39 namespace aims
40 {
41  class Quaternion;
42 }
43 
44 
45 namespace anatomist
46 {
47  class Referential;
48  class Geometry;
49  struct SliceViewState;
50  class AWindow;
51 
52 
66  struct ViewState
67  {
69  {
78  };
79 
80  ViewState( float t = 0, AWindow* win = 0,
82  ViewState( const std::vector<float> & timedims, AWindow* win = 0,
84  virtual ~ViewState();
85 
86  virtual SliceViewState *sliceVS() { return 0; }
87  virtual const SliceViewState* sliceVS() const { return 0; }
88 
89  std::vector<float> timedims;
92  };
93 
94 
98  struct SliceViewState : public ViewState
99  {
100  SliceViewState( float t = 0, bool slicewanted = false,
101  const Point3df & pos = Point3df(),
102  const aims::Quaternion* orient = 0,
103  const Referential* wref = 0, const Geometry* wgeom = 0,
104  const aims::Quaternion* vorient = 0, AWindow* win = 0,
106  SliceViewState( const std::vector<float> & timedims,
107  bool slicewanted = false,
108  const Point3df & pos = Point3df(),
109  const aims::Quaternion* orient = 0,
110  const Referential* wref = 0, const Geometry* wgeom = 0,
111  const aims::Quaternion* vorient = 0, AWindow* win = 0,
113  virtual ~SliceViewState();
114 
115  virtual SliceViewState *sliceVS() { return this; }
116  virtual const SliceViewState* sliceVS() const { return this; }
117 
118  bool wantslice;
124  };
125 
126 }
127 
128 #endif
129 
130 
131 
Abstract base class Anatomist window.
Definition: Window.h:58
Referential: marker for transformations, with an associated color.
Definition: Referential.h:55
Specialization for a sliceable object.
Definition: viewstate.h:99
SliceViewState(const std::vector< float > &timedims, bool slicewanted=false, const Point3df &pos=Point3df(), const aims::Quaternion *orient=0, const Referential *wref=0, const Geometry *wgeom=0, const aims::Quaternion *vorient=0, AWindow *win=0, glSelectRenderMode=glSELECTRENDER_NONE)
virtual const SliceViewState * sliceVS() const
Definition: viewstate.h:116
const Geometry * wingeom
Definition: viewstate.h:122
const aims::Quaternion * vieworientation
Definition: viewstate.h:123
const aims::Quaternion * orientation
Definition: viewstate.h:120
virtual SliceViewState * sliceVS()
Definition: viewstate.h:115
const Referential * winref
Definition: viewstate.h:121
SliceViewState(float t=0, bool slicewanted=false, const Point3df &pos=Point3df(), const aims::Quaternion *orient=0, const Referential *wref=0, const Geometry *wgeom=0, const aims::Quaternion *vorient=0, AWindow *win=0, glSelectRenderMode=glSELECTRENDER_NONE)
ViewState holds information about how a view wants to see an object.
Definition: viewstate.h:67
ViewState(float t=0, AWindow *win=0, glSelectRenderMode=glSELECTRENDER_NONE)
@ glSELECTRENDER_POLYGON
select a polygon in a mesh
Definition: viewstate.h:77
@ glSELECTRENDER_OBJECTS
select multiple objects in a neighbourhood
Definition: viewstate.h:75
@ glSELECTRENDER_NONE
no selection
Definition: viewstate.h:71
@ glSELECTRENDER_OBJECT
select a single object
Definition: viewstate.h:73
glSelectRenderMode selectRenderMode
Definition: viewstate.h:91
virtual SliceViewState * sliceVS()
Definition: viewstate.h:86
ViewState(const std::vector< float > &timedims, AWindow *win=0, glSelectRenderMode=glSELECTRENDER_NONE)
virtual const SliceViewState * sliceVS() const
Definition: viewstate.h:87
AWindow * window
Definition: viewstate.h:90
std::vector< float > timedims
Definition: viewstate.h:89