Computer Assited Medical Intervention Tool Kit  version 5.0
GenerateModel.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 GENERATEMODEL_H
27 #define GENERATEMODEL_H
28 
29 #include <Action.h>
30 #include <QVector3D>
31 
32 #include <set>
33 
34 namespace camitk {
35 class MeshComponent;
36 }
37 
46 class GenerateModel : public camitk::Action {
47 
48 public:
51 
53  virtual ~GenerateModel() = default;
54 
56  virtual QWidget* getWidget() {
57  return Action::getWidget();
58  }
59 
60 public slots:
63 
64 private:
66  void saveSOFAFile(QString baseFilename);
67 
69  void saveMMLFiles(QString baseFilename);
70 
71  // list of index that are potentially fixed (null displacement constraint)
72  std::set<int> fixedDOFIndex;
73 
76 };
77 
78 #endif // GENERATEMODEL_H
MonitoringManagerFactory.h
camitk::Action::setFamily
void setFamily(QString family)
the name of the family in which this action is associated
Definition: Action.cpp:136
CAMITK_WARNING
#define CAMITK_WARNING(MSG)
Log for warning verbosity (the most common one) Will appear by default.
Definition: Log.h:266
Direction::setNullY
void setNullY()
set the y coordinate as NULL
Definition: Direction.h:218
GenerateModel::~GenerateModel
virtual ~GenerateModel()=default
the destructor
camitk::Action::SUCCESS
@ SUCCESS
everything went according to plan
Definition: Action.h:248
TranslationUnit::MM
static TranslationUnit & MM()
millimeters
Definition: TranslationUnit.cpp:44
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
GenerateModel
Action to generate MML/Sofa scn from a vtk mesh.
Definition: GenerateModel.h:46
camitk::Action::ABORTED
@ ABORTED
the action was aborted before completion
Definition: Action.h:251
PhysicalModel::getInformativeComponents
MultiComponent * getInformativeComponents() const
get all the informative components
Definition: PhysicalModel.h:377
camitk::Action::ApplyStatus
ApplyStatus
Definition: Action.h:247
Loads::xmlPrint
void xmlPrint(std::ostream &) const
Print to an ostream.
Definition: Loads.cpp:187
camitk::Action::setName
void setName(QString name)
Definition: Action.cpp:120
PhysicalModel::getAtom
Atom * getAtom(const unsigned int id)
Get the atom that has the global index given in parameters.
Definition: PhysicalModel.h:385
camitk::Action::setComponent
void setComponent(QString component)
the name of the component class that can be used by this action
Definition: Action.cpp:131
Load::addTarget
void addTarget(std::string currentData)
add a lots of new targets using a description string (...)
Definition: Load.cpp:209
Loads::addLoad
void addLoad(Load *ld)
add a load to the list
Definition: Loads.cpp:244
camitk::Action::getTargets
const ComponentList getTargets() const
the currently selected and valid (regarding the component property) components, for which this action...
Definition: Action.cpp:166
Action.h
StructuralComponent
A structural component is composed either by cell or by atoms.
Definition: StructuralComponent.h:52
Load::setUnit
void setUnit(const Unit u)
set the unit
Definition: Load.cpp:277
Direction
Class that defines the direction of the Load with x, y and z.
Definition: Direction.h:39
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::Property
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:303
camitk::Action::addTag
void addTag(QString tag)
add a tag to the tags list of this action
Definition: Action.cpp:141
Log.h
GenerateModel.h
MeshComponent.h
GenerateModel::GenerateModel
GenerateModel(camitk::ActionExtension *)
the constructor
Definition: GenerateModel.cpp:54
PhysicalModel
This is the main class of this project. Following a nice concept, a physical model is able to represe...
Definition: PhysicalModel.h:86
camitk::Action
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:231
Property.h
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
GenerateModel::saveMMLFiles
void saveMMLFiles(QString baseFilename)
save all the MML, PML and LML file
Definition: GenerateModel.cpp:168
camitk::MeshComponent::getSelection
vtkSmartPointer< vtkSelectionNode > getSelection(const QString &name) const
Get a selection from its name.
Definition: MeshComponent.cpp:478
camitk::Action::setDescription
void setDescription(QString description)
the description of the action
Definition: Action.cpp:126
GenerateModel::apply
virtual camitk::Action::ApplyStatus apply()
method applied when the action is called
Definition: GenerateModel.cpp:70
SimulatorFactory.h
camitk::Component::getName
QString getName() const override
get the name to be displayed
Definition: sdk/libraries/core/component/Component.h:907
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
MonitoringManager
Manager of the benchmark tests. Do simulation loop and tests.
Definition: MonitoringManager.h:50
Loads
This class makes it possible to manage a list of "Load". Remember that Load is an abstract class (con...
Definition: Loads.h:71
Direction::setNullZ
void setNullZ()
set the z coordinate as NULL
Definition: Direction.h:249
Translation.h
camitk::Action::addParameter
virtual bool addParameter(Property *)
Add a new parameter to the action, using the CamiTK property class.
Definition: Action.cpp:440
camitk::ActionExtension
This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core,...
Definition: ActionExtension.h:80
Translation
Class that defines the type of Load 'Translation'.
Definition: Translation.h:39
GenerateModel::fixedDOFIndex
std::set< int > fixedDOFIndex
Definition: GenerateModel.h:72
GenerateModel::saveSOFAFile
void saveSOFAFile(QString baseFilename)
save the .scn file, TODO add the choice to save MML with another simulator
Definition: GenerateModel.cpp:121
camitk::Component::setFileName
void setFileName(const QString &)
set the file name where the data have to be stored
Definition: sdk/libraries/core/component/Component.cpp:466
MonitoringManagerFactory::createManager
static MonitoringManager * createManager(const char *mml)
create an interactive or noninteractive manager according to simulator type
Definition: MonitoringManagerFactory.cpp:32
MultiComponent.h
camitk::MeshComponent
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:53
camitk::refresh
void refresh()
refresh the display
Core.h
ExtensionManager.h
GenerateModel::getWidget
virtual QWidget * getWidget()
default widget
Definition: GenerateModel.h:56
Direction::setNullX
void setNullX()
set the x coordinate as NULL
Definition: Direction.h:188
Load::addValueEvent
void addValueEvent(const double v, const double d)
set the valueEvent.
Definition: Load.cpp:198
Application.h
camitk
Definition: Action.cpp:35
GenerateModel::targetMesh
camitk::MeshComponent * targetMesh
The current managed mesh.
Definition: GenerateModel.h:75
Load::setDirection
void setDirection(const double x, const double y, const double z)
Set the direction using 3 coordinates.
Definition: Load.cpp:246