Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
LoadsManager Class Reference

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...
 
LoadsgetLoads ()
 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

LoadsSimulationgetLoadsSimulation ()
 
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...
 
PMManagerDCgetPMManagerDC ()
 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...
 
LoadsEditorloadsEditor
 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...
 
LoadsmyLoads
 all the managed loads More...
 
PMManagerDCmyPMManagerDC
 the PM manager DC More...
 
LoadsMoviepreviewDialog
 the preview (simulation animation dialog) More...
 
PhysicalModelreferencePM
 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...
 
LoadsSimulationsimulationDialog
 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...
 
PhysicalModelgetReferencePM () 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...
 

Detailed Description

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.

Member Enumeration Documentation

type of atom data display (exclusive)

Enumerator
NONE 

do not display any atom data

ADD_ON 

display add-on atom data (i.e. atom data computed by the add-on)

DISPLACEMENTS 

display total displacements from initial position

DISTANCES 

display distances from the reference PML

RELATIVE_ENERGY_NORM_ERROR 

display the relative energy norm error (as a percentage)

Constructor & Destructor Documentation

LoadsManager::LoadsManager ( PMManagerDC )

Constructor (give it the PMManagerDC it is linked with)

LoadsManager::~LoadsManager ( )

Destructor.

Member Function Documentation

void LoadsManager::addDecoration ( Atom a,
Load ld,
double  time,
double  defaultSize,
double *  max,
double *  min,
double *  val 
)
private

add a decoration to atom.

Parameters
athe atom on which the decoration will be added
ldthe decoration type is dependent of the type of ld (translation, force, null translation...)
timethe current time
defaultSizesize by default
minminimal value (can be updated)
maxmaximal value (can be updated)
valcurrent value (always updated)
void LoadsManager::addLoad ( Load )

add a load to the list

void LoadsManager::addLoad ( )

show the add load dialog (add loads on all currently selected AtomDC atoms)

void LoadsManager::addSimulationTab ( QWidget *  )

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!)

void LoadsManager::deleteAllLoads ( )

delete all current loads

bool LoadsManager::displayLoads ( ) const
inline

return true only if the loads are currently being displayed in 3D

References showLoads.

void LoadsManager::editLoads ( )

show the edit dialog

QString LoadsManager::getAnimationMotorAddonLocation ( )

get the animation motor add-onlocation (.dll / .so / .dylib)

std::AtomDataVector & LoadsManager::getAtomData ( )
inline

get the current list of all the atom data

References atomData.

LoadsManager::AtomDataDisplayType LoadsManager::getAtomDataDisplay ( ) const
inline

get current atom display type

References atomDataDisplay.

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)

Parameters
minthe min value of the data scale
maxthe max value of the data scale
Loads* LoadsManager::getLoads ( )

get the current load list

bool LoadsManager::getLoadsChangedFlag ( )
inline

return the loads changed flag value;

References loadsChangedFlag.

LoadsSimulation * LoadsManager::getLoadsSimulation ( )
inline

get the current LoadsSimulation

References simulationDialog.

PMManagerDC * LoadsManager::getPMManagerDC ( )
inline

get the current physical model

References myPMManagerDC.

PhysicalModel * LoadsManager::getReferencePM ( ) const
inline

return the reference physical model to use for some computations

References referencePM.

bool LoadsManager::getUserConstrainedAtomDataScale ( )

get the current state of the data scale

bool LoadsManager::isModified ( ) const
inline

return the current state regarding modification since the last save

References changed.

bool LoadsManager::open ( const QString &  )

Load a load file and its loads' list The filename should have the .lml extension (impload file)

Returns
true if the file was succesfully read,
false otherwise (problem or unknown extension).
void LoadsManager::pause ( )

stop the current simulation or movie

void LoadsManager::previewLoads ( )

show the preview dialog

void LoadsManager::rewind ( )

rewind the current simulation or movie

void LoadsManager::save ( )

save the current load list in the current file name

void LoadsManager::saveAs ( const QString &  )

save the current load list in a new file

void LoadsManager::setAnimationMotorAddonLocation ( QString  )

set the animation motor add-on location

void LoadsManager::setAtomData ( std::AtomDataVector &  values,
QString  name = "Add-On Monitor" 
)

set the new atom data (one scalar per atom), and update display

Parameters
valuesvalues to show
namefor add-ons, this is the specific atom data name to show on screen
void LoadsManager::setAtomDataDisplay ( AtomDataDisplayType  )

set the type of atom data display you want to see, for ADD_ON please use setAtomData

void LoadsManager::setChangedFlagOff ( )
inline

set the Loads changed flag to false;

References loadsChangedFlag.

void LoadsManager::setDisplayLoads ( bool  )

show/unshow the load in 3D

void LoadsManager::setLoads ( Loads )

set the current load list (delete previous if existing)

void LoadsManager::setReferencePML ( const QString &  )

set the file name for the reference Physical Model

void LoadsManager::simulation ( )

show the animation motor add-on dialog

void LoadsManager::updateAtomDataScale ( double  min,
double  max 
)

update the color scale of the atom data (min and max values)

void LoadsManager::updateLoadsDisplay ( )

update the current 3D representation of the loads (arrows...)

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)

bool LoadsManager::userWantsToSave ( )

ask the user if (s)he wants to save the last changed

Member Data Documentation

std::AtomDataVector LoadsManager::atomData
private

List of atom data values (one value per atom)

Referenced by getAtomData().

AtomDataDisplayType LoadsManager::atomDataDisplay
private

which atom data are to display: none, displacements, distances, ...

Referenced by getAtomDataDisplay().

QString LoadsManager::atomDataName
private

name of the add-on atom data

bool LoadsManager::changed
private

had the load list been changed since the last time it was saved

Referenced by isModified().

bool LoadsManager::constrainedAtomDataScale
private

current state of the data scale

QString LoadsManager::fileName
private

the current name of managed file

bool LoadsManager::loadsChangedFlag
private

has the load list been changed since the last simulation

Referenced by getLoadsChangedFlag(), and setChangedFlagOff().

LoadsEditor* LoadsManager::loadsEditor
private

the dialog where all the loads are shown, and can be modified

double LoadsManager::max
private

current maximum value of the data scale

double LoadsManager::min
private

current minimum value of the data scale

QString LoadsManager::motorAddonLocation
private

the current animation motor add-on location

Loads* LoadsManager::myLoads
private

all the managed loads

PMManagerDC* LoadsManager::myPMManagerDC
private

the PM manager DC

Referenced by getPMManagerDC().

LoadsMovie* LoadsManager::previewDialog
private

the preview (simulation animation dialog)

PhysicalModel* LoadsManager::referencePM
private

the physical model to use as the reference for some atom data display

Referenced by getReferencePM().

QSet<AtomDecoration *> LoadsManager::representation3D
private

List of arrow and sphere representing the loads in 3D.

bool LoadsManager::showLoads
private

are the load currently displayed in 3D?

Referenced by displayLoads().

QDockWidget* LoadsManager::simDock
private

the dock widget where the simulation dialog is

LoadsSimulation* LoadsManager::simulationDialog
private

the simulation dialog

Referenced by getLoadsSimulation().


The documentation for this class was generated from the following file: