Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::Adjacency Class Reference

Adjacency relation and forward iteratior related to a matrix. More...

#include <Adjacency.hpp>

Inheritance diagram for Bial::Adjacency:
Inheritance graph
Collaboration diagram for Bial::Adjacency:
Collaboration graph

Public Member Functions

 Adjacency ()
 Basic Constructor. More...
 
 Adjacency (size_t dims, size_t size)
 Basic Constructor. More...
 
 Adjacency (const Vector< size_t > &src_displacement, const Vector< size_t > &tgt_displacement)
 Basic Constructor. Build a n-dimensional box from src_displacement to tgt_displacement. More...
 
template<class D >
 Adjacency (const Matrix< D > &mat)
 Basic Constructor. Build an adjacency based on a matrix. Non-zero elements are set as adjacents a coefficients are matrix values. Adjacency centralized in dim / 2. More...
 
template<class D >
 Adjacency (const Image< D > &img)
 Basic Constructor. Build an adjacency based on an image. Non-zero elements are set as adjacents a coefficients are image values. Adjacency centralized in dim / 2. More...
 
 Adjacency (const Image< Color > &img)
 
float operator() (size_t elem, size_t dim) const
 Returns data pointed by index ( elem, dim ). More...
 
float & operator() (size_t elem, size_t dim)
 Returns the reference for data pointed by index ( elem, dim ). More...
 
Vector< size_t > operator() (const Vector< size_t > &dim, const Vector< size_t > &index, size_t adj_index) const
 Returns a vector containing the indexes of the adjacent element to the given source element in spa domain. If the adjacent element is out of the space bounds it returns a copy of dim vector. More...
 
size_t operator() (const Vector< size_t > &dim, size_t position, size_t adj_index) const
 Returns the global index of the element in space 'dim' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than matrix size is returned. More...
 
template<class D >
Vector< size_t > operator() (const Matrix< D > &mat, const Vector< size_t > &index, size_t adj_index) const
 Returns a Vector containing the indexes of the element in matrix 'mat' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than NULL is returned. More...
 
template<class D >
size_t operator() (const Matrix< D > &mat, size_t position, size_t adj_index) const
 Returns the global index of the element in matrix 'mat' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than matrix size is returned. More...
 
template<class D >
Vector< size_t > operator() (const Image< D > &img, const Vector< size_t > &index, size_t adj_index) const
 Returns a Vector containing the indexes of the element in image 'img' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than NULL is returned. More...
 
template<class D >
size_t operator() (const Image< D > &img, size_t position, size_t adj_index) const
 Returns the global index of the element in image 'img' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than image size is returned. More...
 
Vector< size_t > SortByDistance (bool increasing_order=true)
 Sort adjacency elements in increasing (or decreasing) order with respect to the distance from t reference element. More...
 
float Displacement (size_t elem, size_t dim) const
 Returns the displacement in dimention dim for adjacent elem. More...
 
size_t Dims () const
 Returns the number of dimensions of the adjacency relation. More...
 
size_t Size () const
 Returns the number of elements of the adjacency relation. More...
 
size_t size () const
 Same as Size( ). Just for coherence with Image.size( ). More...
 
Vector< size_t > Adj2 (const Vector< size_t > &dim, const Vector< size_t > &index, size_t adj_index) const
 Returns a Vector containing the first two indexes of the element in space 'dim' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than NULL is returned. More...
 
size_t Adj2 (const Vector< size_t > &dim, size_t position, size_t adj_index) const
 Returns the global index of the element in space 'dim' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than matrix size is returned. More...
 
template<class D >
Vector< size_t > Adj2 (const Matrix< D > &mat, const Vector< size_t > &index, size_t adj_index) const
 Returns a Vector containing the first two indexes of the element in matrix 'mat' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than NULL is returned. More...
 
template<class D >
size_t Adj2 (const Matrix< D > &mat, size_t position, size_t adj_index) const
 Returns the global index of the element in matrix 'mat' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than matrix size is returned. More...
 
template<class D >
Vector< size_t > Adj2 (const Image< D > &img, const Vector< size_t > &index, size_t adj_index) const
 Returns a Vector containing the first two indexes of the element in image 'img' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than NULL is returned. More...
 
template<class D >
size_t Adj2 (const Image< D > &img, size_t position, size_t adj_index) const
 Returns the global index of the element in image 'img' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than image size is returned. More...
 
Vector< size_t > Adj3 (const Vector< size_t > &dim, const Vector< size_t > &index, size_t adj_index) const
 Returns a Vector containing the first three indexes of the element in space 'dim' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than NULL is returned. More...
 
size_t Adj3 (const Vector< size_t > &dim, size_t position, size_t adj_index) const
 Returns the global index of the element in space 'dim' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than matrix size is returned. More...
 
template<class D >
Vector< size_t > Adj3 (const Matrix< D > &mat, const Vector< size_t > &index, size_t adj_index) const
 Returns a Vector containing the first three indexes of the element in matrix 'mat' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than NULL is returned. More...
 
template<class D >
size_t Adj3 (const Matrix< D > &mat, size_t position, size_t adj_index) const
 Returns the global index of the element in matrix 'mat' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than matrix size is returned. More...
 
template<class D >
Vector< size_t > Adj3 (const Image< D > &img, const Vector< size_t > &index, size_t adj_index) const
 Returns a Vector containing the first three indexes of the element in image 'img' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than NULL is returned. More...
 
template<class D >
size_t Adj3 (const Image< D > &img, size_t position, size_t adj_index) const
 Returns the global index of the element in image 'img' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than image size is returned. More...
 
template<class O >
O & PrintDimensions (O &os) const
 Prints adjacency relation dimensions to output stream os. More...
 
template<class O >
O & Print (O &os) const
 Prints adjacency to output stream os. More...
 

Protected Attributes

Matrix< float > relation
 2D matrix. First dimension refers to the number of dimensions of adjacency relation and the second dimension refers to the size of the adjacency relation, that is, the number of elements in it. Example: relation(dims, size) More...
 

Detailed Description

Adjacency relation and forward iteratior related to a matrix.

Definition at line 27 of file Adjacency.hpp.

Constructor & Destructor Documentation

Bial::Adjacency::Adjacency ( )

Basic Constructor.

Date
2012/Jul/06
Parameters
none
Returns
none.
Warning
Uninitialized adjacency is created.
Bial::Adjacency::Adjacency ( size_t  dims,
size_t  size 
)

Basic Constructor.

Date
2012/Jul/06
Parameters
dimsnumber of dimensions of the adjacency relation. Should be greater or equal to the image that will operate on.
sizenumber of elements of the adjacency relation.
Returns
none.
Warning
Uninitialized adjacency is created.
Bial::Adjacency::Adjacency ( const Vector< size_t > &  src_displacement,
const Vector< size_t > &  tgt_displacement 
)

Basic Constructor. Build a n-dimensional box from src_displacement to tgt_displacement.

Date
2014/Jan/19
Parameters
src_displacementsource displacement of the adjacency.
tgt_displacementtarget displacement of the adjacency.
Returns
non.
Warning
none.
template<class D >
Bial::Adjacency::Adjacency ( const Matrix< D > &  mat)

Basic Constructor. Build an adjacency based on a matrix. Non-zero elements are set as adjacents a coefficients are matrix values. Adjacency centralized in dim / 2.

Date
2013/Nov/19
Parameters
matA matrix.
Returns
none.
Warning
Uninitialized kernel is created.
template<class D >
Bial::Adjacency::Adjacency ( const Image< D > &  img)

Basic Constructor. Build an adjacency based on an image. Non-zero elements are set as adjacents a coefficients are image values. Adjacency centralized in dim / 2.

Date
2013/Nov/19
Parameters
imgAn image.
Returns
none.
Warning
Uninitialized kernel is created.
Bial::Adjacency::Adjacency ( const Image< Color > &  img)

Member Function Documentation

Vector< size_t > Bial::Adjacency::Adj2 ( const Vector< size_t > &  dim,
const Vector< size_t > &  index,
size_t  adj_index 
) const

Returns a Vector containing the first two indexes of the element in space 'dim' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than NULL is returned.

Date
2013/Oct/23
Parameters
dimDimensions of the space where the element should be defined.
indexThe indexes of the source element.
adj_indexAdjacency relation index in the displacement dimensions.
Returns
A Vector containing the first two indexes of the element in space 'dim' that is adjacent to elem 'index' with respect to index 'adj_index'.
Warning
'this' adjacency relation, the index vector, and the space 'dim' must have the same number of dimensions. No validation is done.
size_t Bial::Adjacency::Adj2 ( const Vector< size_t > &  dim,
size_t  position,
size_t  adj_index 
) const

Returns the global index of the element in space 'dim' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than matrix size is returned.

Date
2013/Oct/23
Parameters
dimDimensions of the space where the element should be defined.
positionThe global position of the source element.
adj_indexAdjacency relation index in the displacement dimensions.
Returns
The global index of the element in space 'dim' that is adjacent to element 'position' with respect to index 'adj_index'.
Warning
Input space must have two dimentions, and 'this' adjacency relation and the space 'dim' must have the same number of dimensions. No validation is done.
template<class D >
Vector< size_t > Bial::Adjacency::Adj2 ( const Matrix< D > &  mat,
const Vector< size_t > &  index,
size_t  adj_index 
) const

Returns a Vector containing the first two indexes of the element in matrix 'mat' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than NULL is returned.

Date
2012/Jul/13
Parameters
matThe matrix where the adjacent element should be defined.
indexThe indexes of the source element.
adj_indexAdjacency relation index in the displacement matrix.
Returns
A Vector containing the first two indexes of the element in matrix 'mat' that is adjacent to element 'index' with respect to index 'adj_index'.
Warning
'this' adjacency relation, the index vector, and the matrix 'mat' must have the same number of dimensions. No validation is done.
template<class D >
size_t Bial::Adjacency::Adj2 ( const Matrix< D > &  mat,
size_t  position,
size_t  adj_index 
) const

Returns the global index of the element in matrix 'mat' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than matrix size is returned.

Date
2012/Jul/13
Parameters
matThe matrix where the adjacent element should be defined.
positionThe global position of the source element.
adj_indexAdjacency relation index in the displacement matrix.
Returns
The global index of the element in matrix 'mat' that is adjacent to element 'position' with respect to index 'adj_index'.
Warning
Input matrix must have two dimentions, and 'this' adjacency relation and the matrix 'mat' must have the same number of dimensions. No validation is done.
template<class D >
Vector< size_t > Bial::Adjacency::Adj2 ( const Image< D > &  img,
const Vector< size_t > &  index,
size_t  adj_index 
) const

Returns a Vector containing the first two indexes of the element in image 'img' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than NULL is returned.

Date
2014/Apr/14
Parameters
imgThe image where the adjacent element should be defined.
indexThe indexes of the source element.
adj_indexAdjacency relation index in the displacement image.
Returns
A Vector containing the first two indexes of the element in image 'img' that is adjacent to element 'index' with respect to index 'adj_index'.
Warning
'this' adjacency relation, the index vector, and the image 'img' must have the same number of dimensions. No validation is done.
template<class D >
size_t Bial::Adjacency::Adj2 ( const Image< D > &  img,
size_t  position,
size_t  adj_index 
) const

Returns the global index of the element in image 'img' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than image size is returned.

Date
2014/Apr/14
Parameters
imgThe image where the adjacent element should be defined.
positionThe global position of the source element.
adj_indexAdjacency relation index in the displacement image.
Returns
The global index of the element in image 'img' that is adjacent to element 'position' with respect to index 'adj_index'.
Warning
Input image must have two dimentions, and 'this' adjacency relation and the image 'img' must have the same number of dimensions. No validation is done.
Vector< size_t > Bial::Adjacency::Adj3 ( const Vector< size_t > &  dim,
const Vector< size_t > &  index,
size_t  adj_index 
) const

Returns a Vector containing the first three indexes of the element in space 'dim' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than NULL is returned.

Date
2013/Oct/23
Parameters
dimDimensions of the space where the element should be defined.
indexThe indexes of the source element.
adj_indexAdjacency relation index in the displacement dimensions.
Returns
A Vector containing the first three indexes of the element in space 'dim' that is adjacent to element 'index' with respect to index 'adj_index'.
Warning
'this' adjacency relation, the index vector, and the space 'dim' must have the same number of dimensions. No validation is done.
size_t Bial::Adjacency::Adj3 ( const Vector< size_t > &  dim,
size_t  position,
size_t  adj_index 
) const

Returns the global index of the element in space 'dim' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than matrix size is returned.

Date
2013/Oct/23
Parameters
dimDimensions of the space where the element should be defined.
positionThe global position of the source element.
adj_indexAdjacency relation index in the displacement dimensions.
Returns
The global index of the element in space 'dim' that is adjacent to element 'position' with respect to index 'adj_index'.
Warning
Input space must have three dimentions, and 'this' adjacency relation and the space 'dim' must have the same number of dimensions. No validation is done.
template<class D >
Vector< size_t > Bial::Adjacency::Adj3 ( const Matrix< D > &  mat,
const Vector< size_t > &  index,
size_t  adj_index 
) const

Returns a Vector containing the first three indexes of the element in matrix 'mat' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than NULL is returned.

Date
2012/Jul/13
Parameters
matThe matrix where the adjacent element should be defined.
indexThe indexes of the source element.
adj_indexAdjacency relation index in the displacement matrix.
Returns
A Vector containing the first three indexes of the element in matrix 'mat' that is adjacent to element 'index' with respect to index 'adj_index'.
Warning
'this' adjacency relation, the index vector, and the matrix 'mat' must have the same number of dimensions. No validation is done.
template<class D >
size_t Bial::Adjacency::Adj3 ( const Matrix< D > &  mat,
size_t  position,
size_t  adj_index 
) const

Returns the global index of the element in matrix 'mat' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than matrix size is returned.

Date
2012/Jul/13
Parameters
matThe matrix where the adjacent element should be defined.
positionThe global position of the source element.
adj_indexAdjacency relation index in the displacement matrix.
Returns
The global index of the element in matrix 'mat' that is adjacent to element 'position' with respect to index 'adj_index'.
Warning
Input matrix must have three dimentions, and 'this' adjacency relation and the matrix 'mat' must have the same number of dimensions. No validation is done.
template<class D >
Vector< size_t > Bial::Adjacency::Adj3 ( const Image< D > &  img,
const Vector< size_t > &  index,
size_t  adj_index 
) const

Returns a Vector containing the first three indexes of the element in image 'img' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than NULL is returned.

Date
2014/Apr/14
Parameters
imgThe image where the adjacent element should be defined.
indexThe indexes of the source element.
adj_indexAdjacency relation index in the displacement image.
Returns
A Vector containing the first three indexes of the element in image 'img' that is adjacent to element 'index' with respect to index 'adj_index'.
Warning
'this' adjacency relation, the index vector, and the image 'img' must have the same number of dimensions. No validation is done.
template<class D >
size_t Bial::Adjacency::Adj3 ( const Image< D > &  img,
size_t  position,
size_t  adj_index 
) const

Returns the global index of the element in image 'img' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than image size is returned.

Date
2014/Apr/14
Parameters
imgThe image where the adjacent element should be defined.
positionThe global position of the source element.
adj_indexAdjacency relation index in the displacement image.
Returns
The global index of the element in image 'img' that is adjacent to element 'position' with respect to index 'adj_index'.
Warning
Input image must have three dimentions, and 'this' adjacency relation and the image 'img' must have the same number of dimensions. No validation is done.
size_t Bial::Adjacency::Dims ( ) const

Returns the number of dimensions of the adjacency relation.

Date
2012/Jul/13
Parameters
none.
Returns
Number of dimensions of the adjacency relation.
Warning
none.
float Bial::Adjacency::Displacement ( size_t  elem,
size_t  dim 
) const

Returns the displacement in dimention dim for adjacent elem.

Date
2013/Oct/31
Parameters
elemAdjacency element index.
dimDisplacement dimension.
Returns
The displacement in dimention dim for adjacent elem.
Warning
none.
float Bial::Adjacency::operator() ( size_t  elem,
size_t  dim 
) const

Returns data pointed by index ( elem, dim ).

Date
2012/Jul/06
Parameters
elemAdjacency element index.
dimNumber of dimension of the element.
Returns
Data pointed by index ( elem, dim ).
Warning
Adjacency dimensions and bounds are not verified.
float& Bial::Adjacency::operator() ( size_t  elem,
size_t  dim 
)

Returns the reference for data pointed by index ( elem, dim ).

Date
2012/Jul/06
Parameters
elemAdjacency element index.
dimNumber of dimension of the element.
Returns
Reference of data pointed by index ( elem, dim ).
Warning
Adjacency dimensions and bounds are not verified.
Vector< size_t > Bial::Adjacency::operator() ( const Vector< size_t > &  dim,
const Vector< size_t > &  index,
size_t  adj_index 
) const

Returns a vector containing the indexes of the adjacent element to the given source element in spa domain. If the adjacent element is out of the space bounds it returns a copy of dim vector.

Date
2013/Oct/23
Parameters
dimDimensions of the space domain where the adjacent element should be found.
indexThe indexes of the source element.
adj_indexAdjacency relation index in the displacement dimensions.
Returns
A vector containing the indexes of the adjacent element to the given source element in space domain.
Warning
No validation is done.
size_t Bial::Adjacency::operator() ( const Vector< size_t > &  dim,
size_t  position,
size_t  adj_index 
) const

Returns the global index of the element in space 'dim' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the space bounds, than matrix size is returned.

Date
2013/Oct/23
Parameters
dimDimensions of the space where the element should be defined.
positionThe global position of the source element.
adj_indexAdjacency relation index in the displacement dimensions.
Returns
The global index of the element in space 'dim' that is adjacent to element 'position' with respect to index 'adj_index'.
Warning
This method is slower than specialized Adj2 and Adj3. Call Adj2 and Adj3 methods instead, if possible. 'this' adjacency relation and the space 'dim' must have the same number of dimensions. No validation is done.
template<class D >
Vector< size_t > Bial::Adjacency::operator() ( const Matrix< D > &  mat,
const Vector< size_t > &  index,
size_t  adj_index 
) const

Returns a Vector containing the indexes of the element in matrix 'mat' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than NULL is returned.

Date
2012/Jul/13
Parameters
matThe matrix where the adjacent element should be defined.
indexThe indexes of the source element.
adj_indexAdjacency relation index in the displacement matrix.
Returns
A Vector containing the indexes of the element in matrix 'mat' that is adjacent to element 'ind with respect to index 'adj_index'.
Warning
This method is slower than specialized Adj2 and Adj3. Call Adj2 and Adj3 methods instead, if possible. 'this' adjacency relation, the index vector, and the matrix 'mat' must have the same number of dimensions. No validation is done.
template<class D >
size_t Bial::Adjacency::operator() ( const Matrix< D > &  mat,
size_t  position,
size_t  adj_index 
) const

Returns the global index of the element in matrix 'mat' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the matrix bounds, than matrix size is returned.

Date
2012/Jul/13
Parameters
matThe matrix where the adjacent element should be defined.
positionThe global position of the source element.
adj_indexAdjacency relation index in the displacement matrix.
Returns
The global index of the element in matrix 'mat' that is adjacent to element 'position' with respect to index 'adj_index'.
Warning
This method is slower than specialized Adj2 and Adj3. Call Adj2 and Adj3 methods instead, if possible. 'this' adjacency relation and the matrix 'mat' must have the same number of dimensions. No validation is done.
template<class D >
Vector< size_t > Bial::Adjacency::operator() ( const Image< D > &  img,
const Vector< size_t > &  index,
size_t  adj_index 
) const

Returns a Vector containing the indexes of the element in image 'img' that is adjacent to element of indexes 'index' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than NULL is returned.

Date
2014/Apr/14
Parameters
imgThe image where the adjacent element should be defined.
indexThe indexes of the source element.
adj_indexAdjacency relation index in the displacement image.
Returns
A Vector containing the indexes of the element in image 'img' that is adjacent to element 'ind with respect to index 'adj_index'.
Warning
This method is slower than specialized Adj2 and Adj3. Call Adj2 and Adj3 methods instead, if possible. 'this' adjacency relation, the index vector, and the image 'img' must have the same number of dimensions. No validation is done.
template<class D >
size_t Bial::Adjacency::operator() ( const Image< D > &  img,
size_t  position,
size_t  adj_index 
) const

Returns the global index of the element in image 'img' that is adjacent to element 'position' with respect to index 'adj_index'. If the adjacent element is out of the image bounds, than image size is returned.

Date
2014/Apr/14
Parameters
matThe image where the adjacent element should be defined.
positionThe global position of the source element.
adj_indexAdjacency relation index in the displacement image.
Returns
The global index of the element in image 'img' that is adjacent to element 'position' with respect to index 'adj_index'.
Warning
This method is slower than specialized Adj2 and Adj3. Call Adj2 and Adj3 methods instead, if possible. 'this' adjacency relation and the image 'img' must have the same number of dimensions. No validation is done.
template<class O >
O& Bial::Adjacency::Print ( O &  os) const

Prints adjacency to output stream os.

Date
2014/Oct/13
Parameters
osan output stream.
Returns
The output stream.
Warning
none.
template<class O >
O& Bial::Adjacency::PrintDimensions ( O &  os) const

Prints adjacency relation dimensions to output stream os.

Date
2012/Jun/21
Parameters
osan output stream.
Returns
os output stream.
Warning
none.
size_t Bial::Adjacency::Size ( ) const

Returns the number of elements of the adjacency relation.

Date
2012/Jul/13
Parameters
none.
Returns
Number of elements of the adjacency relation.
Warning
none.
size_t Bial::Adjacency::size ( ) const

Same as Size( ). Just for coherence with Image.size( ).

Date
2012/Jul/13
Parameters
none.
Returns
Number of elements of the adjacency relation.
Warning
none.
Vector< size_t > Bial::Adjacency::SortByDistance ( bool  increasing_order = true)

Sort adjacency elements in increasing (or decreasing) order with respect to the distance from t reference element.

Date
2012/Jul/06
Parameters
increasing_ordertrue for sorting in reverse mode.
Returns
A Vector containing the position of the elements prior to sorting.
Warning
none.

Member Data Documentation

Matrix< float > Bial::Adjacency::relation
protected

2D matrix. First dimension refers to the number of dimensions of adjacency relation and the second dimension refers to the size of the adjacency relation, that is, the number of elements in it. Example: relation(dims, size)

Definition at line 37 of file Adjacency.hpp.


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