#include <Physics.h>
Inheritance diagram for mial::Physics< Type, nDims, MType, VType >:
Public Types | |
typedef Physics | Self |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef itk::WeakPointer< const Self > | ConstWeakPointer |
typedef Deformation< Type, nDims, MType, VType > | DeformationType |
The type of deformation's used. Notice they must be of the same internal storage types and dimension as the physics class. | |
typedef MType | MatrixType |
typedef VType | VectorType |
typedef Geometric< Type, nDims, MatrixType, VectorType > | GeometryType |
The type of geometric layer used. Notice that it must be of the same internal storage types and dimension as the physics class. | |
Public Member Functions | |
~Physics () | |
The destructor in charge of correctly removing the deformation list from the heap before an instantiation of the class is removed from memory. | |
virtual bool | runDeformation (const std::string defName, typename DeformationType::deformationIn *const i, std::stringstream *const s=NULL)=0 |
Public member. Used by a behaviour to execute a particular deformation by name. | |
virtual bool | addDeformation (Deformation< Type, nDims > *def) |
Public member for adding a new deformation. | |
virtual bool | simulate ()=0 |
Simulate the deformation dynamics. | |
virtual void | setExternalForces (void *img)=0 |
Public pure virtual function for setting the external forces used during simulations of the deformation dynamics. | |
void | setGeometry (GeometryType *a) |
Public method for setting the geometric type. | |
double | getTime () |
Protected Member Functions | |
Physics () | |
The default constructor. | |
Protected Attributes | |
int | numDeformations |
The number of deformations currently invocable. | |
GeometryType::Pointer | geom |
The geometric layer. | |
std::vector< typename Deformation< Type, nDims >::Pointer > | deformationsList |
The list of deformations invocable by a particular physics layer. A list of smart pointers. | |
double | time |
Keep track of the time. | |
Classes | |
struct | Error |
A structure containing error information that should be filled and thrown whenever an error in the simulation occurs. More... |
The physical layer of a deformable organism handles the simulation of the deformation dynamics. That is to say, it manipulates the nodes, or surfaces housed by the geometrical layer. It also maintains a list of available deformations which can be invoked on the model via the runDeformation method. This class is currently classified as stable.
Error reporting is handled by the Error structure, containing an error string, the deformation number concerned, and the deformations Error structure itself.
Type | The data type to be used for internal storage. | |
nDims | The number of dimensions used for simulations. | |
MType | The type of matrix used for internal storage. Defaults to vnl_matrix<Type>, the only supported type at this time. | |
VType | The type of vector used for internal storage. Defaults to vnl_vector<Type>, the only supported type at this time. |
Definition at line 39 of file Physics.h.
virtual bool mial::Physics< Type, nDims, MType, VType >::runDeformation | ( | const std::string | defName, | |
typename DeformationType::deformationIn *const | i, | |||
std::stringstream *const | s = NULL | |||
) | [pure virtual] |
Public member. Used by a behaviour to execute a particular deformation by name.
Runs a deformation on the attached geometric layer.
args | The marshaled argument list. |
Implemented in mial::Phys_Euler< DataType, TGradientImage, nDims, MType, VType >, mial::Phys_LevelSet< DataType, InputImageType, nDims, MType, VType >, and mial::Phys_Euler< float, TGradientImage, nDims, MType, VType >.
Referenced by mial::Beh_UniformScale< Type, nDims >::run(), mial::Beh_TranslateAll< Type, nDims >::run(), and mial::Beh_TranslateAll< Type, nDims >::update().
virtual void mial::Physics< Type, nDims, MType, VType >::setExternalForces | ( | void * | img | ) | [pure virtual] |
Public pure virtual function for setting the external forces used during simulations of the deformation dynamics.
The external force image is used to provide external forces to the organism during the deformation process. These could be gradient based, or a distance transform from a point of interest, etc.
img | The image to be used as an external force. Derived classes must publicly define the expected type, and then typecast the input to this function. |
Implemented in mial::Phys_Euler< DataType, TGradientImage, nDims, MType, VType >, mial::Phys_LevelSet< DataType, InputImageType, nDims, MType, VType >, and mial::Phys_Euler< float, TGradientImage, nDims, MType, VType >.