Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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-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 #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"
34 
35 #include <vtkSmartPointer.h>
36 
37 class VtkMeshComponentProperties;
38 class vtkDoubleArray;
39 class vtkPointData;
40 
49  Q_OBJECT
50 
51 public:
53  VtkMeshComponent ( const QString& fileName ) throw (camitk::AbortException);
54 
56  virtual ~VtkMeshComponent();
57 
59  void pointPicked ( vtkIdType pointId, bool );
60 
62  void cellPicked ( vtkIdType cellId, bool );
63 
65  bool exportMDL ( std::string filename );
66 
68  virtual QMenu * getPopupMenu ( QWidget* parent );
69 
71  virtual QPixmap getIcon();
72 
77  INITIAL
78  };
79 
81  void showPointData ( VTK_COMPONENT_POINT_DATA_TYPE );
82 
84  virtual void updateProperty(QString name, QVariant value);
85 
86 private:
87 
90 
93 
95  VtkMeshComponentProperties * myProperties;
96 
98  static QPixmap * myPixmap;
99 
101  vtkSmartPointer<vtkDoubleArray> demoPointData;
102 
104  vtkSmartPointer<vtkPointData> initialPointData;
105 
107  void initPointData();
108 
109  // initialize the dynamic properties
110  virtual void initDynamicProperties();
111 
112 };
113 
114 
115 
116 
117 #endif
VtkPointSetType
constant for the vtk point set type
Definition: VtkMeshUtil.h:51
Exception class to handle abortion in component instanciation.
Definition: AbortException.h:44
void pointPicked(vtkIdType pointId, bool)
reimplemented to save the last pick point id
#define VTK_COMPONENT_API
Definition: VtkMeshComponentAPI.h:54
Definition: VtkMeshComponent.h:76
VtkMeshUtil::VtkPointSetType whatIsIt
subtype of vtkPointSet
Definition: VtkMeshComponent.h:89
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:44
VtkMeshComponentProperties * myProperties
properties for vtk mesh type
Definition: VtkMeshComponent.h:95
virtual void initDynamicProperties()
create and initialize dynamic properties
virtual QMenu * getPopupMenu(QWidget *parent=0)
get the popup menu to display (always return NULL, overwrite this method if you want to give here you...
Definition: sdk/libraries/core/component/Component.h:529
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:74
void cellPicked(vtkIdType cellId, bool)
reimplemented to save the last pick point id
void updateProperty(QString, QVariant)
update property: empty method.
Definition: MeshComponent.h:94
vtkSmartPointer< vtkPointData > initialPointData
the initial/original point data that were read in the file
Definition: VtkMeshComponent.h:104
The popup menu of the VTK data component.
Definition: VtkMeshComponentPopup.h:39
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:101
Definition: VtkMeshComponent.h:75
virtual QPixmap getIcon()
Get the pixmap that will be displayed for this node.
Definition: sdk/libraries/core/component/Component.h:804
static QPixmap * myPixmap
the vtk logo
Definition: VtkMeshComponent.h:98
VtkMeshComponentPopup * myPopupMenu
the popup menu
Definition: VtkMeshComponent.h:92
Features various Vtk mesh for CamiTK.
Definition: VtkMeshComponent.h:48