Computer Assited Medical Intervention Tool Kit  version 5.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-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
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 class VtkMeshComponentProperties;
35 class vtkDoubleArray;
36 class vtkPointData;
37 
46  Q_OBJECT
47 
48 public:
52  VtkMeshComponent(const QString& fileName);
53 
55  virtual ~VtkMeshComponent();
56 
58  bool exportMDL(std::string filename);
59 
61  virtual QPixmap getIcon();
62 
64  virtual void updateProperty(QString name, QVariant value);
65 
66 private:
67 
70 
72  VtkMeshComponentProperties* myProperties;
73 
75  static QPixmap* myPixmap;
76 
77  // initialize the dynamic properties
78  virtual void initDynamicProperties();
79 
80 };
81 
82 
83 
84 
85 #endif
VTK_COMPONENT_API
#define VTK_COMPONENT_API
Definition: VtkMeshComponentAPI.h:54
VtkMeshComponent::VtkMeshComponent
VtkMeshComponent(const QString &fileName)
default constructor.
Definition: VtkMeshComponent.cpp:43
camitk::MeshComponent::updateProperty
void updateProperty(QString, QVariant) override
update property: no specific properties to manage, this is needed to avoid console warnings.
Definition: MeshComponent.h:134
camitk::MeshComponent::setDataRepresentationOff
void setDataRepresentationOff(int dataType=SCALARS|VECTORS|TENSORS)
hide all the data representation of a given data type (hide all by default)
Definition: MeshComponent.cpp:845
VtkMeshUtil::VtkPointSetType
VtkPointSetType
constant for the vtk point set type
Definition: VtkMeshUtil.h:51
VtkMeshComponent::updateProperty
virtual void updateProperty(QString name, QVariant value)
update a specific property
Definition: VtkMeshComponent.cpp:144
camitk::Component::getActor
vtkSmartPointer< vtkPointSet > vtkSmartPointer< vtkAlgorithmOutput > getActor
Definition: sdk/libraries/core/component/Component.h:589
camitk::Component::myFileName
QString myFileName
the file name from which the Component is loaded
Definition: sdk/libraries/core/component/Component.h:845
VtkMeshComponentAPI.h
camitk::Property
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:303
MeshComponent.h
VtkMeshComponent::getIcon
virtual QPixmap getIcon()
the vtk logo (for the explorer viewer)
Definition: VtkMeshComponent.cpp:71
VtkMeshComponent::initDynamicProperties
virtual void initDynamicProperties()
Definition: VtkMeshComponent.cpp:79
Property.h
VtkMeshComponent.h
camitk::Property::setAttribute
void setAttribute(const QString &attribute, const QVariant &value)
Set a given property for this attribute.
Definition: Property.cpp:183
VtkMeshUtil::buildVtkPointSet
static vtkSmartPointer< vtkPointSet > buildVtkPointSet(std::string vtkFileName, VtkPointSetType whatIsIt=UNKNOWN)
Static method that could be used from anywhere to build a vtkPointSet from a vtk file.
Definition: VtkMeshUtil.cpp:74
camitk::AbortException
Exception class to handle abortion in component instantiation. Particularly useful to handle construc...
Definition: AbortException.h:66
VtkMeshComponent::~VtkMeshComponent
virtual ~VtkMeshComponent()
the virtual destructor
Definition: VtkMeshComponent.cpp:63
VtkMeshUtil.h
VtkMeshUtil::UNKNOWN
@ UNKNOWN
Definition: VtkMeshUtil.h:52
VtkMeshComponent
Features various Vtk mesh for CamiTK.
Definition: VtkMeshComponent.h:45
VtkMeshComponent::myPixmap
static QPixmap * myPixmap
the vtk logo
Definition: VtkMeshComponent.h:75
VtkMeshUtil::typeOf
static VtkPointSetType typeOf(std::string vtkFileName)
static method that tells you what kind of vtk file it is.
Definition: VtkMeshUtil.cpp:241
camitk::Component::setName
void setName(const QString &) override
set the name to be displayed
Definition: sdk/libraries/core/component/Component.h:932
VtkMeshComponent::whatIsIt
VtkMeshUtil::VtkPointSetType whatIsIt
subtype of vtkPointSet
Definition: VtkMeshComponent.h:69
camitk::MeshComponent
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:53
camitk::MeshComponent::getIcon
QPixmap getIcon() override
Get the pixmap that will be displayed for this node.
Definition: MeshComponent.cpp:1172
camitk::Component::refresh
virtual void refresh()
refresh all the viewer that are currently displaying this Component At the end the InterfaceNode modi...
Definition: sdk/libraries/core/component/Component.cpp:286
camitk::Component::addProperty
bool addProperty(Property *) override
Add a new CamiTK property to the component.
Definition: sdk/libraries/core/component/Component.cpp:517
VtkMeshUtil::getVtkPointSetHeaderString
static std::string getVtkPointSetHeaderString(std::string vtkFileName, VtkPointSetType whatIsIt=UNKNOWN)
static method to get the vtk header string from a vtk file
Definition: VtkMeshUtil.cpp:193
camitk::MeshComponent::initDynamicProperties
void initDynamicProperties()
create and initialize dynamic properties
Definition: MeshComponent.cpp:331
camitk::MeshComponent::initRepresentation
void initRepresentation() override final
the concrete building of the 3D objects (Slice/Geometry): none in this case, everything is done by in...
Definition: MeshComponent.h:399
VtkMeshComponent::myProperties
VtkMeshComponentProperties * myProperties
properties for vtk mesh type
Definition: VtkMeshComponent.h:72
camitk
Definition: Action.cpp:35