Computer Assited Medical Intervention Tool Kit  version 5.0
PMLComponentExtension.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 #ifndef PML_COMPONENT_EXTENSION_H
26 #define PML_COMPONENT_EXTENSION_H
27 
28 // CamiTK stuff
29 #include <MeshComponentExtension.h>
30 
31 // QT stuff
32 #include <QObject>
43  Q_OBJECT
44  Q_INTERFACES(camitk::ComponentExtension)
45  Q_PLUGIN_METADATA(IID "fr.imag.camitk.modeling.component.pmlcomponent")
46 
47 public:
50 
52  virtual QString getName() const override;
53 
55  virtual QString getDescription() const override;
56 
58  virtual QStringList getFileExtensions() const override;
59 
63  virtual camitk::Component* open(const QString&) override;
64 
66  virtual bool save(camitk::Component* component) const override;
67 
68 protected:
70  virtual ~PMLComponentExtension() = default;
71 };
72 
73 #endif
camitk::Application::resetProgressBar
static void resetProgressBar()
Resets the progress bar if it exists.
Definition: Application.cpp:361
PhysicalModel::setExclusiveComponents
void setExclusiveComponents(MultiComponent *)
set the exclusive multi component. Becareful: the physical model takes control of this MultiComponent
Definition: PhysicalModel.cpp:676
StructureProperties::WEDGE
@ WEDGE
the structure is a wedge (like the Pink Floyd's "Dark Side Of the Moon" prism), it must be a cell and...
Definition: StructureProperties.h:160
camitk::MeshComponent::getSelectionAt
vtkSmartPointer< vtkSelectionNode > getSelectionAt(unsigned int index) const
Get a selection from its index in the list.
Definition: MeshComponent.cpp:490
StructureProperties::TETRAHEDRON
@ TETRAHEDRON
the structure is a tetrahedron, it must be a cell and have sub-structures that are atoms
Definition: StructureProperties.h:159
StructureProperties::GeometricType
GeometricType
Geometric type gives information about which kind of geometric representation is the structure.
Definition: StructureProperties.h:130
PMLComponentExtension::getDescription
virtual QString getDescription() const override
get the plugin description (can be html)
Definition: PMLComponentExtension.cpp:50
Atom
An atom has an unique index in the physical model object, a 3D position, and different basic properti...
Definition: Atom.h:49
PMLComponent::getPhysicalModel
PhysicalModel * getPhysicalModel()
Definition: PMLComponent.cpp:104
PMLComponentExtension::save
virtual bool save(camitk::Component *component) const override
save from or to PML
Definition: PMLComponentExtension.cpp:76
camitk::Component::getFileName
const QString getFileName() const
get the file name where the data have to be stored/were stored
Definition: sdk/libraries/core/component/Component.cpp:461
PhysicalModel::getInformativeComponents
MultiComponent * getInformativeComponents() const
get all the informative components
Definition: PhysicalModel.h:377
a
#define a
camitk::ComponentExtension
This class describes what is a generic Component extension. To add a ComponentExtension to CamiTK cor...
Definition: ComponentExtension.h:83
PhysicalModel::getAtom
Atom * getAtom(const unsigned int id)
Get the atom that has the global index given in parameters.
Definition: PhysicalModel.h:385
camitk::Component::setModified
virtual void setModified(bool modified=true)
set the modified flag
Definition: sdk/libraries/core/component/Component.h:943
PMLComponentExtension::open
virtual camitk::Component * open(const QString &) override
get a new instance from data stored in a file (this is the most important method to redefine in your ...
Definition: PMLComponentExtension.cpp:62
PMLComponentExtension::getName
virtual QString getName() const override
get the plugin name
Definition: PMLComponentExtension.cpp:45
camitk::MeshComponent::getNumberOfSelections
unsigned int getNumberOfSelections() const
Get the number of selections.
Definition: MeshComponent.cpp:468
StructuralComponent
A structural component is composed either by cell or by atoms.
Definition: StructuralComponent.h:52
StructuralComponent::addStructure
void addStructure(Structure *s, bool check=true)
Add a Structure in the list (and tells the structure to add this structural component in its list).
Definition: StructuralComponent.h:212
camitk::InterfaceGeometry::getPointSet
virtual vtkSmartPointer< vtkPointSet > getPointSet()=0
PhysicalModel
This is the main class of this project. Following a nice concept, a physical model is able to represe...
Definition: PhysicalModel.h:86
PMLComponentExtension.h
camitk::MeshComponentExtension::MeshComponentExtension
MeshComponentExtension()
Constructor protected because the class is virtual.
Definition: MeshComponentExtension.cpp:54
StructureProperties::INVALID
@ INVALID
invalid geometry type
Definition: StructureProperties.h:154
camitk::Application::showStatusBarMessage
static void showStatusBarMessage(QString msg, int timeout=0)
Set a message to the status bar.
Definition: Application.cpp:345
Cell
A cell has an unique index in the physical model object, is composed by atoms, and different basic pr...
Definition: Cell.h:46
camitk::MeshComponentExtension
Abstract class created to support export file formats for MeshComponent Any data component plugin cre...
Definition: MeshComponentExtension.h:75
PhysicalModel::xmlPrint
void xmlPrint(std::ostream &o, bool opt=false)
print the physical model to an output stream in a XML format (see physicalmodel.xsd for detail about ...
Definition: PhysicalModel.cpp:258
StructureProperties::PYRAMID
@ PYRAMID
the structure has a quad base and one vertex outside the defined base plane (like an egyptian pyramid...
Definition: StructureProperties.h:161
PMLComponent
This class manages a physical model (PML) CamiTK component.
Definition: PMLComponent.h:103
PMLComponentExtension
This PML ComponentExtension allows you to manipulate physical model file ".pml". see http://www-timc....
Definition: PMLComponentExtension.h:42
MultiComponent::addSubComponent
void addSubComponent(Component *)
add a component in the list of subcomponents (and set the isExclusive flag accordingly to the state o...
Definition: MultiComponent.h:122
StructureProperties::HEXAHEDRON
@ HEXAHEDRON
the structure is a hexahedron, it must be a cell and have sub-structures that are atoms
Definition: StructureProperties.h:162
MeshComponentExtension.h
StructureProperties::TRIANGLE
@ TRIANGLE
the structure is a triangle, i.e it must be a cell composed of 3 atoms
Definition: StructureProperties.h:157
PMLComponentExtension::PMLComponentExtension
PMLComponentExtension()
the constructor (does nothing really)
Definition: PMLComponentExtension.h:72
StructureProperties::LINE
@ LINE
the structure is a simple line, i.e it must be a cell composed of only 2 atoms
Definition: StructureProperties.h:156
PhysicalModel.h
Component::setName
void setName(const std::string)
set the name of the component
Definition: modeling/libraries/pml/Component.h:150
PMLComponentExtension::~PMLComponentExtension
virtual ~PMLComponentExtension()=default
the destructor
StructuralComponent::getCell
Cell * getCell(unsigned int) const override
get cell by order number (not cell index)
Definition: StructuralComponent.cpp:197
StructureProperties::POLY_VERTEX
@ POLY_VERTEX
the structure is a poly vertex, i.e it must be a cell and it is a point clouds
Definition: StructureProperties.h:164
MultiComponent.h
PMLComponentExtension::getFileExtensions
virtual QStringList getFileExtensions() const override
get the list of managed extensions (each file with an extension in the list can be loaded by this Ext...
Definition: PMLComponentExtension.cpp:55
PhysicalModel::setInformativeComponents
void setInformativeComponents(MultiComponent *)
set the exclusive multi component. Becareful: the physical model takes control of this MultiComponent
Definition: PhysicalModel.cpp:686
StructureProperties::QUAD
@ QUAD
the structure is a quad, i.e it must be a cell composed of 4 atoms
Definition: StructureProperties.h:158
camitk::MeshComponent
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:53
PMLComponent.h
MultiComponent
A multi-component stores other components, hence providing a way to have an tree representation of co...
Definition: MultiComponent.h:44
StructureProperties::POLY_LINE
@ POLY_LINE
the structure is a polyline, i.e it must be a cell and the order of the atom in the cell are arranged...
Definition: StructureProperties.h:163
camitk::Component
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:302
Application.h
camitk
Definition: Action.cpp:35
PhysicalModel::setAtoms
void setAtoms(StructuralComponent *, bool deleteOld=true)
set the atom structural component.
Definition: PhysicalModel.cpp:572