19 #ifndef _MITK_ConnectomicsNetwork_H
20 #define _MITK_ConnectomicsNetwork_H
22 #include <MitkConnectomicsExports.h>
27 #include <boost/graph/adjacency_list.hpp>
77 typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, NetworkNode, NetworkEdge >
NetworkType;
82 virtual void UpdateOutputInformation()
override;
83 virtual void SetRequestedRegionToLargestPossibleRegion()
override;
84 virtual bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
85 virtual bool VerifyRequestedRegion()
override;
86 virtual void SetRequestedRegion(
const itk::DataObject * )
override;
91 itkFactorylessNewMacro(
Self)
96 bool EdgeExists( VertexDescriptorType vertexA, VertexDescriptorType vertexB ) const;
99 void IncreaseEdgeWeight( VertexDescriptorType vertexA, VertexDescriptorType vertexB );
102 void AddEdge( VertexDescriptorType vertexA, VertexDescriptorType vertexB);
105 void AddEdge( VertexDescriptorType vertexA, VertexDescriptorType vertexB,
int sourceID,
int targetID,
int weight = 1,
double edge_weight = 1.0 );
108 VertexDescriptorType AddVertex(
int id);
111 void SetLabel( VertexDescriptorType vertex,
std::
string inLabel );
114 void SetCoordinates( VertexDescriptorType vertex,
std::vector<
float > inCoordinates );
120 NetworkNode GetNode( VertexDescriptorType vertex ) const;
123 NetworkEdge GetEdge( VertexDescriptorType vertexA, VertexDescriptorType vertexB ) const;
129 std::vector< VertexDescriptorType > GetVectorOfAllVertexDescriptors() const;
132 std::vector< VertexDescriptorType > GetVectorOfAdjacentNodes( VertexDescriptorType vertex ) const;
138 int GetNumberOfVertices() const;
141 int GetNumberOfEdges() const;
144 int GetNumberOfSelfLoops();
147 double GetAverageDegree();
150 double GetConnectionDensity();
153 int GetMaximumWeight() const;
156 std::vector<
int > GetDegreeOfNodes( ) const;
159 int GetMaximumDegree() const;
162 std::vector<
double > GetLocalClusteringCoefficients( ) const;
165 std::vector<
double > GetClusteringCoefficientsByDegree( );
168 double GetGlobalClusteringCoefficient( );
171 std::vector<
double > GetNodeBetweennessVector() const;
174 std::vector<
double > GetEdgeBetweennessVector() const;
177 bool CheckForLabel(
std::
string targetLabel ) const;
180 std::vector<
double > GetShortestDistanceVectorFromLabel(
std::
string targetLabel ) const;
183 NetworkType* GetBoostGraph();
186 void SetBoostGraph( NetworkType* newGraph );
191 bool GetIsModified() const;
194 void SetIsModified(
bool );
197 void UpdateBounds( );
200 void PruneUnconnectedSingleNodes();
211 virtual ~ConnectomicsNetwork();
213 NetworkType m_Network;
234 MITKCONNECTOMICS_EXPORT
bool Equal(
mitk::ConnectomicsNetwork* leftHandSide,
mitk::ConnectomicsNetwork* rightHandSide,
mitk::
ScalarType eps,
bool verbose);
Base of all data objects.
DataCollection - Class to facilitate loading/accessing structured data.
boost::graph_traits< NetworkType >::edge_descriptor EdgeDescriptorType
std::vector< float > coordinates
#define mitkClassMacro(className, SuperClassName)
boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, NetworkNode, NetworkEdge > NetworkType
boost::graph_traits< NetworkType >::vertex_descriptor VertexDescriptorType
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
MITKCORE_EXPORT const ScalarType eps
Connectomics Network Class.