A.I.M.S


aims::Connectivity Class Reference

Topology of a data container. More...

#include <aims/connectivity/connectivity.h>

Collaboration diagram for aims::Connectivity:

Public Types

enum  Type {
  CONNECTIVITY_4_XY, CONNECTIVITY_4_XZ, CONNECTIVITY_4_YZ, CONNECTIVITY_6_XYZ,
  CONNECTIVITY_8_XY, CONNECTIVITY_8_XZ, CONNECTIVITY_8_YZ, CONNECTIVITY_18_XYZ,
  CONNECTIVITY_26_XYZ, CONNECTIVITY_9_XY_Zminus, CONNECTIVITY_9_XY_Zplus, CONNECTIVITY_9_XZ_Yminus,
  CONNECTIVITY_9_XZ_Yplus, CONNECTIVITY_9_YZ_Xminus, CONNECTIVITY_9_YZ_Xplus, CONNECTIVITY_5_XminusY,
  CONNECTIVITY_5_XplusY, CONNECTIVITY_5_XYminus, CONNECTIVITY_5_XYplus, CONNECTIVITY_5_XminusZ,
  CONNECTIVITY_5_XplusZ, CONNECTIVITY_5_XZminus, CONNECTIVITY_5_XZplus, CONNECTIVITY_5_YminusZ,
  CONNECTIVITY_5_YplusZ, CONNECTIVITY_5_YZminus, CONNECTIVITY_5_YZplus, CONNECTIVITY_8_XYZ,
  CONNECTIVITY_4_XYdiag, CONNECTIVITY_4_XZdiag, CONNECTIVITY_4_YZdiag
}
 The different kinds of connectivity. More...
 

Public Member Functions

 Connectivity (int oline, int oslice, Type type)
 
virtual ~Connectivity ()
 
Type type () const
 Get the type of the connectivity. More...
 
std::string type_string () const
 Get the type of the connectivity. More...
 
int nbNeighbors () const
 Get the number of neighbors for that connectivity. More...
 
int offset (int n) const
 Get the linear offset of the nth element. More...
 
const Point3dxyzOffset (int n) const
 Get the X/Y/Z offsets of the nth element. More...
 
const Point3dfdir (int n) const
 Get the normalized directive vector of the nth element. More...
 
Connectivityoperator= (const Connectivity &other)
 

Static Public Member Functions

static Type type_from_string (const std::string &)
 
static std::string type_to_string (Type)
 

Protected Member Functions

void setConnectivity ()
 Set the right connectivity according to the given type. More...
 
void setConnectivity_4_XY ()
 4-neighbor connectivity in (xy) plane More...
 
void setConnectivity_4_XZ ()
 4-neighbor connectivity in (xz) plane More...
 
void setConnectivity_4_YZ ()
 4-neighbor connectivity in (yz) plane More...
 
void setConnectivity_6_XYZ ()
 6-neighbor connectivity in (xyz) space More...
 
void setConnectivity_8_XY ()
 8-neighbor connectivity in (xy) plane More...
 
void setConnectivity_8_XZ ()
 8-neighbor connectivity in (xz) plane More...
 
void setConnectivity_8_YZ ()
 8-neighbor connectivity in (yz) plane More...
 
void setConnectivity_18_XYZ ()
 18-neighbor connectivity in (xyz) space More...
 
void setConnectivity_26_XYZ ()
 26-neighbor connectivity in (xyz) space More...
 
void setConnectivity_9_XY_Zminus ()
 9-neighbor connectivity in (xyz) inferior in z space More...
 
void setConnectivity_9_XY_Zplus ()
 9-neighbor connectivity in (xyz) superior in z space More...
 
void setConnectivity_9_XZ_Yminus ()
 9-neighbor connectivity in (xyz) inferior in y space More...
 
void setConnectivity_9_XZ_Yplus ()
 9-neighbor connectivity in (xyz) superior in y space More...
 
void setConnectivity_9_YZ_Xminus ()
 9-neighbor connectivity in (xyz) inferior in x space More...
 
void setConnectivity_9_YZ_Xplus ()
 9-neighbor connectivity in (xyz) superior in x space More...
 
void setConnectivity_5_XminusY ()
 5-neighbor connectivity in (xy) inferior in x plane More...
 
void setConnectivity_5_XplusY ()
 5-neighbor connectivity in (xy) superior in x plane More...
 
void setConnectivity_5_XYminus ()
 5-neighbor connectivity in (xy) inferior in y plane More...
 
void setConnectivity_5_XYplus ()
 5-neighbor connectivity in (xy) superior in y plane More...
 
void setConnectivity_5_XminusZ ()
 5-neighbor connectivity in (xz) inferior in x plane More...
 
void setConnectivity_5_XplusZ ()
 5-neighbor connectivity in (xz) superior in x plane More...
 
void setConnectivity_5_XZminus ()
 5-neighbor connectivity in (xz) inferior in z plane More...
 
void setConnectivity_5_XZplus ()
 5-neighbor connectivity in (xz) superior in z plane More...
 
void setConnectivity_5_YminusZ ()
 5-neighbor connectivity in (yz) inferior in y plane More...
 
void setConnectivity_5_YplusZ ()
 5-neighbor connectivity in (yz) superior in y plane More...
 
void setConnectivity_5_YZminus ()
 5-neighbor connectivity in (yz) inferior in z plane More...
 
void setConnectivity_5_YZplus ()
 5-neighbor connectivity in (yz) superior in z plane More...
 

Protected Attributes

int _xSize
 
int _sliceSize
 
Type _type
 Type of connectivity. More...
 
int _nbNeighbors
 Number of neighbors. More...
 
int * _offset
 Linear offset pointer. More...
 
Point3d_xyzOffset
 xyz offset pointer More...
 
Point3df_dir
 Normalized vectors for the different directions. More...
 

Detailed Description

Topology of a data container.

Definition at line 47 of file connectivity.h.

Member Enumeration Documentation

The different kinds of connectivity.

Enumerator
CONNECTIVITY_4_XY 
CONNECTIVITY_4_XZ 
CONNECTIVITY_4_YZ 
CONNECTIVITY_6_XYZ 
CONNECTIVITY_8_XY 
CONNECTIVITY_8_XZ 
CONNECTIVITY_8_YZ 
CONNECTIVITY_18_XYZ 
CONNECTIVITY_26_XYZ 
CONNECTIVITY_9_XY_Zminus 
CONNECTIVITY_9_XY_Zplus 
CONNECTIVITY_9_XZ_Yminus 
CONNECTIVITY_9_XZ_Yplus 
CONNECTIVITY_9_YZ_Xminus 
CONNECTIVITY_9_YZ_Xplus 
CONNECTIVITY_5_XminusY 
CONNECTIVITY_5_XplusY 
CONNECTIVITY_5_XYminus 
CONNECTIVITY_5_XYplus 
CONNECTIVITY_5_XminusZ 
CONNECTIVITY_5_XplusZ 
CONNECTIVITY_5_XZminus 
CONNECTIVITY_5_XZplus 
CONNECTIVITY_5_YminusZ 
CONNECTIVITY_5_YplusZ 
CONNECTIVITY_5_YZminus 
CONNECTIVITY_5_YZplus 
CONNECTIVITY_8_XYZ 
CONNECTIVITY_4_XYdiag 
CONNECTIVITY_4_XZdiag 
CONNECTIVITY_4_YZdiag 

Definition at line 51 of file connectivity.h.

Constructor & Destructor Documentation

aims::Connectivity::Connectivity ( int  oline,
int  oslice,
Type  type 
)
virtual aims::Connectivity::~Connectivity ( )
virtual

Member Function Documentation

const Point3df& aims::Connectivity::dir ( int  n) const
inline

Get the normalized directive vector of the nth element.

Definition at line 103 of file connectivity.h.

References _dir.

int aims::Connectivity::nbNeighbors ( ) const
inline

Get the number of neighbors for that connectivity.

Definition at line 97 of file connectivity.h.

References _nbNeighbors.

Referenced by aims::AimsConnectedComponent().

int aims::Connectivity::offset ( int  n) const
inline

Get the linear offset of the nth element.

Definition at line 99 of file connectivity.h.

References _offset.

Connectivity& aims::Connectivity::operator= ( const Connectivity other)
inline

Definition at line 106 of file connectivity.h.

References _dir, _offset, _sliceSize, _type, _xSize, _xyzOffset, and setConnectivity().

void aims::Connectivity::setConnectivity ( )
protected

Set the right connectivity according to the given type.

Referenced by operator=().

void aims::Connectivity::setConnectivity_18_XYZ ( )
protected

18-neighbor connectivity in (xyz) space

void aims::Connectivity::setConnectivity_26_XYZ ( )
protected

26-neighbor connectivity in (xyz) space

void aims::Connectivity::setConnectivity_4_XY ( )
protected

4-neighbor connectivity in (xy) plane

void aims::Connectivity::setConnectivity_4_XZ ( )
protected

4-neighbor connectivity in (xz) plane

void aims::Connectivity::setConnectivity_4_YZ ( )
protected

4-neighbor connectivity in (yz) plane

void aims::Connectivity::setConnectivity_5_XminusY ( )
protected

5-neighbor connectivity in (xy) inferior in x plane

void aims::Connectivity::setConnectivity_5_XminusZ ( )
protected

5-neighbor connectivity in (xz) inferior in x plane

void aims::Connectivity::setConnectivity_5_XplusY ( )
protected

5-neighbor connectivity in (xy) superior in x plane

void aims::Connectivity::setConnectivity_5_XplusZ ( )
protected

5-neighbor connectivity in (xz) superior in x plane

void aims::Connectivity::setConnectivity_5_XYminus ( )
protected

5-neighbor connectivity in (xy) inferior in y plane

void aims::Connectivity::setConnectivity_5_XYplus ( )
protected

5-neighbor connectivity in (xy) superior in y plane

void aims::Connectivity::setConnectivity_5_XZminus ( )
protected

5-neighbor connectivity in (xz) inferior in z plane

void aims::Connectivity::setConnectivity_5_XZplus ( )
protected

5-neighbor connectivity in (xz) superior in z plane

void aims::Connectivity::setConnectivity_5_YminusZ ( )
protected

5-neighbor connectivity in (yz) inferior in y plane

void aims::Connectivity::setConnectivity_5_YplusZ ( )
protected

5-neighbor connectivity in (yz) superior in y plane

void aims::Connectivity::setConnectivity_5_YZminus ( )
protected

5-neighbor connectivity in (yz) inferior in z plane

void aims::Connectivity::setConnectivity_5_YZplus ( )
protected

5-neighbor connectivity in (yz) superior in z plane

void aims::Connectivity::setConnectivity_6_XYZ ( )
protected

6-neighbor connectivity in (xyz) space

void aims::Connectivity::setConnectivity_8_XY ( )
protected

8-neighbor connectivity in (xy) plane

void aims::Connectivity::setConnectivity_8_XZ ( )
protected

8-neighbor connectivity in (xz) plane

void aims::Connectivity::setConnectivity_8_YZ ( )
protected

8-neighbor connectivity in (yz) plane

void aims::Connectivity::setConnectivity_9_XY_Zminus ( )
protected

9-neighbor connectivity in (xyz) inferior in z space

void aims::Connectivity::setConnectivity_9_XY_Zplus ( )
protected

9-neighbor connectivity in (xyz) superior in z space

void aims::Connectivity::setConnectivity_9_XZ_Yminus ( )
protected

9-neighbor connectivity in (xyz) inferior in y space

void aims::Connectivity::setConnectivity_9_XZ_Yplus ( )
protected

9-neighbor connectivity in (xyz) superior in y space

void aims::Connectivity::setConnectivity_9_YZ_Xminus ( )
protected

9-neighbor connectivity in (xyz) inferior in x space

void aims::Connectivity::setConnectivity_9_YZ_Xplus ( )
protected

9-neighbor connectivity in (xyz) superior in x space

Type aims::Connectivity::type ( ) const
inline

Get the type of the connectivity.

Definition at line 93 of file connectivity.h.

References _type.

static Type aims::Connectivity::type_from_string ( const std::string &  )
static
std::string aims::Connectivity::type_string ( ) const
inline

Get the type of the connectivity.

Definition at line 95 of file connectivity.h.

References _type, and type_to_string().

static std::string aims::Connectivity::type_to_string ( Type  )
static

Referenced by type_string().

const Point3d& aims::Connectivity::xyzOffset ( int  n) const
inline

Get the X/Y/Z offsets of the nth element.

Definition at line 101 of file connectivity.h.

References _xyzOffset.

Referenced by aims::AimsConnectedComponent().

Member Data Documentation

Point3df* aims::Connectivity::_dir
protected

Normalized vectors for the different directions.

Definition at line 145 of file connectivity.h.

Referenced by dir(), and operator=().

int aims::Connectivity::_nbNeighbors
protected

Number of neighbors.

Definition at line 139 of file connectivity.h.

Referenced by nbNeighbors().

int* aims::Connectivity::_offset
protected

Linear offset pointer.

Definition at line 141 of file connectivity.h.

Referenced by offset(), and operator=().

int aims::Connectivity::_sliceSize
protected

Definition at line 135 of file connectivity.h.

Referenced by operator=().

Type aims::Connectivity::_type
protected

Type of connectivity.

Definition at line 137 of file connectivity.h.

Referenced by operator=(), type(), and type_string().

int aims::Connectivity::_xSize
protected

Definition at line 134 of file connectivity.h.

Referenced by operator=().

Point3d* aims::Connectivity::_xyzOffset
protected

xyz offset pointer

Definition at line 143 of file connectivity.h.

Referenced by operator=(), and xyzOffset().


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