Computer Assited Medical Intervention Tool Kit  version 4.0
ComponentDC.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 
27 #ifndef ComponentDC_H
28 #define ComponentDC_H
29 
30 #include <pml/Component.h>
31 #include <MeshComponent.h>
32 
33 class PMManagerDC;
34 #include "PMComponentAPI.h"
44  Q_OBJECT
45 public:
47  ComponentDC(camitk::Component *parent, PMManagerDC * pmManagerDC, ::Component * c=NULL);
48 
49  virtual ~ComponentDC() {};
50 
56  virtual void setOpacity(const double);
58 
59  virtual const EnhancedModes getEnhancedModes() const;
60 
61  virtual const RenderingModes getRenderingModes() const;
62 
63  virtual void setName(const QString &);
64 
66  virtual void deleteChildren() {}
67 
69  virtual vtkSmartPointer< vtkPointSet > getPointSet();
71 
73  ::Component * getComponent();
74 
77  return myPMManagerDC;
78  }
79 
84  virtual void createPointData();
85 
87  virtual void destroyPointData();
88 
90  virtual QObject* getPropertyObject() {
91  return this;
92  }
93 
95  virtual void updateProperty(QString name, QVariant value);
96 
97 protected:
98 
101 
104 };
105 
106 
107 inline ::Component * ComponentDC::getComponent() {
108  return ((::Component *)myComponent);
109 }
110 
111 inline void ComponentDC::setName(const QString &n) {
112  getComponent()->setName(n.toStdString());
114 }
115 
116 #endif
::Component * myComponent
the managed Component
Definition: ComponentDC.h:103
const virtual RenderingModes const InterfaceGeometry::RenderingModes getRenderingModes() const
see Component.cpp
Definition: sdk/libraries/core/component/Component.cpp:441
The manager of the physical model data.
Definition: PMManagerDC.h:97
#define PHYSICALMODEL_COMPONENT_API
Definition: PMComponentAPI.h:54
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:51
virtual void setOpacity(const double)=0
Set the opacity of this object. WARNING color field (surfaceColor, ...) are not modified! ...
virtual QObject * getPropertyObject()
show all properties
Definition: ComponentDC.h:90
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:299
The manager of the Component data.
Definition: ComponentDC.h:43
virtual const EnhancedModes getEnhancedModes() const =0
get the current enhanced mode
void updateProperty(QString, QVariant)
update property: no specific properties to manage, this is needed to avoid console warnings...
Definition: MeshComponent.h:99
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
virtual ~ComponentDC()
Definition: ComponentDC.h:49
virtual PMManagerDC * getPMManagerDC()
get the PMManagerDC (given during instanciation), allows one to get PML/Component maps ...
Definition: ComponentDC.h:76
PMManagerDC * myPMManagerDC
the PMManagerDC
Definition: ComponentDC.h:100
::Component * getComponent()
return the component that this dc is managing
Definition: ComponentDC.h:107
virtual vtkSmartPointer< vtkPointSet > getPointSet()=0
virtual void setName(const QString &)
set the name to be displayed
Definition: ComponentDC.h:111
virtual void deleteChildren()
remove a sub DC: overloaded method to avoir deletion of children that are used in more than one SCDC ...
Definition: ComponentDC.h:66
virtual void setName(const QString &)
set the name to be displayed
Definition: sdk/libraries/core/component/Component.h:959