Computer Assited Medical Intervention Tool Kit  version 4.0
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-2016 Univ. Grenoble Alpes, 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 VTK_MESH_COMPONENT_H
27 #define VTK_MESH_COMPONENT_H
28 
29 #include <MeshComponent.h>
30 
31 #include "VtkMeshComponentAPI.h"
32 #include "VtkMeshUtil.h"
33 
34 #include <vtkSmartPointer.h>
35 
36 class VtkMeshComponentProperties;
37 class vtkDoubleArray;
38 class vtkPointData;
39 
48  Q_OBJECT
49 
50 public:
52  VtkMeshComponent ( const QString& fileName ) throw (camitk::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 QPixmap getIcon();
68 
73  INITIAL
74  };
75 
77  void showPointData ( VTK_COMPONENT_POINT_DATA_TYPE );
78 
80  virtual void updateProperty(QString name, QVariant value);
81 
82 private:
83 
86 
88  VtkMeshComponentProperties * myProperties;
89 
91  static QPixmap * myPixmap;
92 
94  vtkSmartPointer<vtkDoubleArray> demoPointData;
95 
97  vtkSmartPointer<vtkPointData> initialPointData;
98 
100  void initPointData();
101 
102  // initialize the dynamic properties
103  virtual void initDynamicProperties();
104 
105 };
106 
107 
108 
109 
110 #endif
Definition: VtkMeshComponent.h:72
virtual void initDynamicProperties()
create and initialize dynamic properties
Definition: MeshComponent.cpp:258
Exception class to handle abortion in component instanciation.
Definition: AbortException.h:43
static QPixmap * myPixmap
the vtk logo
Definition: VtkMeshComponent.h:91
void pointPicked(vtkIdType pointId, bool)
reimplemented to save the last pick point id
Definition: MeshComponent.cpp:243
#define VTK_COMPONENT_API
Definition: VtkMeshComponentAPI.h:54
VtkMeshUtil::VtkPointSetType whatIsIt
subtype of vtkPointSet
Definition: VtkMeshComponent.h:85
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:51
VtkPointSetType
constant for the vtk point set type
Definition: VtkMeshUtil.h:51
virtual QPixmap getIcon()
Get the pixmap that will be displayed for this node.
Definition: MeshComponent.cpp:870
VtkMeshComponentProperties * myProperties
properties for vtk mesh type
Definition: VtkMeshComponent.h:88
void cellPicked(vtkIdType cellId, bool)
reimplemented to save the last pick point id
Definition: MeshComponent.cpp:238
void updateProperty(QString, QVariant)
update property: no specific properties to manage, this is needed to avoid console warnings...
Definition: MeshComponent.h:99
vtkSmartPointer< vtkPointData > initialPointData
the initial/original point data that were read in the file
Definition: VtkMeshComponent.h:97
vtkSmartPointer< vtkDoubleArray > demoPointData
the demo point data array (i.e the data value displayed when picked is the id of the point...
Definition: VtkMeshComponent.h:94
VTK_COMPONENT_POINT_DATA_TYPE
two point data can be displayed here: the demo (used when picked) or the initial point data (read fro...
Definition: VtkMeshComponent.h:70
Definition: VtkMeshComponent.h:71
Features various Vtk mesh for CamiTK.
Definition: VtkMeshComponent.h:47