A.I.M.S


aims::StructuringElement Class Reference

aims::StructuringElement class representing a 3D structuring element. More...

#include <aims/connectivity/structuring_element.h>

Inheritance diagram for aims::StructuringElement:
Collaboration diagram for aims::StructuringElement:

Public Types

typedef std::vector< Point3d >
::iterator 
iterator
 
typedef std::vector< Point3d >
::const_iterator 
const_iterator
 

Public Member Functions

 StructuringElement ()
 
 StructuringElement (const std::vector< Point3d > &vector)
 
virtual ~StructuringElement ()
 
iterator begin ()
 Return iterator to beginning. More...
 
iterator end ()
 Return iterator to end. More...
 
const_iterator begin () const
 Return const_iterator to beginning. More...
 
const_iterator end () const
 Return const_iterator to end. More...
 
size_t size () const
 
const std::vector< Point3d > & getVector () const
 Return std::vector<Point3d> More...
 
std::vector< int > getAmplitude (const Point3d &origin=Point3d(0, 0, 0)) const
 Maximum distance to origin in each direction. More...
 
virtual StructuringElementclone () const
 Clone the StructuringElement. More...
 

Protected Attributes

std::vector< Point3d_vector
 

Detailed Description

aims::StructuringElement class representing a 3D structuring element.

The aims::StructuringElement class is used to get neighbors of a coordinate in a 3D grid.

Each type of structuring element is a class deriving from aims::StructuringElement. There are currently two intermediate interface classes which are aims::strel::Shape and aims::strel::Connectivity. Two factory classes are also there to get specific structuring elements from string identifiers.

#include <iostream>
using namespace aims;
using namesapce carto;
using namespace std;
// Create spherical structuring element of radius 5 voxels
rc_ptr<StructuringElement> se( new strel::Sphere(5) );
StructuringElement::iterator ic, ie = se->end();
for( ic = se->begin(); ic != ie; ++ic ) {
cout << "Structuring element point: " << *ic << endl;
See also
aims::strel::Shape aims::strel::ShapeFactory, aims::strel::Connectivity aims::strel::ConnectivityFactory

Definition at line 89 of file structuring_element.h.

Member Typedef Documentation

Definition at line 98 of file structuring_element.h.

Definition at line 95 of file structuring_element.h.

Constructor & Destructor Documentation

aims::StructuringElement::StructuringElement ( )
inline

Definition at line 103 of file structuring_element.h.

Referenced by clone().

aims::StructuringElement::StructuringElement ( const std::vector< Point3d > &  vector)
inline

Definition at line 104 of file structuring_element.h.

virtual aims::StructuringElement::~StructuringElement ( )
inlinevirtual

Definition at line 106 of file structuring_element.h.

Member Function Documentation

iterator aims::StructuringElement::begin ( )
inline

Return iterator to beginning.

Definition at line 115 of file structuring_element.h.

References _vector.

Referenced by aims::StructuredConstVolume< T >::StructuredConstVolume(), and aims::StructuredVolume< T >::StructuredVolume().

const_iterator aims::StructuringElement::begin ( ) const
inline

Return const_iterator to beginning.

Returns
aims::StructuringElement::const_iterator that points to the beginning Point3d

Definition at line 121 of file structuring_element.h.

References _vector.

virtual StructuringElement* aims::StructuringElement::clone ( ) const
inlinevirtual

Clone the StructuringElement.

Reimplemented in aims::strel::Connectivity, and aims::strel::Shape.

Definition at line 149 of file structuring_element.h.

References StructuringElement().

iterator aims::StructuringElement::end ( )
inline

Return iterator to end.

Definition at line 117 of file structuring_element.h.

References _vector.

Referenced by aims::StructuredConstVolume< T >::StructuredConstVolume(), and aims::StructuredVolume< T >::StructuredVolume().

const_iterator aims::StructuringElement::end ( ) const
inline

Return const_iterator to end.

Returns
aims::StructuringElement::const_iterator that points to the element past the end

Definition at line 125 of file structuring_element.h.

References _vector.

std::vector<int> aims::StructuringElement::getAmplitude ( const Point3d origin = Point3d(0, 0, 0)) const

Maximum distance to origin in each direction.

Warning: it is computed at each call.

Returns
std::vector<uint16_t> that contains the borders availables for the volume. vector[0]: amplitude in low x direction vector[1]: amplitude in high x direction vector[2]: amplitude in low y direction vector[3]: amplitude in high y direction vector[4]: amplitude in low z direction vector[5]: amplitude in high z direction
const std::vector<Point3d>& aims::StructuringElement::getVector ( ) const
inline

Return std::vector<Point3d>

Returns
std::vector<Point3d> that contains 3d positions of the structuring element

Definition at line 135 of file structuring_element.h.

References _vector.

size_t aims::StructuringElement::size ( ) const
inline

Definition at line 131 of file structuring_element.h.

References _vector.

Member Data Documentation

std::vector<Point3d> aims::StructuringElement::_vector
protected

Definition at line 151 of file structuring_element.h.

Referenced by begin(), end(), getVector(), and size().


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