MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
#include <mdsAdjacencyGraph.h>
Classes | |
struct | SRegionInfo |
Class representing one row of the Region Adjacency Graph (RAG). More... | |
Public Types | |
enum | { CLASS_OBJECT } |
Templates that require members of the CObject class can use this enum to check the existence. More... | |
enum | { HEAP_OBJECT = 0x70616568 } |
Signature used to recognize objects on the heap. More... | |
typedef mds::base::CSTLIterator < typename SRegionInfo::tRow::const_iterator > | tConstIterator |
Const iterator used to traverse all region neighbours. | |
typedef T | tElement |
Type of the RAG element. | |
typedef mds::base::CSTLIterator < typename SRegionInfo::tRow::iterator > | tIterator |
Iterator used to traverse all region neighbours. | |
typedef std::vector< SRegionInfo > | tRAG |
Internal representation of the RAG. | |
Public Member Functions | |
CAdjacencyGraph (tSize NumOfRegions) | |
Default constructor. | |
void | clear (tSize i) |
Removes all elements of the RAG corresponding to given region index. | |
void | clear () |
Removes all elements from the RAG. | |
T | get (tSize i, tSize j, const T &DefaultValue) const |
Returns value of the subscripted element. | |
T | getMax (tSize &i, tSize &j, const T &DefaultValue) |
Returns value and region labels of the maximal RAG element. | |
T | getMin (tSize &i, tSize &j, const T &DefaultValue) |
Returns value and region labels of the minimal RAG element. | |
SRegionInfo::tRow & | getNeighbours (tSize i) |
Returns reference to the container of all neighbours of i-th region. | |
const SRegionInfo::tRow & | getNeighbours (tSize i) const |
tSize | getNumOfRegions () const |
Returns the total number of regions. | |
int | getReferencesCount () const |
Returns the number of references. | |
tSize | getRegion (const tIterator &it) |
Returns the element region. | |
tSize | getRegion (const tConstIterator &it) const |
T & | getValue (const tIterator &it) |
Returns element value. | |
const T & | getValue (const tConstIterator &it) const |
bool | isOnHeap () const |
Returns true if the object is allocated on the heap. | |
MDS_SHAREDPTR (CAdjacencyGraph) | |
Smart pointer type. | |
void | merge (tSize i, tSize j) |
Merges two specified regions. | |
void | set (tSize i, tSize j, const T &Value) |
Sets subscripted RAG element. | |
void | setNumOfRegions (tSize NumOfRegions) |
Sets number of regions in the RAG. | |
~CAdjacencyGraph () | |
Destructor. | |
Static Public Member Functions | |
static void * | operator new (std::size_t Size) |
Allocates a new object on the heap. | |
Protected Member Functions | |
void | addReference () const |
Increase the reference counter. | |
bool | delReference () const |
Decrease the reference counter. | |
void | findMinMax () |
Finds maximum and minimum value. | |
Protected Attributes | |
int | m_Flags |
Internal flags. | |
int | m_iHeapObject |
Flag initialized if the object is on the heap. | |
int | m_iReferences |
The number of references to the object. | |
T | m_Max |
Minimal and maximal value. | |
tSize | m_MaxIndex |
Index of the row where the maximum can be found. | |
T | m_Min |
tSize | m_MinIndex |
tRAG | m_RAG |
The RAG stored as a sparse matrix in std::map. |
typedef mds::base::CSTLIterator<typename SRegionInfo::tRow::const_iterator> mds::img::CAdjacencyGraph< T >::tConstIterator |
Const iterator used to traverse all region neighbours.
typedef T mds::img::CAdjacencyGraph< T >::tElement |
Type of the RAG element.
typedef mds::base::CSTLIterator<typename SRegionInfo::tRow::iterator> mds::img::CAdjacencyGraph< T >::tIterator |
Iterator used to traverse all region neighbours.
typedef std::vector<SRegionInfo> mds::img::CAdjacencyGraph< T >::tRAG |
Internal representation of the RAG.
anonymous enum [inherited] |
Templates that require members of the CObject class can use this enum to check the existence.
mds::img::CAdjacencyGraph< T >::CAdjacencyGraph | ( | tSize | NumOfRegions | ) |
Default constructor.
mds::img::CAdjacencyGraph< T >::~CAdjacencyGraph | ( | ) |
Destructor.
void mds::base::CObject::addReference | ( | ) | const [protected, inherited] |
Increase the reference counter.
void CAdjacencyGraph::clear | ( | tSize | i | ) |
Removes all elements of the RAG corresponding to given region index.
void CAdjacencyGraph::clear | ( | ) |
Removes all elements from the RAG.
bool mds::base::CObject::delReference | ( | ) | const [protected, inherited] |
Decrease the reference counter.
void CAdjacencyGraph::findMinMax | ( | ) | [protected] |
Finds maximum and minimum value.
T CAdjacencyGraph::get | ( | tSize | i, |
tSize | j, | ||
const T & | DefaultValue | ||
) | const |
Returns value of the subscripted element.
T CAdjacencyGraph::getMax | ( | tSize & | i, |
tSize & | j, | ||
const T & | DefaultValue | ||
) |
Returns value and region labels of the maximal RAG element.
T CAdjacencyGraph::getMin | ( | tSize & | i, |
tSize & | j, | ||
const T & | DefaultValue | ||
) |
Returns value and region labels of the minimal RAG element.
SRegionInfo::tRow& mds::img::CAdjacencyGraph< T >::getNeighbours | ( | tSize | i | ) |
Returns reference to the container of all neighbours of i-th region.
const SRegionInfo::tRow& mds::img::CAdjacencyGraph< T >::getNeighbours | ( | tSize | i | ) | const |
tSize mds::img::CAdjacencyGraph< T >::getNumOfRegions | ( | ) | const |
Returns the total number of regions.
int mds::base::CObject::getReferencesCount | ( | ) | const [inherited] |
Returns the number of references.
tSize mds::img::CAdjacencyGraph< T >::getRegion | ( | const tIterator & | it | ) |
Returns the element region.
tSize mds::img::CAdjacencyGraph< T >::getRegion | ( | const tConstIterator & | it | ) | const |
T& mds::img::CAdjacencyGraph< T >::getValue | ( | const tIterator & | it | ) |
Returns element value.
const T& mds::img::CAdjacencyGraph< T >::getValue | ( | const tConstIterator & | it | ) | const |
bool mds::base::CObject::isOnHeap | ( | ) | const [inherited] |
Returns true if the object is allocated on the heap.
mds::img::CAdjacencyGraph< T >::MDS_SHAREDPTR | ( | CAdjacencyGraph< T > | ) |
Smart pointer type.
void CAdjacencyGraph::merge | ( | tSize | i, |
tSize | j | ||
) |
Merges two specified regions.
Adds the first region having index i to the second region j.
static void* mds::base::CObject::operator new | ( | std::size_t | Size | ) | [static, inherited] |
Allocates a new object on the heap.
void CAdjacencyGraph::set | ( | tSize | i, |
tSize | j, | ||
const T & | Value | ||
) |
Sets subscripted RAG element.
void mds::img::CAdjacencyGraph< T >::setNumOfRegions | ( | tSize | NumOfRegions | ) |
Sets number of regions in the RAG.
int mds::img::CAdjacencyGraph< T >::m_Flags [protected] |
Internal flags.
int mds::base::CObject::m_iHeapObject [mutable, protected, inherited] |
Flag initialized if the object is on the heap.
int mds::base::CObject::m_iReferences [mutable, protected, inherited] |
The number of references to the object.
T mds::img::CAdjacencyGraph< T >::m_Max [protected] |
Minimal and maximal value.
tSize mds::img::CAdjacencyGraph< T >::m_MaxIndex [protected] |
Index of the row where the maximum can be found.
T mds::img::CAdjacencyGraph< T >::m_Min [protected] |
tSize mds::img::CAdjacencyGraph< T >::m_MinIndex [protected] |
tRAG mds::img::CAdjacencyGraph< T >::m_RAG [protected] |
The RAG stored as a sparse matrix in std::map.