13#ifndef ML_GRAPH_ANALYSER_H 
   14#define ML_GRAPH_ANALYSER_H 
   30#ifndef VESSELGRAPH_USE_MPIF 
   88#ifndef VESSELGRAPH_USE_MPIF 
 
  208                           std::vector<VesselEdge *>::iterator 
iEnd,
 
  250                                   std::vector<VesselEdge *> *
pvEdges, 
 
  262                                   std::vector<VesselEdge *> *
pvEdges, 
 
  297#ifndef VESSELGRAPH_USE_MPIF 
  303    { sumupST_Value (&VesselNode::getDrainVolume, &VesselNode::setDrainVolume, 
bIgnoreOrientation); }
 
 
 
  496          _actComperator = &compareEdges::compareLength;
 
  499          _actComperator = &compareEdges::compareVolume;
 
  502          _actComperator = &compareEdges::compareSTVolume;
 
  505          _actComperator = &compareEdges::compareSTCenterX;
 
  508          _actComperator = &compareEdges::compareSTCenterY;
 
  511          _actComperator = &compareEdges::compareSTCenterZ;
 
  514          _actComperator = &compareEdges::compareSTCenterPlane;
 
  518          _actComperator = &compareEdges::compareLabel;
 
 
  524      { 
return (this->*_actComperator)(
pE1, 
pE2); }
 
 
  529    Vector3 _planeNormal;
 
 
  566          if(_pData != 
nullptr){
 
  568              *( 
reinterpret_cast<long *
>((*pData)[
OUTDATA_ROOT])) = 0;
 
  570              _actMeasure = &NodeAnalyser::suggestRoot;
 
  573            _actMeasure = &NodeAnalyser::doNothing;
 
  576#ifndef VESSELGRAPH_USE_MPIF 
  578          if(_pData != 
nullptr){
 
  580              _actMeasure = &NodeAnalyser::setClusterLabel;
 
  583            _actMeasure = &NodeAnalyser::doNothing;
 
  588          _actMeasure = &NodeAnalyser::doNothing;
 
 
  614#ifndef VESSELGRAPH_USE_MPIF 
 
  652        ProcessFkt      oProcess = &measureSkeletonAgent::doNothing; 
 
  653        void            *pResult = 
nullptr;         
 
  657    friend class Process;
 
  660    typedef std::map<NProcessMode, Process>::iterator IProcess;
 
  676        _MProcess.erase(_MProcess.begin(), _MProcess.end());
 
  678        if(_pData != 
nullptr){
 
  684              _pScale = 
static_cast<Vector3 *
>((*_pData)[
DATA_SCL]);
 
  685              oProcess.oProcess = &measureSkeletonAgent::ProcessL1Scale;
 
  688              oProcess.oProcess =&measureSkeletonAgent::ProcessL1;
 
  697            oProcess.oProcess = &measureSkeletonAgent::ProcessV1;
 
  705            oProcess.oProcess = &measureSkeletonAgent::ProcessP1;
 
  713            oProcess.oProcess = &measureSkeletonAgent::ProcessD1;
 
 
  779    std::map<NProcessMode, Process> _MProcess;
 
  786    std::list<Vector3>  _LPoints;
 
  788    std::list<Vector3>::iterator IBack;
 
  790    std::list<Vector3>::iterator IMiddle;
 
  792    std::list<Vector3>::iterator IFront;
 
 
EdgeAnalyser(long NMode, DataMap *pData=nullptr)
constructor: connect operator() to the requested functionality
 
VesselNode * suggestRoot(float fSignificanceLevel=0.7f, int nPreferedDirection=0)
Search for root-node: look for leaf with thick edge seated remote from the barycenter of the Graph.
 
VesselNode * getParent(VesselEdge *pE1, VesselEdge *pE2)
 
void tansferLabelsInverse(void)
transfer skeleton labels to vessel edge label (take label of most frequent skeleton)
 
void searchSubTreeSeparation(VesselNode *pRoot, const Vector3 &separationDirection, std::vector< VesselEdge * > &vClassifiedEdges)
 
Vector3 measureBarycenter()
Get barycenter position of all the Graph.
 
void measureSkeletonArea(int nAvLength=5)
measure floating average of SkeletonArea and set area property
 
void measureST_Volume(bool bIgnoreOrientation=false)
Get the euclidean volume of all graph edges connected with given root, nodes cumulate them according ...
 
void sumupST_Value(VesselNode::NodeGetFkt getFkt, VesselNode::NodeSetFkt setFkt, bool bIgnoreOrientation=false)
 
bool calcPositionFromNodeBase(std::vector< CIdxFloat > vBase, Vector3 *pvResult)
Calculate spatial vector position form relative node coordinates.
 
bool calcDistanceMatrix(MatrixTemplate< double > &dm, std::vector< int > &vId, int nMaxNodes)
Calculate Distance Matrix for rooted Graph, taking hierarchy into account: dm(n1, n2) := minimal dist...
 
void searchMaxSubTrees(std::vector< VesselEdge * > vStartEdges, unsigned int nNum, std::vector< VesselEdge * > *pvMaxEdges, float *pfActValue, float *pfActSum)
calculate set of edges representing nNum subtrees maximizing selected feature stored in label propert...
 
void searchMaxSubTrees(std::vector< VesselEdge * >::iterator iBegin, std::vector< VesselEdge * >::iterator iEnd, int nNum, std::vector< VesselEdge * > *pvMaxEdges, float *pfActValue, float *pfActSum)
calculate set of edges representing nNum subtrees maximizing selected feature stored in label propert...
 
void collectLeafs(VesselNode *pRoot, std::vector< VesselNode * > &pLeafs)
Collect all leafs which are children of node pRoot and append them to pLeafs.
 
double calcSpannedVolume(const std::vector< int > &vId)
Calculate Volume of minimal cube including all supplied nodes.
 
void measureVolume()
Get the euclidean volume of all graph edges and set edge 'Volume' property in the Graph.
 
void sumupST_DrainVolume(bool bIgnoreOrientation=false)
cumulate DrainVolumes given at the leafs
 
void searchMaxSubTrees(std::vector< VesselEdge * > vStartEdges, int nPos, unsigned int nNum, std::vector< VesselEdge * > *pvMaxEdges, float *pfActValue, float *pfActSum)
calculate set of edges representing nNum subtrees maximizing selected feature stored in label propert...
 
float measureAvMinDistance()
Get the average minimal distance over all skeletons of an edge and set edge 'averageMinDistance' prop...
 
short sampleConnectedCluster()
identify connected subgraph return value is number of identified cluster
 
void tansferLabels(Skeleton::LABELTYPE NType, float fThresh=0.1f)
transfer Vessel-Edge labels to Skeleton
 
GraphAnalyser(Graph *pGraph)
constructor: provide pointer pGraph for easy access to Graph object
 
void measureLength()
Get the euclidean length of all graph edges and set edge 'Length' property in the Graph.
 
bool calcNodeBaseFromPosition(const Vector3 &vPosition, const std::vector< int > &vId, std::vector< CIdxFloat > *pvResult)
Calculate representation of spatial position in node coordinates.
 
void measureST_Barycenter(bool bIgnoreOrientation=false)
Get the euclidean volume of all graph edges connected with given root, nodes cumulate them according ...
 
void searchST_MajorBifurcation(VesselEdge *pStartEdge, float fMinorLimitStart, float fMinorLimitStep, int nMinorLimitNumber, std::vector< VesselEdge * > *pvEdges, bool bClear=true)
search for first major bifurcation following main edge starting with pStartEdge, use label property t...
 
const VesselNode * getParent(const VesselEdge *pE1, const VesselEdge *pE2) const
 
void scanSkeletonLabelMinMax(float *min, float *max)
evaluate min/max value of skeleton labels
 
void measureMaxPathValue(VesselNode *pRootNode, VesselEdge::EdgeGetFkt edgeGetFkt, VesselNode::NodeGetFkt nodeGetFkt, VesselNode::NodeSetFkt nodeSetFkt)
For each node calculate the maximum sum of edge values in a single path below this node....
 
void searchST_MajorBifurcation(VesselEdge *pStartEdge, float fMinorLimit, std::vector< VesselEdge * > *pvEdges, bool bClear=true)
search for first major bifurcation following main edge starting with pStartEdge, use label property t...
 
const VesselNode * getParent(const VesselNode *pN1, const VesselNode *pN2) const
get pointer to common parent if exists or NULL
 
VesselNode * getParent(VesselNode *pN1, VesselNode *pN2)
 
bool calcNodeClassifikator(CDoubleArray *pArAssoc, std::vector< int > *pvId, int nMaxNodes)
stack Node classificators in (*pArAssoc) (n1,n1): classificators based on single Node n1 respect to g...
 
Defines the basic Graph class which holds sets of nodes, edges and roots to model tubular structures ...
 
NodeAnalyser(long NMode, DataMap *pData=nullptr)
constructor: connect operator() to the requested functionality
 
Skeleton objects represent centerline voxels stored in a VesselEdge object.
 
double(VesselEdge::* EdgeGetFkt)(void) const
object bound function pointer: position of function relative to (individual) object base
 
VesselNode is derived from GraphNode, hence it can be stored as node item in a class Graph object.
 
void(VesselNode::* NodeSetFkt)(const MLdouble &)
function to set double parameter value
 
MLdouble(VesselNode::* NodeGetFkt)() const
object bound function pointer: position of function relative to (individual) object base
 
int operator()(const VesselEdge *pE1, const VesselEdge *pE2) const
 
compareEdges(CMP_FEATURE NFeature, Vector3 planeNormal=Vector3(0))
constructor: connect operator() to the requested functionality
 
— Class measureSkeletonAgent
 
friend class Process
allow functor access to all internal stuff
 
void operator()(const Skeleton &oSkeleton)
add Skeleton successive
 
measureSkeletonAgent(int nMode, DataMap *pData=nullptr)
constructor: connect operator() to start functionality and initialize parameter for accumulation of p...
 
T dot(const FloatingPointVector< T, size, DataContainer > &buffer) const
Returns the dot product, i.e., sum of all components multiplied with corresponding components of buff...
 
std::map< NData, void * > DataMap
 
NProcessMode
Flags for processing instructions and control of used functionalty.
 
NData
data structure for passing informations down the processing pipe
 
@ OUTDATA_GLOBAL_MIN_DIST
 
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
 
#define VESSELGRAPH_END_NAMESPACE
 
#define VESSELGRAPH_EXPORT
Definiert systemspezifische Macros, die f"ur diese DLL gelten sollen.
 
#define VESSELGRAPH_BEGIN_NAMESPACE
 
Tvec3< MLdouble > Vector3
A vector with three components of type double.
 
CIdxFloat(const CIdxFloat &oIF)
 
CIdxFloat(int nIdx=0, float fValue=0.0)
 
bool operator<(const CIdxFloat &oIF) const
 
bool operator>(const CIdxFloat &oIF) const
supply comparison operator to induce an order for assistance of non-abiguous sequences
 
CIdxFloat & operator=(const CIdxFloat &oIF)
 
bool operator==(const CIdxFloat &oIF) const
 
bool operator<(const CIdxIdx &oII) const
supply comparison operator to induce an order for assistance of non-abiguous sequences
 
CIdxIdx(const CIdxIdx &oII)
 
CIdxIdx & operator=(const CIdxIdx &oII)
 
bool operator==(const CIdxIdx &oII) const