#include <Geometric.h>
Inheritance diagram for mial::Geometric< dType, nDims, MType, VType >:
Public Types | |
typedef Geometric | Self |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef itk::WeakPointer< const Self > | ConstWeakPointer |
typedef VType | VectorType |
The internal vector type. | |
typedef MType | MatrixType |
The internal matrix type. | |
typedef itk::Image< unsigned char, nDims > | BinaryImageType |
The type of binary image. | |
Public Member Functions | |
virtual VectorType | getCentroid () |
virtual bool | setMatrixNodePositions (MatrixType pos, int *rows)=0 |
Pure virtual member. | |
virtual bool | setMatrixNodePositions (MatrixType pos)=0 |
Pure virtual member. | |
unsigned int | getNumNodes () |
Accessor returning the number of nodes. | |
virtual bool | addNodes (MatrixType nodes, VectorType classes)=0 |
Pure virtual member function. | |
virtual bool | addConnection (int a, int b)=0 |
Pure virtual member function. | |
virtual bool | removeNode (int index)=0 |
Pure virtual member function. | |
virtual MatrixType | getMatrixNodePositions ()=0 |
Pure virtual member function. Returns the matrix node positions. | |
virtual MatrixType | getMatrixConnections ()=0 |
Pure virtual member function. Returns the matrix of connections. | |
virtual void | writeNodesToFile (std::string fileName)=0 |
Pure virtual member function. Writes the nodes to a file. | |
virtual void | readNodesFromFile (std::string fileName)=0 |
Pure virtual member function. Reads the nodes from a file. | |
virtual void | generateTopologyFromBinaryImage (typename BinaryImageType::Pointer binaryInputImage)=0 |
Pure virtual member function. Creates an organism from a binary mask. | |
virtual itk::Image< unsigned char, nDims >::Pointer | generateBinaryImageFromTopology (typename BinaryImageType::SizeType)=0 |
Pure virtual member function. Creates a binary mask image from the organism. | |
unsigned int | getNumConnections () |
Accessor for the number of connections. | |
bool | didTopologyChange () |
Accessor for topology change. | |
bool | didNodesChange () |
Accessor for node position change. | |
Protected Member Functions | |
Geometric () | |
Default constructor. | |
Protected Attributes | |
MatrixType | mNodes |
An numNodes by nDims matrix containing all the nodes of the organism. | |
VectorType | nodeClass |
A vector containing classifiers for all nodes. | |
MatrixType | mConnections |
A numConnections by 2 matrix containing connections between nodes as rows. | |
VectorType | connectionClass |
A vector containing classifiers for all connections. | |
unsigned int | numNodes |
The number of nodes. Must be updated by derived classes when new nodes are added. | |
unsigned int | numConnections |
The number of connections between nodes. Must be updated by derived classes when new connections are added. | |
bool | topologyChange |
A state variable denoting a change in topology. | |
bool | nodesChange |
A state variable denoting a change in node positions. | |
Classes | |
struct | Error |
The geometrical layer of a deformable organism is responsible for managing the physical instantiation of the organisms body. Hence, the geometrical ABC serves as the storage point for the organisms topology.
dType | The data type used for numerical storage. | |
nDims | The number of dimensions. | |
MType | The matrix type used for internal matrix storage. Defaults to vnl_matrix<dType>. Only vnl is supported at this time. | |
VType | The vector type used for internal vector storage. Defaults to vnl_vector<dType>. Only vnl is supported at this time. |
Definition at line 28 of file Geometric.h.
virtual bool mial::Geometric< dType, nDims, MType, VType >::addConnection | ( | int | a, | |
int | b | |||
) | [pure virtual] |
Pure virtual member function.
Adds a connection between nodes in the organism, should be ran in conjunction with addNode. Implementations should correctly update the topology, and change the state variables.
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
virtual bool mial::Geometric< dType, nDims, MType, VType >::addNodes | ( | MatrixType | nodes, | |
VectorType | classes | |||
) | [pure virtual] |
Pure virtual member function.
Adds nodes to the organism, should be ran in conjunction with addConnection. Implementations should correctly update the topology, and change the state variables.
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
bool mial::Geometric< dType, nDims, MType, VType >::didNodesChange | ( | ) | [inline] |
Accessor for node position change.
TODO: Decide if should be smart enough to know who is asking. Keep a list of clients.
Definition at line 240 of file Geometric.h.
Referenced by mial::Phys_VesselCrawlerEuler< DataType, TGradientImage, nDims, MType, VType >::simulate().
bool mial::Geometric< dType, nDims, MType, VType >::didTopologyChange | ( | ) | [inline] |
Accessor for topology change.
TODO: Decide if should be smart enough to know who is asking. Keep a list of clients.
Definition at line 234 of file Geometric.h.
Referenced by mial::Phys_VesselCrawlerEuler< DataType, TGradientImage, nDims, MType, VType >::simulate().
virtual itk::Image< unsigned char, nDims>::Pointer mial::Geometric< dType, nDims, MType, VType >::generateBinaryImageFromTopology | ( | typename BinaryImageType::SizeType | ) | [pure virtual] |
Pure virtual member function. Creates a binary mask image from the organism.
Any implementation of this method should a binary image.
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
virtual void mial::Geometric< dType, nDims, MType, VType >::generateTopologyFromBinaryImage | ( | typename BinaryImageType::Pointer | binaryInputImage | ) | [pure virtual] |
Pure virtual member function. Creates an organism from a binary mask.
Any implementation of this method should produce a deformable organism from a binary image.
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
virtual MatrixType mial::Geometric< dType, nDims, MType, VType >::getMatrixConnections | ( | ) | [pure virtual] |
Pure virtual member function. Returns the matrix of connections.
Implementation should update the matrix connections before returning, hence why this is a pure virtual.
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
virtual MatrixType mial::Geometric< dType, nDims, MType, VType >::getMatrixNodePositions | ( | ) | [pure virtual] |
Pure virtual member function. Returns the matrix node positions.
Implementation should update the matrix node positions before returning, hence why this is a pure virtual.
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
virtual void mial::Geometric< dType, nDims, MType, VType >::readNodesFromFile | ( | std::string | fileName | ) | [pure virtual] |
Pure virtual member function. Reads the nodes from a file.
Derived class will need to update its own internal topology representation.
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, mial::Geom_vGeometry< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
virtual bool mial::Geometric< dType, nDims, MType, VType >::removeNode | ( | int | index | ) | [pure virtual] |
Pure virtual member function.
Removes a node from the organism. Implementations must make sure to correctly update the topology, and set the state variables.
index | The index of the node to be removed. |
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
virtual bool mial::Geometric< dType, nDims, MType, VType >::setMatrixNodePositions | ( | MatrixType | pos | ) | [pure virtual] |
Pure virtual member.
Set the matrix node positions for all nodes.
pos | the positions |
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
virtual bool mial::Geometric< dType, nDims, MType, VType >::setMatrixNodePositions | ( | MatrixType | pos, | |
int * | rows | |||
) | [pure virtual] |
Pure virtual member.
Set the matrix node positions at particular rows.
pos | The new positions. | |
rows | The rows to change. |
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
virtual void mial::Geometric< dType, nDims, MType, VType >::writeNodesToFile | ( | std::string | fileName | ) | [pure virtual] |
Pure virtual member function. Writes the nodes to a file.
Implementation should update the matrix positions before calling, hence why this is a pure virtual.
Implemented in mial::Geom_MeshSpatialObject< dType, nDims, MType, VType >, mial::Geom_vGeometry< dType, nDims, MType, VType >, and mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >.
VectorType mial::Geometric< dType, nDims, MType, VType >::connectionClass [protected] |
A vector containing classifiers for all connections.
Numerous defines are supported, and can be overridden at risk of breaking compatibility with existing functionality.
0 - medialNode 1 - boundaryNode 2 - internalNode
Definition at line 98 of file Geometric.h.
MatrixType mial::Geometric< dType, nDims, MType, VType >::mConnections [protected] |
A numConnections by 2 matrix containing connections between nodes as rows.
This must be updated anytime a derived class changes its own representation of the topology. This ensures a consistent data representation is available to all classes. However, for greater efficiency one could override the accessors to this function and therefore avoid doing the update; as the variable would never be accessed.
Definition at line 86 of file Geometric.h.
Referenced by mial::Geom_MeshSpatialObject< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >::getMatrixConnections().
MatrixType mial::Geometric< dType, nDims, MType, VType >::mNodes [protected] |
An numNodes by nDims matrix containing all the nodes of the organism.
This must be updated anytime a derived class changes its own representation of nodes. This ensures a consistent data representation is available to all classes. However, for greater efficiency one could override the accessors to this function and therefore avoid doing the update; as the variable would never be accessed.
Definition at line 50 of file Geometric.h.
Referenced by mial::Geometric< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >::getCentroid().
VectorType mial::Geometric< dType, nDims, MType, VType >::nodeClass [protected] |
A vector containing classifiers for all nodes.
Numerous defines are supported, and can be overridden at risk of breaking compatibility with existing functionality.
0 - medialNode 1 - boundaryNode 2 - internalNode
Definition at line 74 of file Geometric.h.
bool mial::Geometric< dType, nDims, MType, VType >::nodesChange [protected] |
A state variable denoting a change in node positions.
Set this variable true whenever a change in position or count of the nodes occurs. Any objects keeping local copies of topology (physic layers, etc) should check this state before running.
Definition at line 124 of file Geometric.h.
Referenced by mial::Geometric< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >::didNodesChange().
bool mial::Geometric< dType, nDims, MType, VType >::topologyChange [protected] |
A state variable denoting a change in topology.
Set this variable true whenever a change in topology occurs. Any objects keeping local copies of topology (physic layers, etc) should check this state before running.
Definition at line 115 of file Geometric.h.
Referenced by mial::Geometric< Type, nDims, vnl_matrix< Type >, vnl_vector< Type > >::didTopologyChange().