Volume Cartographer 2.27.0
Public Types | Protected Member Functions | Protected Attributes | List of all members
volcart::NeighborhoodGenerator Class Referenceabstract

Base class for neighborhood generating classes. More...

#include <vc/core/neighborhood/NeighborhoodGenerator.hpp>

Inheritance diagram for volcart::NeighborhoodGenerator:
[legend]

Public Types

using Pointer = std::shared_ptr< NeighborhoodGenerator >
 

Public Member Functions

std::size_t dim ()
 Get the dimensionality of the neighborhood generator. More...
 
virtual Neighborhood::Extent extents () const =0
 Get the size of the neighborhood returned by this class. More...
 
void setSamplingRadius (double r, std::size_t axis=0)
 Set the sampling search radius by axis. More...
 
void setSamplingRadius (double r0, double r1, double r2)
 Set the sampling search radius for all axes. More...
 
void setSamplingRadius (const cv::Vec3d &radii)
 
void setSamplingInterval (double i)
 Set the sampling interval: how frequently along the radius (in Volume units) the samples are taken. More...
 
void setSamplingDirection (Direction d)
 Set the filtering search direction. More...
 
void setAutoGenAxes (bool b)
 Enable/Disable auto-generation of missing axes. More...
 
virtual Neighborhood compute (const Volume::Pointer &v, const cv::Vec3d &pt, const std::vector< cv::Vec3d > &axes)=0
 Compute a neighborhood centered on a point. More...
 

Protected Member Functions

 NeighborhoodGenerator (std::size_t dim)
 

Protected Attributes

const std::size_t dim_ {0}
 
cv::Vec3d radius_ {1.0, 1.0, 1.0}
 
double interval_ {1.0}
 
Direction direction_ {Direction::Bidirectional}
 
bool autoGenAxes_ {true}
 

Detailed Description

Base class for neighborhood generating classes.

Definition at line 39 of file NeighborhoodGenerator.hpp.

Member Typedef Documentation

◆ Pointer

Pointer type

Definition at line 43 of file NeighborhoodGenerator.hpp.

Constructor & Destructor Documentation

◆ NeighborhoodGenerator()

volcart::NeighborhoodGenerator::NeighborhoodGenerator ( std::size_t  dim)
inlineexplicitprotected

Default constructor

Definition at line 106 of file NeighborhoodGenerator.hpp.

Member Function Documentation

◆ compute()

virtual Neighborhood volcart::NeighborhoodGenerator::compute ( const Volume::Pointer v,
const cv::Vec3d &  pt,
const std::vector< cv::Vec3d > &  axes 
)
pure virtual

Compute a neighborhood centered on a point.

Implemented in volcart::CuboidGenerator, and volcart::LineGenerator.

◆ dim()

std::size_t volcart::NeighborhoodGenerator::dim ( )
inline

Get the dimensionality of the neighborhood generator.

Definition at line 47 of file NeighborhoodGenerator.hpp.

◆ extents()

virtual Neighborhood::Extent volcart::NeighborhoodGenerator::extents ( ) const
pure virtual

Get the size of the neighborhood returned by this class.

The result of this function may vary based on the value of this class's parameters

Implemented in volcart::CuboidGenerator, and volcart::LineGenerator.

◆ setAutoGenAxes()

void volcart::NeighborhoodGenerator::setAutoGenAxes ( bool  b)
inline

Enable/Disable auto-generation of missing axes.

Derived classes are not guaranteed to make use of this functionality

Definition at line 93 of file NeighborhoodGenerator.hpp.

◆ setSamplingDirection()

void volcart::NeighborhoodGenerator::setSamplingDirection ( Direction  d)
inline

Set the filtering search direction.

Default: Bidirectional

Definition at line 86 of file NeighborhoodGenerator.hpp.

◆ setSamplingInterval()

void volcart::NeighborhoodGenerator::setSamplingInterval ( double  i)
inline

Set the sampling interval: how frequently along the radius (in Volume units) the samples are taken.

Default = 1.0

Definition at line 79 of file NeighborhoodGenerator.hpp.

◆ setSamplingRadius() [1/3]

void volcart::NeighborhoodGenerator::setSamplingRadius ( const cv::Vec3d &  radii)
inline

Definition at line 71 of file NeighborhoodGenerator.hpp.

◆ setSamplingRadius() [2/3]

void volcart::NeighborhoodGenerator::setSamplingRadius ( double  r,
std::size_t  axis = 0 
)
inline

Set the sampling search radius by axis.

Definition at line 59 of file NeighborhoodGenerator.hpp.

◆ setSamplingRadius() [3/3]

volcart::NeighborhoodGenerator::setSamplingRadius ( double  r0,
double  r1,
double  r2 
)
inline

Set the sampling search radius for all axes.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 65 of file NeighborhoodGenerator.hpp.

Member Data Documentation

◆ autoGenAxes_

bool volcart::NeighborhoodGenerator::autoGenAxes_ {true}
protected

Auto-generate Axes flag

Definition at line 123 of file NeighborhoodGenerator.hpp.

◆ dim_

const std::size_t volcart::NeighborhoodGenerator::dim_ {0}
protected

Dimensionality of the generator

Definition at line 111 of file NeighborhoodGenerator.hpp.

◆ direction_

Direction volcart::NeighborhoodGenerator::direction_ {Direction::Bidirectional}
protected

Filtering direction

Definition at line 120 of file NeighborhoodGenerator.hpp.

◆ interval_

double volcart::NeighborhoodGenerator::interval_ {1.0}
protected

Sampling interval

Definition at line 117 of file NeighborhoodGenerator.hpp.

◆ radius_

cv::Vec3d volcart::NeighborhoodGenerator::radius_ {1.0, 1.0, 1.0}
protected

Radius of calculation

Definition at line 114 of file NeighborhoodGenerator.hpp.


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