Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VtkMeshComponent.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2013 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 #ifndef VTKCOMPONENT_H
27 #define VTKCOMPONENT_H
28 
29 #include <MeshComponent.h>
30 using namespace camitk;
31 
32 #include "VtkMeshComponentAPI.h"
33 #include "VtkMeshUtil.h"
35 
36 #include <vtkSmartPointer.h>
37 
39 class vtkDoubleArray;
40 class vtkPointData;
41 
48  Q_OBJECT
49 
50 public:
52  VtkMeshComponent ( const QString& fileName ) throw ( AbortException );
53 
55  virtual ~VtkMeshComponent();
56 
58  void pointPicked ( vtkIdType pointId, bool );
59 
61  void cellPicked ( vtkIdType cellId, bool );
62 
64  bool exportMDL ( std::string filename );
65 
67  virtual QMenu * getPopupMenu ( QWidget* parent );
68 
70  QObject * getPropertyObject();
71 
73  virtual QPixmap getIcon();
74 
79  INITIAL
80  };
81 
83  void showPointData ( VTK_COMPONENT_POINT_DATA_TYPE );
84 
85 private:
86 
89 
92 
95 
97  static QPixmap * myPixmap;
98 
100  vtkSmartPointer<vtkDoubleArray> demoPointData;
101 
103  vtkSmartPointer<vtkPointData> initialPointData;
104 
106  void initPointData();
107 
108 };
109 
110 
111 
112 
113 #endif