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

A class to calculate and store the shortest path between each pair of nodes. More...

#include <mitkConnectomicsShortestPathHistogram.h>

Inheritance diagram for mitk::ConnectomicsShortestPathHistogram:
Collaboration diagram for mitk::ConnectomicsShortestPathHistogram:

Public Types

enum  ShortestPathCalculationMode { UnweightedUndirectedMode, WeightedUndirectedMode }
 

Public Member Functions

 ConnectomicsShortestPathHistogram ()
 
virtual ~ConnectomicsShortestPathHistogram ()
 
void SetShortestPathCalculationMode (const ShortestPathCalculationMode &)
 
ShortestPathCalculationMode GetShortestPathCalculationMode ()
 
double GetEfficiency ()
 
- 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_descriptor DescriptorType
 
typedef boost::graph_traits< NetworkType >::vertex_iterator IteratorType
 

Protected Member Functions

virtual void ComputeFromConnectomicsNetwork (ConnectomicsNetwork *source) override
 Creates a new histogram from the network source. More...
 
void CalculateUnweightedUndirectedShortestPaths (NetworkType *boostGraph)
 
void CalculateWeightedUndirectedShortestPaths (NetworkType *boostGraph)
 
void ConvertDistanceMapToHistogram ()
 
- 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

ShortestPathCalculationMode m_Mode
 
std::vector< std::vector< int > > m_DistanceMatrix
 
bool m_EverythingConnected
 
- 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 shortest path between each pair of nodes.

Definition at line 30 of file mitkConnectomicsShortestPathHistogram.h.

Member Typedef Documentation

typedef boost::graph_traits< NetworkType >::vertex_descriptor mitk::ConnectomicsShortestPathHistogram::DescriptorType
protected

Definition at line 59 of file mitkConnectomicsShortestPathHistogram.h.

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

Definition at line 60 of file mitkConnectomicsShortestPathHistogram.h.

Member Enumeration Documentation

Enum for different ways to calculate shortest paths

Enumerator
UnweightedUndirectedMode 
WeightedUndirectedMode 

Definition at line 36 of file mitkConnectomicsShortestPathHistogram.h.

Constructor & Destructor Documentation

mitk::ConnectomicsShortestPathHistogram::ConnectomicsShortestPathHistogram ( )
mitk::ConnectomicsShortestPathHistogram::~ConnectomicsShortestPathHistogram ( )
virtual

Definition at line 31 of file mitkConnectomicsShortestPathHistogram.cpp.

Member Function Documentation

void mitk::ConnectomicsShortestPathHistogram::CalculateUnweightedUndirectedShortestPaths ( NetworkType boostGraph)
protected

Calculate shortest paths ignoring the weight of the edges

Definition at line 67 of file mitkConnectomicsShortestPathHistogram.cpp.

References mitk::ConnectomicsNetwork::NetworkEdge::edge_weight.

void mitk::ConnectomicsShortestPathHistogram::CalculateWeightedUndirectedShortestPaths ( NetworkType boostGraph)
protected

Calculate shortest paths taking into consideration the weight of the edges

Definition at line 87 of file mitkConnectomicsShortestPathHistogram.cpp.

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

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

Creates a new histogram from the network source.

Implements mitk::ConnectomicsHistogramBase.

Definition at line 45 of file mitkConnectomicsShortestPathHistogram.cpp.

References mitk::ConnectomicsNetwork::GetBoostGraph().

void mitk::ConnectomicsShortestPathHistogram::ConvertDistanceMapToHistogram ( )
protected

Converts the distance map to a histogram

Definition at line 92 of file mitkConnectomicsShortestPathHistogram.cpp.

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

mitk::ConnectomicsShortestPathHistogram::ShortestPathCalculationMode mitk::ConnectomicsShortestPathHistogram::GetShortestPathCalculationMode ( )

Get the calculation mode

Definition at line 40 of file mitkConnectomicsShortestPathHistogram.cpp.

void mitk::ConnectomicsShortestPathHistogram::SetShortestPathCalculationMode ( const ShortestPathCalculationMode mode)

Set the calucaltion mode

Definition at line 35 of file mitkConnectomicsShortestPathHistogram.cpp.

Member Data Documentation

std::vector< std::vector< int > > mitk::ConnectomicsShortestPathHistogram::m_DistanceMatrix
protected

Stores the shortest paths between the nodes

Definition at line 78 of file mitkConnectomicsShortestPathHistogram.h.

bool mitk::ConnectomicsShortestPathHistogram::m_EverythingConnected
protected

Stores, whether the graph has disconnected components

Definition at line 81 of file mitkConnectomicsShortestPathHistogram.h.

ShortestPathCalculationMode mitk::ConnectomicsShortestPathHistogram::m_Mode
protected

Stores which mode has been selected for shortest path calculation

Definition at line 75 of file mitkConnectomicsShortestPathHistogram.h.


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