aimsdata  4.7.0
Neuroimaging data handling
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< Point3dl >::iterator iterator
 
typedef std::vector< Point3dl >::const_iterator const_iterator
 

Public Member Functions

 StructuringElement ()
 
 StructuringElement (const std::vector< Point3dl > &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< Point3dl > & getVector () const
 Return std::vector<Point3dl> More...
 
std::vector< int > getAmplitude (const Point3dl &origin=Point3dl(0, 0, 0)) const
 Maximum distance to origin in each direction. More...
 
virtual StructuringElementclone () const
 Clone the StructuringElement. More...
 

Protected Attributes

std::vector< Point3dl_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

◆ const_iterator

◆ iterator

Definition at line 95 of file structuring_element.h.

Constructor & Destructor Documentation

◆ StructuringElement() [1/2]

aims::StructuringElement::StructuringElement ( )
inline

Definition at line 103 of file structuring_element.h.

◆ StructuringElement() [2/2]

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

Definition at line 104 of file structuring_element.h.

◆ ~StructuringElement()

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

Definition at line 106 of file structuring_element.h.

Member Function Documentation

◆ begin() [1/2]

iterator aims::StructuringElement::begin ( )
inline

◆ begin() [2/2]

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

Return const_iterator to beginning.

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

Definition at line 121 of file structuring_element.h.

◆ clone()

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.

◆ end() [1/2]

iterator aims::StructuringElement::end ( )
inline

◆ end() [2/2]

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.

◆ getAmplitude()

std::vector<int> aims::StructuringElement::getAmplitude ( const Point3dl origin = Point3dl(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

◆ getVector()

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

Return std::vector<Point3dl>

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

Definition at line 135 of file structuring_element.h.

◆ size()

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

Definition at line 131 of file structuring_element.h.

Member Data Documentation

◆ _vector

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

Definition at line 151 of file structuring_element.h.


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