![]() |
Orfeo Toolbox
3.16
|
Example to show how to define templated load classes. More...
#include <itkFEMLoadTest.h>
Inheritance diagram for itk::fem::LoadTest< TClass >:
Collaboration diagram for itk::fem::LoadTest< TClass >:Public Types | |
| typedef FEMPArray< Self > | ArrayType |
| typedef Self | Baseclass |
| typedef const Self * | ConstPointer |
| typedef std::vector < Element::ConstPointer > | ElementPointersVectorType |
| typedef Element::Float | Float |
| typedef Self * | Pointer |
| typedef LoadTest | Self |
| typedef LoadElement | Superclass |
Public Member Functions | |
| LoadTest () | |
| virtual int | ClassID () const |
| virtual Baseclass::Pointer | Clone () const |
| virtual Solution::ConstPointer | GetSolution () |
| virtual void | Read (std::istream &f, void *info) |
| virtual void | SetSolution (Solution::ConstPointer) |
| void | Write (std::ostream &f) const |
Static Public Member Functions | |
| static FEMLightObject::Pointer | CreateFromStream (std::istream &f, void *info) |
| static Self::Pointer | New () |
| static void | SkipWhiteSpace (std::istream &f) |
Public Attributes | |
| TClass | data |
| ElementPointersVectorType | el |
| int | GN |
Static Public Attributes | |
| static const int | CLID |
| static const std::string | whitespaces = " \t\n\r" |
Static Private Attributes | |
| static const int | DummyCLID = LoadTest<TClass>::CLID() |
Example to show how to define templated load classes.
Definition at line 35 of file itkFEMLoadTest.h.
|
inherited |
Array class that holds special pointers to the load objects
Definition at line 42 of file itkFEMLoadBase.h.
|
inherited |
Store the base class typedef for easy access from derived classes. FEM_CLASS macro also expects this for the FEMOF...
Definition at line 62 of file itkFEMLightObject.h.
| typedef const Self* itk::fem::LoadTest< TClass >::ConstPointer |
Const pointer or SmartPointer to an object.
Reimplemented from itk::fem::LoadElement.
Definition at line 37 of file itkFEMLoadTest.h.
|
inherited |
Type of array of pointers to element objects
Definition at line 53 of file itkFEMLoadElementBase.h.
|
inherited |
Float type used in Element and derived classes
Reimplemented in itk::fem::ImageMetricLoad< TMoving, TFixed >, and itk::fem::FiniteDifferenceFunctionLoad< TMoving, TFixed >.
Definition at line 48 of file itkFEMLoadElementBase.h.
| typedef Self* itk::fem::LoadTest< TClass >::Pointer |
Pointer or SmartPointer to an object.
Reimplemented from itk::fem::LoadElement.
Definition at line 37 of file itkFEMLoadTest.h.
| typedef LoadTest itk::fem::LoadTest< TClass >::Self |
Standard Self typedef.
Reimplemented from itk::fem::LoadElement.
Definition at line 37 of file itkFEMLoadTest.h.
| typedef LoadElement itk::fem::LoadTest< TClass >::Superclass |
Standard Superclass typedef.
Reimplemented from itk::fem::LoadElement.
Definition at line 37 of file itkFEMLoadTest.h.
|
inline |
Default constructor
Definition at line 43 of file itkFEMLoadTest.h.
|
inlinevirtual |
Virtual function to access the class ID
Reimplemented from itk::fem::LoadElement.
Definition at line 37 of file itkFEMLoadTest.h.
|
virtual |
Create a new object from the existing one
Reimplemented from itk::fem::LoadElement.
|
staticinherited |
Read object of any derived type from stream.
This static function creates an object of a class, which is derived from FEMLightObject. The class of object is first determined from the stream, then the object of that class is constructed using the FEMObjectFactory. Finally the data for this object is read from the stream, by calling the Read() member function.
Read and create object of any derived class from stream
Catch possible exceptions while reading object's data from stream
Return a pointer to a newly created object if all was OK Technically everithing should be fine here (a!=0), but we check again, just in case.
Something went wrong. Reset the stream position to where it was before reading the object.
Definition at line 77 of file itkFEMLightObject.cxx.
References itk::fem::FEMObjectFactory< FEMLightObject >::ClassName2ID(), itk::fem::FEMObjectFactory< FEMLightObject >::Create(), itk::fem::FEMLightObject::Read(), itk::fem::FEMLightObject::SkipWhiteSpace(), and itk::fem::FEMLightObject::whitespaces.
Referenced by itk::fem::Solver::Read().
|
inlinevirtualinherited |
Reimplemented in itk::fem::FiniteDifferenceFunctionLoad< TMoving, TFixed >, itk::fem::ImageMetricLoad< TMoving, TFixed >, and itk::fem::LoadLandmark.
Definition at line 57 of file itkFEMLoadBase.h.
|
inlinestatic |
Object creation in an itk compatible way
Reimplemented from itk::fem::LoadElement.
Definition at line 37 of file itkFEMLoadTest.h.
|
inlinevirtual |
pointers to element objects on which the load acts
Read the LoadElement object from input stream
Convert the info pointer to a usable objects first call the parent's read function
read and set pointers to element that we're applying the load to
first we read number of pointers in a list
if this is <= 0, the load applies on all elements in a system
otherwise we read all the element numbers. there should be n of them
Reimplemented from itk::fem::LoadElement.
Definition at line 50 of file itkFEMLoadTest.h.
References itk::fem::LoadElement::Read().
|
inlinevirtualinherited |
Sets the pointer to solution vector. This function is automatically called by the Solver class on every load object.
Some types of external Loads may need access to previous values of solution vector. If a derived class needs that, it should implement this function, and store the passed pointer accordingly. If the result vector is not required, the functionn should be left unimplemented, so that only the dummy implementation in base class is called.
| ptr | Pointer to the object of Solution class. |
Reimplemented in itk::fem::FiniteDifferenceFunctionLoad< TMoving, TFixed >, itk::fem::ImageMetricLoad< TMoving, TFixed >, and itk::fem::LoadLandmark.
Definition at line 56 of file itkFEMLoadBase.h.
|
staticinherited |
Helper function that skips all the whitespace and comments in an input stream.
Definition at line 189 of file itkFEMLightObject.cxx.
Referenced by itk::fem::FEMLightObject::CreateFromStream(), itk::fem::MaterialLinearElasticity::Read(), itk::fem::LoadEdge::Read(), itk::fem::LoadNode::Read(), itk::fem::LoadElement::Read(), itk::fem::LoadBC::Read(), itk::fem::LoadGravConst::Read(), itk::fem::FEMLightObject::Read(), itk::fem::LoadBCMFC::Read(), itk::fem::LoadLandmark::Read(), itk::fem::Element::Node::Read(), and itk::fem::FEMRegistrationFilter< TMovingImage, TFixedImage >::ReadConfigFile().
|
inlinevirtual |
Write the LoadElement to the output stream
first call the parent's write function
Write the list of element global numbers
check for errors
Reimplemented from itk::fem::LoadElement.
Definition at line 54 of file itkFEMLoadTest.h.
References itk::fem::LoadElement::Write().
|
static |
Class ID for FEM object factory
Reimplemented from itk::fem::LoadElement.
Definition at line 37 of file itkFEMLoadTest.h.
| TClass itk::fem::LoadTest< TClass >::data |
Some data that this load defines.
Definition at line 48 of file itkFEMLoadTest.h.
|
staticprivate |
Dummy static int that enables automatic registration with FEMObjectFactory.
Definition at line 63 of file itkFEMLoadTest.h.
|
inherited |
Definition at line 54 of file itkFEMLoadElementBase.h.
Referenced by itk::fem::LoadLandmark::AssignToElement(), itk::fem::LoadElement::Read(), itk::fem::LoadLandmark::Read(), and itk::fem::LoadElement::Write().
|
inherited |
Global number of an object (ID of an object) In general the ID's are required to be unique only within a specific type of derived classes (Elements, Nodes, ...) If the GN is not required, it can be ignored. (normally you need the GN when writing or reading objects to/from stream.
Definition at line 163 of file itkFEMLightObject.h.
Referenced by itk::fem::FEMLightObject::FEMLightObject(), itk::fem::Generate2DRectilinearMesh(), itk::fem::Generate3DRectilinearMesh(), itk::fem::FEMLightObject::Read(), itk::fem::LoadNode::Write(), itk::fem::LoadBC::Write(), and itk::fem::FEMLightObject::Write().
|
staticinherited |
Const string of all whitespace characters. This string is used by SkipWhiteSpace function.
Definition at line 133 of file itkFEMLightObject.h.
Referenced by itk::fem::FEMLightObject::CreateFromStream(), and itk::fem::MaterialLinearElasticity::Read().