MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Public Attributes
mds::img::CAdjacencyGraph< T >::SRegionInfo Struct Reference

Class representing one row of the Region Adjacency Graph (RAG). More...

#include <mdsAdjacencyGraph.h>

List of all members.

Public Types

enum  EReturnCode { VALID = 0, CHANGED = 1 << 0, DIRTY = 1 << 1 }
 Status returned from the set() method. More...
typedef std::map< tSize, T > tRow
 Container of neighbouring regions.

Public Member Functions

void clear ()
 Removes all neighbours.
void findMinMax ()
 Finds maximum and minimum value.
get (tSize i, const T &DefaultValue) const
 Returns value of the subscripted element.
getMax (tSize &i, const T &DefaultValue)
 Returns value and index of the maximum.
getMin (tSize &i, const T &DefaultValue)
 Returns value and index of the minimum.
int insert (const SRegionInfo &Info)
 Inserts all neighbours in a given row.
int remove (tSize i)
 Removes a given neighbouring region.
int set (tSize i, const T &Value)
 Adds a new neighbouring region.
 SRegionInfo ()
 Default constructor.

Public Attributes

int m_Flags
 Internal flags.
tElement m_Max
 Maximum and minimum.
tSize m_MaxIndex
 Indexes of the regions.
tElement m_Min
tSize m_MinIndex
tRow m_Row
 All neighbouring regions.

Detailed Description

template<typename T>
struct mds::img::CAdjacencyGraph< T >::SRegionInfo

Class representing one row of the Region Adjacency Graph (RAG).


Member Typedef Documentation

template<typename T >
typedef std::map<tSize,T> mds::img::CAdjacencyGraph< T >::SRegionInfo::tRow

Container of neighbouring regions.


Member Enumeration Documentation

Status returned from the set() method.

Enumerator:
VALID 

Both values are still valid.

CHANGED 

Minimum/maximum has been decreased/increased.

DIRTY 

Minimum/maximum is invalid, the method findMinMax() must be called.


Constructor & Destructor Documentation

template<typename T >
CAdjacencyGraph::SRegionInfo::SRegionInfo ( )

Default constructor.


Member Function Documentation

template<typename T >
void CAdjacencyGraph::SRegionInfo::clear ( )

Removes all neighbours.

template<typename T >
void CAdjacencyGraph::SRegionInfo::findMinMax ( )

Finds maximum and minimum value.

template<typename T >
T CAdjacencyGraph::SRegionInfo::get ( tSize  i,
const T &  DefaultValue 
) const

Returns value of the subscripted element.

  • If the element was not found, the default value is returned.
template<typename T >
T CAdjacencyGraph::SRegionInfo::getMax ( tSize i,
const T &  DefaultValue 
)

Returns value and index of the maximum.

template<typename T >
T CAdjacencyGraph::SRegionInfo::getMin ( tSize i,
const T &  DefaultValue 
)

Returns value and index of the minimum.

template<typename T >
int CAdjacencyGraph::SRegionInfo::insert ( const SRegionInfo Info)

Inserts all neighbours in a given row.

  • Returns the status!
template<typename T >
int CAdjacencyGraph::SRegionInfo::remove ( tSize  i)

Removes a given neighbouring region.

  • Returns the status!
template<typename T >
int CAdjacencyGraph::SRegionInfo::set ( tSize  i,
const T &  Value 
)

Adds a new neighbouring region.

  • Returns the return code.

Member Data Documentation

template<typename T >
int mds::img::CAdjacencyGraph< T >::SRegionInfo::m_Flags

Internal flags.

Maximum and minimum.

Indexes of the regions.

template<typename T >
tRow mds::img::CAdjacencyGraph< T >::SRegionInfo::m_Row

All neighbouring regions.


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