Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MeshComponent.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2014 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 
27 #ifndef MESHCOMPONENT_H
28 #define MESHCOMPONENT_H
29 
30 
31 #include "Component.h"
32 #include "Geometry.h"
33 
34 class vtkPointSet;
35 
36 namespace camitk
37 {
45  {
46  Q_OBJECT
47  public:
48 
54  MeshComponent(const QString & file) throw(AbortException);
55 
65  MeshComponent(vtkSmartPointer<vtkPointSet> aPointSet, const QString &name);
66 
75  MeshComponent(Component *parentComponent, vtkSmartPointer<vtkPointSet> aPointSet, const QString &name);
76 
78  virtual ~MeshComponent();
79 
81  void pointPicked ( vtkIdType pointId, bool );
82 
84  void cellPicked ( vtkIdType cellId, bool );
85 
87  vtkIdType getPickedPointId();
88 
90  vtkIdType getPickedCellId();
91 
94  void updateProperty(QString , QVariant) {};
95 
96  protected:
98  virtual void initRepresentation(vtkSmartPointer<vtkPointSet>);
99 
101  virtual void initDynamicProperties();
102 
103  private:
104 
106  virtual void initRepresentation() {};
107 
109  vtkIdType pickedPointId;
110 
112  vtkIdType pickedCellId;
113  };
114 
115 }
116 
117 #endif // MESHCOMPONENT_H
Exception class to handle abortion in component instanciation.
Definition: AbortException.h:44
Definition: Action.h:40
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:44
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:292
#define CAMITK_API
Definition: CamiTKAPI.h:49
void updateProperty(QString, QVariant)
update property: empty method.
Definition: MeshComponent.h:94
vtkIdType pickedCellId
the last picked cell
Definition: MeshComponent.h:112