Chaste
Build::
|
#include <VesselNode.hpp>
Public Member Functions | |
VesselSegment (const VesselSegment< DIM > &rSegment) | |
void | CopyDataFromExistingSegment (const boost::shared_ptr< VesselSegment< DIM > > pTargetSegment) |
std::map< std::string, double > | GetOutputData () |
units::quantity< unit::length > | GetDistance (const DimensionalChastePoint< DIM > &location) const |
boost::shared_ptr< SegmentFlowProperties< DIM > > | GetFlowProperties () const |
units::quantity< unit::length > | GetLength () const |
DimensionalChastePoint< DIM > | GetMidPoint () const |
boost::shared_ptr< VesselNode< DIM > > | GetNode (unsigned index) const |
boost::shared_ptr< VesselNode< DIM > > | GetOppositeNode (boost::shared_ptr< VesselNode< DIM > > pInputNode) const |
std::pair< boost::shared_ptr< VesselNode< DIM > >, boost::shared_ptr< VesselNode< DIM > > > | GetNodes () const |
DimensionalChastePoint< DIM > | GetPointProjection (const DimensionalChastePoint< DIM > &location, bool projectToEnds=false) const |
c_vector< double, DIM > | GetUnitTangent () const |
boost::shared_ptr< Vessel< DIM > > | GetVessel () const |
bool | HasNode (boost::shared_ptr< VesselNode< DIM > > pNode) const |
bool | IsConnectedTo (boost::shared_ptr< VesselSegment< DIM > > pOtherSegment) const |
void | ReplaceNode (unsigned oldNodeIndex, boost::shared_ptr< VesselNode< DIM > > pNewNode) |
void | Remove () |
void | SetFlowProperties (const SegmentFlowProperties< DIM > &rFlowProperties) |
Public Member Functions inherited from AbstractVesselNetworkComponent< DIM > | |
AbstractVesselNetworkComponent () | |
virtual | ~AbstractVesselNetworkComponent () |
virtual unsigned | GetId () const |
virtual double | GetOutputDataValue (const std::string &rKey) |
virtual std::vector< std::string > | GetOutputDataKeys () |
virtual units::quantity< unit::length > | GetRadius () const |
virtual void | SetId (unsigned id) |
virtual void | SetOutputData (const std::string &rKey, double value) |
virtual void | SetRadius (units::quantity< unit::length > radius) |
Static Public Member Functions | |
static boost::shared_ptr< VesselSegment< DIM > > | Create (boost::shared_ptr< VesselNode< DIM > > pNode1, boost::shared_ptr< VesselNode< DIM > > pNode2) |
static boost::shared_ptr< VesselSegment< DIM > > | Create (boost::shared_ptr< VesselSegment< DIM > > pSegment) |
Private Member Functions | |
VesselSegment (boost::shared_ptr< VesselNode< DIM > > pNode1, boost::shared_ptr< VesselNode< DIM > > pNode2) | |
boost::shared_ptr< VesselSegment< DIM > > | Shared () |
void | AddVessel (boost::shared_ptr< Vessel< DIM > > pVessel) |
void | RemoveVessel () |
Private Attributes | |
std::pair< boost::shared_ptr< VesselNode< DIM > >, boost::shared_ptr< VesselNode< DIM > > > | mNodes |
boost::weak_ptr< Vessel< DIM > > | mVessel |
boost::shared_ptr< SegmentFlowProperties< DIM > > | mpFlowProperties |
Friends | |
class | Vessel< DIM > |
Additional Inherited Members | |
Protected Attributes inherited from AbstractVesselNetworkComponent< DIM > | |
std::map< std::string, double > | mOutputData |
unsigned | mId |
units::quantity< unit::length > | mRadius |
Forward declaration to allow segments to manage adding and removing themselves from nodes.
This is a class for vessel segments. They are components of a vessel network. Vessel segments are straight sub-units of vessels, defined by the positions of their end nodes. Nodes cannot be created by the vessel segment class, they are instead managed by the VesselNetwork class. Segments must always have two nodes.
Definition at line 56 of file VesselNode.hpp.
|
private |
Constructor - This is private as instances of this class must be created with a corresponding shared pointer. This is implemented using the static Create method.
pNode1 | the first node in the segment |
pNode2 | the second node in the segment |
Definition at line 44 of file VesselSegment.cpp.
VesselSegment< DIM >::VesselSegment | ( | const VesselSegment< DIM > & | rSegment | ) |
Copy Constructor - This should not be used directly as instances of this class must be created with a corresponding shared pointer. This is implemented using the static Create method. This class can not be made private.
rSegment | the segment to be copied |
Definition at line 53 of file VesselSegment.cpp.
References VesselSegment< DIM >::GetFlowProperties(), and VesselSegment< DIM >::SetFlowProperties().
|
private |
Add an adjoining Vessel to the segment.
pVessel | a vessel to be added to the segment |
Definition at line 100 of file VesselSegment.cpp.
References VesselSegment< DIM >::mVessel.
void VesselSegment< DIM >::CopyDataFromExistingSegment | ( | const boost::shared_ptr< VesselSegment< DIM > > | pTargetSegment | ) |
Copy a selection of member data and VasculatureData from the input segment. Convenient alternative to the copy constructor as nodes aren't copied.
pTargetSegment | the segment from which data is to be copied |
Definition at line 106 of file VesselSegment.cpp.
References AbstractVesselNetworkComponent< DIM >::mOutputData, VesselSegment< DIM >::SetFlowProperties(), and AbstractVesselNetworkComponent< DIM >::SetRadius().
Referenced by Vessel< DIM >::DivideSegment().
|
static |
Construct a new instance of the class and return a shared pointer to it. Also manage the association of segments to nodes by passing self weak pointers to the nodes.
pNode1 | the first node in the segment |
pNode2 | the second node in the segment |
Definition at line 63 of file VesselSegment.cpp.
Referenced by Vessel< DIM >::DivideSegment(), VesselNetwork< DIM >::ExtendVessel(), VesselNetwork< DIM >::FormSprout(), VesselNetworkReader< DIM >::Read(), and VesselNetwork< DIM >::VesselCrossesLineSegment().
|
static |
Construct a new instance of the class and return a shared pointer to it. Also manage the association of segments to nodes by passing self weak pointers to the nodes.
pSegment | the segment to be copied |
Definition at line 80 of file VesselSegment.cpp.
units::quantity< unit::length > VesselSegment< DIM >::GetDistance | ( | const DimensionalChastePoint< DIM > & | location | ) | const |
Return the distance between the input point and the segment. If the projection of the point is within the segment the distance is the perpendicular distance to the segment. Otherwise it is the distance to the nearest node.
location | the point the get the distance from |
Definition at line 114 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes.
boost::shared_ptr< SegmentFlowProperties< DIM > > VesselSegment< DIM >::GetFlowProperties | ( | ) | const |
Return the flow properties of the component
Definition at line 120 of file VesselSegment.cpp.
References VesselSegment< DIM >::mpFlowProperties.
Referenced by VesselSegment< DIM >::VesselSegment().
units::quantity< unit::length > VesselSegment< DIM >::GetLength | ( | ) | const |
Return the dimensional length
Definition at line 126 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes.
DimensionalChastePoint< DIM > VesselSegment< DIM >::GetMidPoint | ( | ) | const |
Return a point mid-way along the vessel segment
Definition at line 143 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes.
boost::shared_ptr< VesselNode< DIM > > VesselSegment< DIM >::GetNode | ( | unsigned | index | ) | const |
Return a pointer to the node specified by the index
index | the node index |
Definition at line 149 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes.
Referenced by VesselSegment< DIM >::HasNode(), and VesselSegment< DIM >::IsConnectedTo().
std::pair< boost::shared_ptr< VesselNode< DIM > >, boost::shared_ptr< VesselNode< DIM > > > VesselSegment< DIM >::GetNodes | ( | ) | const |
Return the segment nodes as a pair
Definition at line 183 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes.
boost::shared_ptr< VesselNode< DIM > > VesselSegment< DIM >::GetOppositeNode | ( | boost::shared_ptr< VesselNode< DIM > > | pInputNode | ) | const |
Return a pointer to the node on the other side of the segment
pInputNode | the node to get the opposite one to |
Definition at line 166 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes.
|
virtual |
Return the segment data.
Implements AbstractVesselNetworkComponent< DIM >.
Definition at line 132 of file VesselSegment.cpp.
References AbstractVesselNetworkComponent< DIM >::GetId(), AbstractVesselNetworkComponent< DIM >::GetRadius(), AbstractVesselNetworkComponent< DIM >::mOutputData, and VesselSegment< DIM >::mpFlowProperties.
DimensionalChastePoint< DIM > VesselSegment< DIM >::GetPointProjection | ( | const DimensionalChastePoint< DIM > & | location, |
bool | projectToEnds = false |
||
) | const |
Return the projection of a point onto the segment. If the projection is outside the segment an Exception is thrown.
location | the location to be projected |
projectToEnds | use end projection |
Definition at line 189 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes.
c_vector< double, DIM > VesselSegment< DIM >::GetUnitTangent | ( | ) | const |
Return a unit vector pointing along the segment. The orientation along the segment is from node0 to node 1.
Definition at line 195 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes.
boost::shared_ptr< Vessel< DIM > > VesselSegment< DIM >::GetVessel | ( | ) | const |
Return a pointer to the vessel.
Definition at line 201 of file VesselSegment.cpp.
References VesselSegment< DIM >::mVessel.
bool VesselSegment< DIM >::HasNode | ( | boost::shared_ptr< VesselNode< DIM > > | pNode | ) | const |
Return whether the node is in the segment.
pNode | the query node |
Definition at line 214 of file VesselSegment.cpp.
References VesselSegment< DIM >::GetNode().
bool VesselSegment< DIM >::IsConnectedTo | ( | boost::shared_ptr< VesselSegment< DIM > > | pOtherSegment | ) | const |
Return whether the segment is connected to another segment.
pOtherSegment | the segment to check connectivity with |
Definition at line 220 of file VesselSegment.cpp.
References VesselSegment< DIM >::GetNode().
void VesselSegment< DIM >::Remove | ( | ) |
Remove the segment from its nodes.
Definition at line 239 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes, VesselSegment< DIM >::RemoveVessel(), and VesselSegment< DIM >::Shared().
|
private |
Remove an adjoining vessel from the segment.
Definition at line 233 of file VesselSegment.cpp.
References VesselSegment< DIM >::mVessel.
Referenced by VesselSegment< DIM >::Remove().
void VesselSegment< DIM >::ReplaceNode | ( | unsigned | oldNodeIndex, |
boost::shared_ptr< VesselNode< DIM > > | pNewNode | ||
) |
Replace the node at the specified index with the passed in node.
oldNodeIndex | the index of the node to be replaced |
pNewNode | the node to be added to the segment |
Definition at line 247 of file VesselSegment.cpp.
References VesselSegment< DIM >::mNodes, VesselSegment< DIM >::mVessel, and VesselSegment< DIM >::Shared().
void VesselSegment< DIM >::SetFlowProperties | ( | const SegmentFlowProperties< DIM > & | rFlowProperties | ) |
Set the flow properties of the segment
rFlowProperties | the flow properties to be set |
Definition at line 273 of file VesselSegment.cpp.
References VesselSegment< DIM >::mpFlowProperties.
Referenced by VesselSegment< DIM >::CopyDataFromExistingSegment(), and VesselSegment< DIM >::VesselSegment().
|
private |
Return a boost::shared_ptr to this object
Definition at line 279 of file VesselSegment.cpp.
Referenced by VesselSegment< DIM >::Remove(), and VesselSegment< DIM >::ReplaceNode().
|
friend |
Allow vessels to manage adding and removing themselves from segments.
Definition at line 67 of file VesselSegment.hpp.
|
private |
Container for segment nodes
Definition at line 74 of file VesselSegment.hpp.
Referenced by VesselSegment< DIM >::GetDistance(), VesselSegment< DIM >::GetLength(), VesselSegment< DIM >::GetMidPoint(), VesselSegment< DIM >::GetNode(), VesselSegment< DIM >::GetNodes(), VesselSegment< DIM >::GetOppositeNode(), VesselSegment< DIM >::GetPointProjection(), VesselSegment< DIM >::GetUnitTangent(), VesselSegment< DIM >::Remove(), and VesselSegment< DIM >::ReplaceNode().
|
private |
A flow property collection for the segment
Definition at line 84 of file VesselSegment.hpp.
Referenced by VesselSegment< DIM >::GetFlowProperties(), VesselSegment< DIM >::GetOutputData(), and VesselSegment< DIM >::SetFlowProperties().
|
private |
Weak pointer to the vessel owning this segment
Definition at line 79 of file VesselSegment.hpp.
Referenced by VesselSegment< DIM >::AddVessel(), VesselSegment< DIM >::GetVessel(), VesselSegment< DIM >::RemoveVessel(), and VesselSegment< DIM >::ReplaceNode().