![]() |
Computer Assited Medical Intervention Tool Kit
version 4.0
|
This class manages the applied all loads (see LML), deformation add-on, atom data monitoring and atom decoration. More...
#include <LoadsManager.h>
Public Member Functions | |
| LoadsManager (PMManagerDC *) | |
| Constructor (give it the PMManagerDC it is linked with) More... | |
| ~LoadsManager () | |
| Destructor. More... | |
Load Management | |
input/output of load for the simulation | |
| bool | open (const QString &) |
| Load a load file and its loads' list The filename should have the .lml extension (impload file) More... | |
| void | save () |
| save the current load list in the current file name More... | |
| void | saveAs (const QString &) |
| save the current load list in a new file More... | |
| Loads * | getLoads () |
| get the current load list More... | |
| void | setLoads (Loads *) |
| set the current load list (delete previous if existing) More... | |
| void | deleteAllLoads () |
| delete all current loads More... | |
| void | close () |
| close the current load list (means do not save, put the current filename to "" and physicalmodel ptr to NULL (but of course don not delete it!) More... | |
| void | addLoad (Load *) |
| add a load to the list More... | |
| void | editLoads () |
| show the edit dialog More... | |
| void | previewLoads () |
| show the preview dialog More... | |
| void | addLoad () |
| show the add load dialog (add loads on all currently selected AtomDC atoms) More... | |
Simulation | |
methods that deals with the simulation | |
| LoadsSimulation * | getLoadsSimulation () |
| void | simulation () |
| show the animation motor add-on dialog More... | |
| void | addSimulationTab (QWidget *) |
| add another widget in the simulation tab More... | |
| void | pause () |
| stop the current simulation or movie More... | |
| void | rewind () |
| rewind the current simulation or movie More... | |
3D Display | |
methods in charge of change in the 3D display | |
| void | updateTime () |
| To update the display of current time using the animation motor add-on (if it exists) actual time. More... | |
| void | setDisplayLoads (bool) |
| show/unshow the load in 3D More... | |
| void | updateLoadsDisplay () |
| update the current 3D representation of the loads (arrows...) More... | |
| bool | displayLoads () const |
| return true only if the loads are currently being displayed in 3D More... | |
Other (Utilities) | |
other methods (generaly utilities) | |
| bool | isModified () const |
| return the current state regarding modification since the last save More... | |
| void | setChangedFlagOff () |
| set the Loads changed flag to false; More... | |
| bool | getLoadsChangedFlag () |
| return the loads changed flag value; More... | |
| bool | userWantsToSave () |
| ask the user if (s)he wants to save the last changed More... | |
| PMManagerDC * | getPMManagerDC () |
| get the current physical model More... | |
| QString | getAnimationMotorAddonLocation () |
| get the animation motor add-onlocation (.dll / .so / .dylib) More... | |
| void | setAnimationMotorAddonLocation (QString) |
| set the animation motor add-on location More... | |
| void | userConstrainedAtomDataScale (bool constrained) |
| set the data scale state (user constrained or driven by min/max in the simulution) More... | |
| bool | getUserConstrainedAtomDataScale () |
| get the current state of the data scale More... | |
| void | getAtomDataScale (double *min, double *max) |
| get the user constrained values of the data scale (or current min/max in the data scale is not user constrained) More... | |
Private Member Functions | |
| void | addDecoration (Atom *a, Load *ld, double time, double defaultSize, double *max, double *min, double *val) |
| add a decoration to atom. More... | |
Private Attributes | |
| std::AtomDataVector | atomData |
| List of atom data values (one value per atom) More... | |
| AtomDataDisplayType | atomDataDisplay |
| which atom data are to display: none, displacements, distances, ... More... | |
| QString | atomDataName |
| name of the add-on atom data More... | |
| bool | changed |
| had the load list been changed since the last time it was saved More... | |
| bool | constrainedAtomDataScale |
| current state of the data scale More... | |
| QString | fileName |
| the current name of managed file More... | |
| bool | loadsChangedFlag |
| has the load list been changed since the last simulation More... | |
| LoadsEditor * | loadsEditor |
| the dialog where all the loads are shown, and can be modified More... | |
| double | max |
| current maximum value of the data scale More... | |
| double | min |
| current minimum value of the data scale More... | |
| QString | motorAddonLocation |
| the current animation motor add-on location More... | |
| Loads * | myLoads |
| all the managed loads More... | |
| PMManagerDC * | myPMManagerDC |
| the PM manager DC More... | |
| LoadsMovie * | previewDialog |
| the preview (simulation animation dialog) More... | |
| PhysicalModel * | referencePM |
| the physical model to use as the reference for some atom data display More... | |
| QSet< AtomDecoration * > | representation3D |
| List of arrow and sphere representing the loads in 3D. More... | |
| bool | showLoads |
| are the load currently displayed in 3D? More... | |
| QDockWidget * | simDock |
| the dock widget where the simulation dialog is More... | |
| LoadsSimulation * | simulationDialog |
| the simulation dialog More... | |
Atom Data Display | |
methods in charge of the atom display (color for each node, interpolated if the representation is surfacic) | |
| enum | AtomDataDisplayType { NONE, ADD_ON, DISPLACEMENTS, DISTANCES, RELATIVE_ENERGY_NORM_ERROR } |
| void | setAtomDataDisplay (AtomDataDisplayType) |
| set the type of atom data display you want to see, for ADD_ON please use setAtomData More... | |
| AtomDataDisplayType | getAtomDataDisplay () const |
| get current atom display type More... | |
| void | setReferencePML (const QString &) |
| set the file name for the reference Physical Model More... | |
| PhysicalModel * | getReferencePM () const |
| return the reference physical model to use for some computations More... | |
| void | setAtomData (std::AtomDataVector &values, QString name="Add-On Monitor") |
| set the new atom data (one scalar per atom), and update display More... | |
| std::AtomDataVector & | getAtomData () |
| get the current list of all the atom data More... | |
| void | updateAtomDataScale (double min, double max) |
| update the color scale of the atom data (min and max values) More... | |
This class manages the applied all loads (see LML), deformation add-on, atom data monitoring and atom decoration.
Thanks to contribution from: Pascale Ducloux, Aude Flourens, Jocelyne Mekontso, Christine Oddes.
type of atom data display (exclusive)
| LoadsManager::LoadsManager | ( | PMManagerDC * | pmManagerDC | ) |
Constructor (give it the PMManagerDC it is linked with)
References camitk::Application::getMainWindow().
| LoadsManager::~LoadsManager | ( | ) |
Destructor.
References camitk::Application::getMainWindow().
|
private |
add a decoration to atom.
| a | the atom on which the decoration will be added |
| ld | the decoration type is dependent of the type of ld (translation, force, null translation...) |
| time | the current time |
| defaultSize | size by default |
| min | minimal value (can be updated) |
| max | maximal value (can be updated) |
| val | current value (always updated) |
References camitk::GeometricObject::ARROW, Load::getDirection(), Atom::getPosition(), AtomDecoration::getType(), Load::getType(), Load::getValue(), AtomDecoration::setColor(), AtomDecoration::setSize(), AtomDecoration::show(), camitk::GeometricObject::SPHERE, and AtomDecoration::update().
| void LoadsManager::addLoad | ( | Load * | l | ) |
add a load to the list
Referenced by LoadsEditor::apply().
| void LoadsManager::addLoad | ( | ) |
show the add load dialog (add loads on all currently selected AtomDC atoms)
References camitk::Application::getSelectedComponents(), camitk::Component::isInstanceOf(), and LoadsEditor::show().
| void LoadsManager::addSimulationTab | ( | QWidget * | w | ) |
add another widget in the simulation tab
| void LoadsManager::close | ( | ) |
close the current load list (means do not save, put the current filename to "" and physicalmodel ptr to NULL (but of course don not delete it!)
References camitk::InteractiveViewer::get3DViewer(), camitk::InteractiveViewer::refreshRenderer(), and AtomDecoration::show().
Referenced by PMManagerDCPopup::closeLoads().
| void LoadsManager::deleteAllLoads | ( | ) |
delete all current loads
Referenced by LoadsEditor::apply().
|
inline |
return true only if the loads are currently being displayed in 3D
Referenced by PMManagerDCPopup::updateMenuActions().
| void LoadsManager::editLoads | ( | ) |
show the edit dialog
Referenced by PMManagerDCPopup::editLoads().
| QString LoadsManager::getAnimationMotorAddonLocation | ( | ) |
get the animation motor add-onlocation (.dll / .so / .dylib)
Referenced by LoadsSimulation::init().
|
inline |
get the current list of all the atom data
|
inline |
get current atom display type
Referenced by LoadsSimulation::doOneStep(), and PMManagerDCPopup::updateMenuActions().
| void LoadsManager::getAtomDataScale | ( | double * | min, |
| double * | max | ||
| ) |
get the user constrained values of the data scale (or current min/max in the data scale is not user constrained)
| min | the min value of the data scale |
| max | the max value of the data scale |
| Loads * LoadsManager::getLoads | ( | ) |
get the current load list
Referenced by LoadsMovie::init(), LoadsMovie::LoadsMovie(), LoadsEditor::updateLoads(), and PMManagerDCPopup::updateMenuActions().
|
inline |
return the loads changed flag value;
|
inline |
get the current LoadsSimulation
|
inline |
get the current physical model
Referenced by LoadsEditor::applyToReturnPressed(), LoadsSimulation::doOneStep(), and LoadsMovie::makeVideo().
|
inline |
return the reference physical model to use for some computations
Referenced by PMManagerDCPopup::atomDataDisplay().
| bool LoadsManager::getUserConstrainedAtomDataScale | ( | ) |
get the current state of the data scale
Referenced by PMManagerDCPopup::setAtomDataScale().
|
inline |
return the current state regarding modification since the last save
Referenced by PMManagerDC::getModified(), and PMManagerDCPopup::updateMenuActions().
| bool LoadsManager::open | ( | const QString & | fileName | ) |
Load a load file and its loads' list The filename should have the .lml extension (impload file)
Referenced by PMManagerDCPopup::openLoads().
| void LoadsManager::pause | ( | ) |
stop the current simulation or movie
| void LoadsManager::previewLoads | ( | ) |
show the preview dialog
Referenced by PMManagerDCPopup::previewLoads().
| void LoadsManager::rewind | ( | ) |
rewind the current simulation or movie
| void LoadsManager::save | ( | ) |
save the current load list in the current file name
Referenced by PMManagerDCPopup::saveLoads().
| void LoadsManager::saveAs | ( | const QString & | fileName | ) |
save the current load list in a new file
Referenced by PMManagerDCPopup::saveAsLoads().
| void LoadsManager::setAnimationMotorAddonLocation | ( | QString | mloc | ) |
set the animation motor add-on location
Referenced by LoadsSimulation::loadAddon().
| void LoadsManager::setAtomData | ( | std::AtomDataVector & | values, |
| QString | name = "Add-On Monitor" |
||
| ) |
set the new atom data (one scalar per atom), and update display
| values | values to show |
| name | for add-ons, this is the specific atom data name to show on screen |
| void LoadsManager::setAtomDataDisplay | ( | AtomDataDisplayType | adt | ) |
set the type of atom data display you want to see, for ADD_ON please use setAtomData
References camitk::InteractiveViewer::get3DViewer(), camitk::InteractiveViewer::setColorScale(), and camitk::InteractiveViewer::setColorScaleTitle().
Referenced by PMManagerDCPopup::atomDataDisplay(), and LoadsSimulation::doOneStep().
|
inline |
set the Loads changed flag to false;
| void LoadsManager::setDisplayLoads | ( | bool | s | ) |
show/unshow the load in 3D
References AtomDecoration::show().
Referenced by PMManagerDCPopup::displayLoads().
| void LoadsManager::setLoads | ( | Loads * | loads | ) |
set the current load list (delete previous if existing)
| void LoadsManager::setReferencePML | ( | const QString & | fileName | ) |
set the file name for the reference Physical Model
Referenced by PMManagerDCPopup::openReferencePML().
| void LoadsManager::simulation | ( | ) |
show the animation motor add-on dialog
Referenced by PMManagerDCPopup::simulation().
| void LoadsManager::updateAtomDataScale | ( | double | min, |
| double | max | ||
| ) |
update the color scale of the atom data (min and max values)
References camitk::InteractiveViewer::get3DViewer(), and camitk::InteractiveViewer::setColorScaleMinMax().
Referenced by PMManagerDCPopup::setAtomDataScale().
| void LoadsManager::updateLoadsDisplay | ( | ) |
update the current 3D representation of the loads (arrows...)
References PhysicalModel::getAtom(), MultiComponent::getComponentByName(), PhysicalModel::getInformativeComponents(), TargetList::getNamedTarget(), StructuralComponent::getNumberOfStructures(), StructuralComponent::getStructure(), Load::getTarget(), Load::getTargetList(), AtomDecoration::getType(), TargetList::indexedTargets(), Load::isActive(), Load::numberOfTargets(), AtomDecoration::setSize(), and camitk::GeometricObject::SPHERE.
Referenced by LoadsEditor::apply(), and PMManagerDCPopup::openLoads().
| void LoadsManager::updateTime | ( | ) |
To update the display of current time using the animation motor add-on (if it exists) actual time.
| void LoadsManager::userConstrainedAtomDataScale | ( | bool | constrained | ) |
set the data scale state (user constrained or driven by min/max in the simulution)
Referenced by PMManagerDCPopup::setAtomDataScale().
| bool LoadsManager::userWantsToSave | ( | ) |
ask the user if (s)he wants to save the last changed
|
private |
List of atom data values (one value per atom)
|
private |
which atom data are to display: none, displacements, distances, ...
|
private |
name of the add-on atom data
|
private |
had the load list been changed since the last time it was saved
|
private |
current state of the data scale
|
private |
the current name of managed file
|
private |
has the load list been changed since the last simulation
|
private |
the dialog where all the loads are shown, and can be modified
|
private |
current maximum value of the data scale
|
private |
current minimum value of the data scale
|
private |
the current animation motor add-on location
|
private |
all the managed loads
|
private |
the PM manager DC
|
private |
the preview (simulation animation dialog)
|
private |
the physical model to use as the reference for some atom data display
|
private |
List of arrow and sphere representing the loads in 3D.
|
private |
are the load currently displayed in 3D?
|
private |
the dock widget where the simulation dialog is
|
private |
the simulation dialog
1.8.13