Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::ConnectomicsBetweennessHistogram Class Reference

A class to calculate and store the betweenness of each node. More...

#include <mitkConnectomicsBetweennessHistogram.h>

Inheritance diagram for mitk::ConnectomicsBetweennessHistogram:
Collaboration diagram for mitk::ConnectomicsBetweennessHistogram:

Public Types

enum  BetweennessCalculationMode { UnweightedUndirectedMode, WeightedUndirectedMode }
 

Public Member Functions

 ConnectomicsBetweennessHistogram ()
 
virtual ~ConnectomicsBetweennessHistogram ()
 
void SetBetweennessCalculationMode (const BetweennessCalculationMode &)
 
BetweennessCalculationMode GetBetweennessCalculationMode ()
 
- Public Member Functions inherited from mitk::ConnectomicsHistogramBase
 ConnectomicsHistogramBase ()
 
virtual ~ConnectomicsHistogramBase ()
 
virtual double GetYMin () const
 Returns the minimal y=f(x) value of the histogram. More...
 
virtual double GetYMax () const
 Returns the maximum y=f(x) value of the histogram. More...
 
virtual double GetXMin () const
 Returns the minimal x value of the histogram. More...
 
virtual double GetXMax () const
 Returns the maximum x value of the histogram. More...
 
virtual int GetRange () const
 Returns the range of the histogram. More...
 
virtual void UpdateYMax ()
 Update the Y maximum to the maximal value in the histogram. More...
 
virtual void ComputeFromBaseData (BaseData *source) override
 Creates a new histogram from the source. More...
 
virtual void PrintToConsole () const
 Print values to console. More...
 
virtual bool IsValid () const
 Returns whether the histogram can be considered valid. More...
 
virtual std::string GetSubject () const
 Returns the subject of the histogram as a string. More...
 
virtual void SetSubject (std::string)
 Set the subject of the histogram as a string. More...
 
virtual float GetRelativeBin (double start, double end) const override
 Get bin height for the bin between start and end. More...
 
virtual std::vector< double > GetHistogramVector ()
 Get the double vector. More...
 

Protected Types

typedef mitk::ConnectomicsNetwork::NetworkType NetworkType
 
typedef boost::graph_traits< NetworkType >::vertex_iterator IteratorType
 
typedef std::vector< double > BCMapType
 

Protected Member Functions

virtual void ComputeFromConnectomicsNetwork (ConnectomicsNetwork *source) override
 Creates a new histogram from the network source. More...
 
void CalculateUnweightedUndirectedBetweennessCentrality (NetworkType *, IteratorType, IteratorType)
 
void CalculateWeightedUndirectedBetweennessCentrality (NetworkType *, IteratorType, IteratorType)
 
void ConvertCentralityMapToHistogram ()
 
- Protected Member Functions inherited from mitk::ConnectomicsHistogramBase
virtual double GetMin () const override
 Legacy method, do no use. More...
 
virtual double GetMax () const override
 Legacy method, do no use. More...
 

Protected Attributes

BetweennessCalculationMode m_Mode
 
BCMapType m_CentralityMap
 
- Protected Attributes inherited from mitk::ConnectomicsHistogramBase
bool m_Valid
 Is this a valid histogram. More...
 
int m_BaselineValue
 Which is the baseline value for the histogram This value should be zero for all network histograms. More...
 
int m_TopValue
 Which is the top value for the histogram. More...
 
int m_StartValue
 Which is the starting x value for the histogram. More...
 
std::vector< double > m_HistogramVector
 We expect not continuous but discrete histograms. More...
 
std::string m_Subject
 Subject of the histogram as a string. More...
 

Detailed Description

A class to calculate and store the betweenness of each node.

Definition at line 30 of file mitkConnectomicsBetweennessHistogram.h.

Member Typedef Documentation

typedef std::vector< double > mitk::ConnectomicsBetweennessHistogram::BCMapType
protected

Definition at line 57 of file mitkConnectomicsBetweennessHistogram.h.

typedef boost::graph_traits< NetworkType >::vertex_iterator mitk::ConnectomicsBetweennessHistogram::IteratorType
protected

Definition at line 56 of file mitkConnectomicsBetweennessHistogram.h.

Member Enumeration Documentation

Enum for different ways to calculate betweenness centrality

Enumerator
UnweightedUndirectedMode 
WeightedUndirectedMode 

Definition at line 37 of file mitkConnectomicsBetweennessHistogram.h.

Constructor & Destructor Documentation

mitk::ConnectomicsBetweennessHistogram::ConnectomicsBetweennessHistogram ( )
mitk::ConnectomicsBetweennessHistogram::~ConnectomicsBetweennessHistogram ( )
virtual

Definition at line 31 of file mitkConnectomicsBetweennessHistogram.cpp.

Member Function Documentation

void mitk::ConnectomicsBetweennessHistogram::CalculateUnweightedUndirectedBetweennessCentrality ( NetworkType boostGraph,
IteratorType  ,
IteratorType   
)
protected

Calculate betweenness centrality ignoring the weight of the edges

Definition at line 71 of file mitkConnectomicsBetweennessHistogram.cpp.

References mitk::ConnectomicsNetwork::NetworkNode::id.

void mitk::ConnectomicsBetweennessHistogram::CalculateWeightedUndirectedBetweennessCentrality ( NetworkType ,
IteratorType  ,
IteratorType   
)
protected

Calculate betweenness centrality taking into consideration the weight of the edges

Definition at line 83 of file mitkConnectomicsBetweennessHistogram.cpp.

References mitk::ConnectomicsConstantsManager::CONNECTOMICS_WARNING_UNIMPLEMENTED_FEATURE, and MBI_WARN.

void mitk::ConnectomicsBetweennessHistogram::ComputeFromConnectomicsNetwork ( ConnectomicsNetwork source)
overrideprotectedvirtual

Creates a new histogram from the network source.

Implements mitk::ConnectomicsHistogramBase.

Definition at line 46 of file mitkConnectomicsBetweennessHistogram.cpp.

References mitk::ConnectomicsNetwork::GetBoostGraph(), and mitk::ConnectomicsNetwork::GetNumberOfVertices().

void mitk::ConnectomicsBetweennessHistogram::ConvertCentralityMapToHistogram ( )
protected

Converts the centrality map to a histogram by binning

Definition at line 89 of file mitkConnectomicsBetweennessHistogram.cpp.

References mitk::ConnectomicsConstantsManager::CONNECTOMICS_ERROR_OUTSIDE_INTEGER_RANGE, and MBI_WARN.

mitk::ConnectomicsBetweennessHistogram::BetweennessCalculationMode mitk::ConnectomicsBetweennessHistogram::GetBetweennessCalculationMode ( )

Get the calculation mode

Definition at line 41 of file mitkConnectomicsBetweennessHistogram.cpp.

void mitk::ConnectomicsBetweennessHistogram::SetBetweennessCalculationMode ( const BetweennessCalculationMode mode)

Set the calucaltion mode

Definition at line 35 of file mitkConnectomicsBetweennessHistogram.cpp.

Member Data Documentation

BCMapType mitk::ConnectomicsBetweennessHistogram::m_CentralityMap
protected

Stores the betweenness centralities for each node

Definition at line 75 of file mitkConnectomicsBetweennessHistogram.h.

BetweennessCalculationMode mitk::ConnectomicsBetweennessHistogram::m_Mode
protected

Stores which mode has been selected for betweenness centrality calculation

Definition at line 72 of file mitkConnectomicsBetweennessHistogram.h.


The documentation for this class was generated from the following files: